I'm using Apache axis2 and more specifically, the wsdl2java tool to generate the stubs for a web service and create a client, given the wsdl file.
When I try to generate stub classes for a paypal web service (its wsdl file is here) axis won't generate stubs for both the bindings included to the wsdl but just for the second one (PayPalAPIAASoapBinding)
Has anybody worked on this wsdl with apache's wsdl2java tool before?
I've been struggling with this, too.
Short answer:
Append -pn PayPalAPI to your Axis2 command.
Long answer:
Take a look at following lines of the PayPal WSDL:
Obviously, the WSDL specifies 1 service with 2 ports. Our problem is that Axis2 only creates the stub for the second port, "PayPalAPIAA" but not for the port "PayPalAPI".
Now, take a look at the Axis 2 command line option reference (http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#cmdref), specifically, at the description of the option -pn:
Thus, specifying -pn PayPalAPI does the trick.
apon,
I used Eclipse and created a new Web Service Client project and pointed to the URL you mentioned. I think i was able to create both the stubs. Can you please try creating stubs from Eclipse IDE once?