2 つの操作を持つ JBoss 5.1 Web サービスがあります
両方の操作が同じ同じ要求タイプを取ります
それぞれに独自のアクションが
あります Web サービスは正常にコンパイルおよびデプロイされますが、soapUI で要求を送信しようとすると、次のエラーが発生します:
一意に識別できません操作: { https://garygateway.quinn.co.za/services/garygateway }GaryRequest
これが私のWSDLです
<definitions name='GaryGatewayService' targetNamespace='https://garygateway.mediswitch.co.za/services/garygateway' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='https://garygateway.quinn.co.za/services/garygateway' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='https://garygateway.mediswitch.co.za/services/garygateway' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
<types>
<xs:schema targetNamespace='https://garygateway.quinn.co.za/services/garygateway' version='1.0' xmlns:ns1='https://garygateway.mediswitch.co.za/services/garygateway' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:import namespace='https://garygateway.mediswitch.co.za/services/garygateway'/>
<xs:element name='GaryRequest' nillable='true' type='ns1:garyRequest'/>
<xs:element name='GaryResponse' nillable='true' type='ns1:garyResponse'/>
</xs:schema>
<xs:schema targetNamespace='https://garygateway.mediswitch.co.za/services/garygateway' version='1.0' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:complexType name='garyRequest'>
<xs:sequence>
<xs:element minOccurs='0' name='id' type='xs:string'/>
<xs:element minOccurs='0' name='name' type='xs:string'/>
<xs:element minOccurs='0' name='surname' type='xs:string'/>
</xs:sequence>
</xs:complexType>
<xs:complexType name='garyResponse'>
<xs:sequence>
<xs:element minOccurs='0' name='message' type='xs:string'/>
<xs:element minOccurs='0' name='status' type='xs:string'/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
<message name='GaryGatewayEndpoint_requestOneResponse'>
<part element='ns1:GaryResponse' name='GaryResponse'></part>
</message>
<message name='GaryGatewayEndpoint_requestTwoResponse'>
<part element='ns1:GaryResponse' name='GaryResponse'></part>
</message>
<message name='GaryGatewayEndpoint_requestTwo'>
<part element='ns1:GaryRequest' name='requestTwo'></part>
</message>
<message name='GaryGatewayEndpoint_requestOne'>
<part element='ns1:GaryRequest' name='requestOne'></part>
</message>
<portType name='GaryGatewayEndpoint'>
<operation name='requestOne' parameterOrder='requestOne'>
<input message='tns:GaryGatewayEndpoint_requestOne'></input>
<output message='tns:GaryGatewayEndpoint_requestOneResponse'></output>
</operation>
<operation name='requestTwo' parameterOrder='requestTwo'>
<input message='tns:GaryGatewayEndpoint_requestTwo'></input>
<output message='tns:GaryGatewayEndpoint_requestTwoResponse'></output>
</operation>
</portType>
<binding name='GaryGatewayEndpointBinding' type='tns:GaryGatewayEndpoint'>
<soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='requestOne'>
<soap:operation soapAction='https://garygateway.quinn.co.za/services/garygateway/requestOne'/>
<input>
<soap:body use='literal'/>
</input>
<output>
<soap:body use='literal'/>
</output>
</operation>
<operation name='requestTwo'>
<soap:operation soapAction='https://garygateway.quinn.co.za/services/garygateway/requestTwo'/>
<input>
<soap:body use='literal'/>
</input>
<output>
<soap:body use='literal'/>
</output>
</operation>
</binding>
<service name='GaryGatewayService'>
<port binding='tns:GaryGatewayEndpointBinding' name='GaryGatewayEndpointPort'>
<soap:address location='http://gary-desktop:8480/wsgateway/GaryGateway'/>
</port>
</service>
</definitions>
Soap メッセージ ヘッダーを次のようにする WS-A アドレス指定を有効にしました。
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>https://garygateway.mediswitch.co.za/services/garygateway/GaryGatewayEndpoint/requestOneRequest</wsa:Action></soapenv:Header>
SoapU によって生成されるヘッダーは次のとおりです。
POST /wsgateway/GaryGateway HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "https://garygateway.quinn.co.za/services/garygateway/GaryGatewayEndpoint/requestOneRequest"
Content-Length: 544
Host: gary-desktop:8480
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
しかし、まだ操作エラーを一意に識別できません
完全な応答は次のとおりです。
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<env:Fault>
<faultcode>env:Server</faultcode>
<faultstring>Cannot uniquely indentify operation: {https://garygateway.quinn.co.za/services/garygateway}GaryRequest</faultstring>
</env:Fault>
</env:Body>
</env:Envelope>