java - Axis2 generated service creates wrong request -
i have generated java (1.5) ws classes using axis2-wsdl2code-maven-plugin (1.4.1). when utilize these unusual happening , don't understand what's going on.
the problem phone call 1 method, actual web service phone call happens different one.
configservicestub service = new configservicestub(url); servicerequest request = new servicerequest(); request.setprocessid(processid); request.setservicecode(biginteger.valueof(113)); service.removeservice(request);
when run code, happens web service phone call getservicedetails
. don't understand why. next results in right web service call.
service.getservicedetails(request);
is there reuse in xsd messes things up, or going on here?
here relevant wsdl , xsd:
binding
<operation name="getservicedetails"> <soap:operation soapaction="http://api.nwn.no/webservices/productconfigurator/getservicedetails" /> <input><soap:body /></input> <output><soap:body /></output> <fault name="fault"><soap:fault name="fault" /></fault> </operation> <operation name="removeservice"> <soap:operation soapaction="http://api.nwn.no/webservices/productconfigurator/removeservice" /> <input><soap:body /></input> <output><soap:body /></output> <fault name="fault"><soap:fault name="fault" /></fault> </operation>
porttype
<operation name="getservicedetails"> <input message="tns:getservicedetailsrequest" /> <output message="tns:getservicedetailsresponse" /> <fault message="tns:fault" name="fault" /> </operation> <operation name="removeservice"> <input message="tns:removeservicerequest" /> <output message="tns:removeserviceresponse" /> <fault message="tns:fault" name="fault" /> </operation>
message
<message name="getservicedetailsrequest"> <part name="body" element="tns:getservicedetailsrequest" /> </message> <message name="getservicedetailsresponse"> <part name="body" element="tns:getservicedetailsresponse" /> </message> <message name="removeservicerequest"> <part name="body" element="tns:removeservicerequest" /> </message> <message name="removeserviceresponse"> <part name="body" element="tns:removeserviceresponse" /> </message>
schema
<xsd:element name="getservicedetailsrequest" type="servicerequest" /> <xsd:element name="getservicedetailsresponse" type="serviceresponse" /> <xsd:element name="removeservicerequest" type="servicerequest" /> <xsd:element name="removeserviceresponse" type="serviceconfigurationresponse" /> <xsd:complextype name="processrequest"> <xsd:sequence> <xsd:element ref="processid" /> </xsd:sequence> </xsd:complextype> <xsd:complextype name="servicerequest"> <xsd:complexcontent> <xsd:extension base="processrequest"> <xsd:sequence> <xsd:element name="servicecode" type="servicecode" /> </xsd:sequence> </xsd:extension> </xsd:complexcontent> </xsd:complextype>
can determine generated value soapaction? should different.
you should consider not reuse xml elements different operations. not ws-i compliant. soapaction not mandatory ws-i compliant services.
java web-services axis2
No comments:
Post a Comment