You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Juan Ignacio Garzón <ju...@gmail.com> on 2007/08/06 18:08:13 UTC

Axis reading null response

I'm calling an Axis Web Service using an Axis generated client (with
WSDL2Java).

The problem is that im getting null response after calling a method.

Im using a network analyzer (wireshark), and I can see that actually I'm
getting a response from the web service in the form:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<SessionID xmlns="http://www.niku.com/xog">XXX</SessionID>
</soapenv:Body>
</soapenv:Envelope>

So, it seems that Axis cannot recognize that response. I have tryied to call
it without the generated classes (Using the Call class), and the same
happens. The code that I used for calling the WS is:

Call call = new Call(new URL(endpoint));
call.setOperationName(new QName("http://www.niku.com/xog/Object", "Login"));
call.setReturnType(XMLType.XSD_STRING);
call.addParameter(new QName("Username"), XMLType.XSD_STRING,
ParameterMode.IN);
call.addParameter(new QName("Password"), XMLType.XSD_STRING,
ParameterMode.IN);
String resp = (String) call.invoke(new Object[] { user, password });

Thanks in advance!