Search code examples
javaweb-servicessoapwsdlsoapui

Method name in soap message request


I have an interesting problem, I'm using SOAP UI to parse the WSDL. The WSDL from payPal

https://developer.paypal.com/docs/classic/api/PayPalSOAPAPIArchitecture/

When I try to load it in SOAP UI, all the method names are getting created that's fine, but when I look into the Messages, The method name in tree view is BillOutstandingAmount But when I open the request

 <soapenv:Body>
  <urn:BillOutstandingAmountReq>
   ....
  </urn:BillOutstandingAmountReq>
</soapenv:Body>

How the method name in SOAP request can be changed.? Is there any annotation to do so? When I look into the WSDL,

<wsdl:message name="BillOutstandingAmountRequest">
 <wsdl:part name="BillOutstandingAmountRequest" element="ns:BillOutstandingAmountReq"/>
</wsdl:message>

The operation part of WSDL

<wsdl:operation name="BillOutstandingAmount">
 <wsdl:input message="ns:BillOutstandingAmountRequest"/>
 <wsdl:output message="ns:BillOutstandingAmountResponse"/>
</wsdl:operation>

Solution

  • After many hours I found the answer

    @RequestWrapper(localName="localRequestName")
    

    Whatever we're giving in the annotation localName will be the SOAP Request method name.