Skip to main content

web service client - must be something trivial ;-)

1 reply [Last post]
dawg
Offline
Joined: 2008-10-02
Points: 0

Hi,

I'm creating a very simple wsdl (all default) request-response, RPC style, SOAP bindings that looks like that:

<?xml version="1.0" encoding="UTF-8"?>

I have an axis2 implementation for the service, but I'm not even sure it's related. When I try to create a java client for it, I'm using the netbeans tool which is using wsimport to create the client classes. The strange problem is that although the web service takes a string parameter and returns a string value, the generated port type seems to be void and take a string holder class. as can be seen in the code below:

org.netbeans.j2ee.wsdl.samplewsdl.SampleWSDLPortType port = service.getSampleWSDLPort();
javax.xml.ws.Holder part1 = new javax.xml.ws.Holder();
port.sampleWSDLOperation(part1);

I've tried many different combinations but I'm still cluless as of what could cause this strange thing, Any ideas?

Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dawg
Offline
Joined: 2008-10-02
Points: 0

Yup, trivial alright, but not my fault though!!!

Amazingly enough - the reason was that I didn't change the part names in the wsdl from the given defaults: I left it part1 for the input and part1 for the output - it's not so much about leaving the defaults as much as it is about the input and the output having the same name. When changing the part1 in the input to "input" and the part1 in the output to "output" it all works fine.

Thank God.