2016-08-28 6 views
0

私のWSDLファイルは次のとおりです。CXFエラー - WDSLエラーサービスからのApache CXF gererate Javaコードが使用可能なポートが含まれていない

<wsdl:definitions name="Service1" targetNamespace="http://tempuri.org/"><wsdl:types><xsd:schema targetNamespace="http://tempuri.org/Imports"><xsd:import schemaLocation="http://localhost:14560/?xsd=xsd0" namespace="http://tempuri.org/"/><xsd:import schemaLocation="http://localhost:14560/?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/></xsd:schema></wsdl:types><wsdl:message name="IService1_GetData_InputMessage"><wsdl:part name="parameters" element="tns:GetData"/></wsdl:message><wsdl:message name="IService1_GetData_OutputMessage"><wsdl:part name="parameters" element="tns:GetDataResponse"/></wsdl:message><wsdl:message name="IService1_IsPortOpen_InputMessage"><wsdl:part name="parameters" element="tns:IsPortOpen"/></wsdl:message><wsdl:message name="IService1_IsPortOpen_OutputMessage"><wsdl:part name="parameters" element="tns:IsPortOpenResponse"/></wsdl:message><wsdl:message name="IService1_OpenPort_InputMessage"><wsdl:part name="parameters" element="tns:OpenPort"/></wsdl:message><wsdl:message name="IService1_OpenPort_OutputMessage"><wsdl:part name="parameters" element="tns:OpenPortResponse"/></wsdl:message><wsdl:message name="IService1_ClosePort_InputMessage"><wsdl:part name="parameters" element="tns:ClosePort"/></wsdl:message><wsdl:message name="IService1_ClosePort_OutputMessage"><wsdl:part name="parameters" element="tns:ClosePortResponse"/></wsdl:message><wsdl:message name="IService1_OpenSocket_InputMessage"><wsdl:part name="parameters" element="tns:OpenSocket"/></wsdl:message><wsdl:message name="IService1_OpenSocket_OutputMessage"><wsdl:part name="parameters" element="tns:OpenSocketResponse"/></wsdl:message><wsdl:message name="IService1_CloseSocket_InputMessage"><wsdl:part name="parameters" element="tns:CloseSocket"/></wsdl:message><wsdl:message name="IService1_CloseSocket_OutputMessage"><wsdl:part name="parameters" element="tns:CloseSocketResponse"/></wsdl:message><wsdl:message name="IService1_SendToCOM_InputMessage"><wsdl:part name="parameters" element="tns:SendToCOM"/></wsdl:message><wsdl:message name="IService1_SendToCOM_OutputMessage"><wsdl:part name="parameters" element="tns:SendToCOMResponse"/></wsdl:message><wsdl:message name="IService1_SendToSocket_InputMessage"><wsdl:part name="parameters" element="tns:SendToSocket"/></wsdl:message><wsdl:message name="IService1_SendToSocket_OutputMessage"><wsdl:part name="parameters" element="tns:SendToSocketResponse"/></wsdl:message><wsdl:message name="IService1_SetPort_InputMessage"><wsdl:part name="parameters" element="tns:SetPort"/></wsdl:message><wsdl:message name="IService1_SetPort_OutputMessage"><wsdl:part name="parameters" element="tns:SetPortResponse"/></wsdl:message><wsdl:message name="IService1_GetXmlRecieveState_InputMessage"><wsdl:part name="parameters" element="tns:GetXmlRecieveState"/></wsdl:message><wsdl:message name="IService1_GetXmlRecieveState_OutputMessage"><wsdl:part name="parameters" element="tns:GetXmlRecieveStateResponse"/></wsdl:message><wsdl:message name="IService1_GetXmlRecieve_InputMessage"><wsdl:part name="parameters" element="tns:GetXmlRecieve"/></wsdl:message><wsdl:message name="IService1_GetXmlRecieve_OutputMessage"><wsdl:part name="parameters" element="tns:GetXmlRecieveResponse"/></wsdl:message><wsdl:message name="IService1_GetXmlError_InputMessage"><wsdl:part name="parameters" element="tns:GetXmlError"/></wsdl:message><wsdl:message name="IService1_GetXmlError_OutputMessage"><wsdl:part name="parameters" element="tns:GetXmlErrorResponse"/></wsdl:message><wsdl:message name="IService1_SetConfirmFlag_InputMessage"><wsdl:part name="parameters" element="tns:SetConfirmFlag"/></wsdl:message><wsdl:message name="IService1_SetConfirmFlag_OutputMessage"><wsdl:part name="parameters" element="tns:SetConfirmFlagResponse"/></wsdl:message><wsdl:message name="IService1_SetPrintFlag_InputMessage"><wsdl:part name="parameters" element="tns:SetPrintFlag"/></wsdl:message><wsdl:message name="IService1_SetPrintFlag_OutputMessage"><wsdl:part name="parameters" element="tns:SetPrintFlagResponse"/></wsdl:message><wsdl:portType name="IService1"><wsdl:operation name="GetData"><wsdl:input wsaw:Action="http://tempuri.org/IService1/GetData" message="tns:IService1_GetData_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataResponse" message="tns:IService1_GetData_OutputMessage"/></wsdl:operation><wsdl:operation name="IsPortOpen"><wsdl:input wsaw:Action="http://tempuri.org/IService1/IsPortOpen" message="tns:IService1_IsPortOpen_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/IsPortOpenResponse" message="tns:IService1_IsPortOpen_OutputMessage"/></wsdl:operation><wsdl:operation name="OpenPort"><wsdl:input wsaw:Action="http://tempuri.org/IService1/OpenPort" message="tns:IService1_OpenPort_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/OpenPortResponse" message="tns:IService1_OpenPort_OutputMessage"/></wsdl:operation><wsdl:operation name="ClosePort"><wsdl:input wsaw:Action="http://tempuri.org/IService1/ClosePort" message="tns:IService1_ClosePort_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/ClosePortResponse" message="tns:IService1_ClosePort_OutputMessage"/></wsdl:operation><wsdl:operation name="OpenSocket"><wsdl:input wsaw:Action="http://tempuri.org/IService1/OpenSocket" message="tns:IService1_OpenSocket_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/OpenSocketResponse" message="tns:IService1_OpenSocket_OutputMessage"/></wsdl:operation><wsdl:operation name="CloseSocket"><wsdl:input wsaw:Action="http://tempuri.org/IService1/CloseSocket" message="tns:IService1_CloseSocket_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/CloseSocketResponse" message="tns:IService1_CloseSocket_OutputMessage"/></wsdl:operation><wsdl:operation name="SendToCOM"><wsdl:input wsaw:Action="http://tempuri.org/IService1/SendToCOM" message="tns:IService1_SendToCOM_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/SendToCOMResponse" message="tns:IService1_SendToCOM_OutputMessage"/></wsdl:operation><wsdl:operation name="SendToSocket"><wsdl:input wsaw:Action="http://tempuri.org/IService1/SendToSocket" message="tns:IService1_SendToSocket_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/SendToSocketResponse" message="tns:IService1_SendToSocket_OutputMessage"/></wsdl:operation><wsdl:operation name="SetPort"><wsdl:input wsaw:Action="http://tempuri.org/IService1/SetPort" message="tns:IService1_SetPort_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/SetPortResponse" message="tns:IService1_SetPort_OutputMessage"/></wsdl:operation><wsdl:operation name="GetXmlRecieveState"><wsdl:input wsaw:Action="http://tempuri.org/IService1/GetXmlRecieveState" message="tns:IService1_GetXmlRecieveState_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/GetXmlRecieveStateResponse" message="tns:IService1_GetXmlRecieveState_OutputMessage"/></wsdl:operation><wsdl:operation name="GetXmlRecieve"><wsdl:input wsaw:Action="http://tempuri.org/IService1/GetXmlRecieve" message="tns:IService1_GetXmlRecieve_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/GetXmlRecieveResponse" message="tns:IService1_GetXmlRecieve_OutputMessage"/></wsdl:operation><wsdl:operation name="GetXmlError"><wsdl:input wsaw:Action="http://tempuri.org/IService1/GetXmlError" message="tns:IService1_GetXmlError_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/GetXmlErrorResponse" message="tns:IService1_GetXmlError_OutputMessage"/></wsdl:operation><wsdl:operation name="SetConfirmFlag"><wsdl:input wsaw:Action="http://tempuri.org/IService1/SetConfirmFlag" message="tns:IService1_SetConfirmFlag_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/SetConfirmFlagResponse" message="tns:IService1_SetConfirmFlag_OutputMessage"/></wsdl:operation><wsdl:operation name="SetPrintFlag"><wsdl:input wsaw:Action="http://tempuri.org/IService1/SetPrintFlag" message="tns:IService1_SetPrintFlag_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/SetPrintFlagResponse" message="tns:IService1_SetPrintFlag_OutputMessage"/></wsdl:operation></wsdl:portType><wsdl:service name="Service1"/></wsdl:definitions>

エラーは次のとおりです。

サービス{http://tempuri.org/} Service1のありません使用可能なポートがありません

サービスはWCFサービスで、http://localhost:14560


私がaxis2でスタブクラスを作成するとき、nullポインタ例外エラーがあります。問題はwsdl解析です。

+0

あなたのwsdlファイルをフォーマットしてください。それを読むことは不可能です。 – jmattheis

+0

私のwsdlファイルをどのようにフォーマットできますか?ありがとう –

+0

XMLファイル – sashwat

答えて

0

WSDLファイルにエラーがあるようです。

あなたのWSDLファイルに名前空間接頭辞が欠けている、例えば

xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:tns="http://..." 
xmlns:wsaw="http://..." 

WSDLエラーを検証するためのAltova XMLスパイのようなツールを使用してください。クライアントを生成する前に、SOAP UIプロジェクトを作成してサービスをテストしてください。

+0

tnxをフォーマットできるツールを使用してください。のスクリーンショットAltova XML製品のタイプ:アプリケーション。のスクリーンショットAltova XML製品のタイプ:アプリケーション。のスクリーンショットAltova XML製品のタイプ:アプリケーション。 –

関連する問題