A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Jaxws client binding / unmarshal problem
Joined: Sep 27, 2012
Sep 27, 2012 08:50:41
i'm developing a
web service client.
I've got a wsdl and i know the service is perl based.
It's not my first web service client, but i'm still a newbie.
I've tested the wsdl and the service response with soapUI and other clients and it works well.
I've generated some stubs using axis2, apache cxf and jax ws ri (separately) to generate the code starting from the wsdl but no client works well.
(jdk7 x64/x86 and jdk6 x64/x86)
All the clients can connect and correctly send the request, using the debugger i can confirm that all the clients correctly recieve the response .. then all becomes black.
The response is
.... <soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <getCalcResponse xmlns="SERVICE URL "> <err_code xsi:type="xsd:int">0</errcode> <err_str xsi:type="xsd:string">success</errstr> <code xsi:type="xsd:int">201</code> </getCalcResponse> </soap:Body> </soap:Envelope> ....
The axis2 client with ADB binding throws an "Unsupported type" exception on
The cxf client runs without errors but the getCalcResponse object fields are NULL or 0
the jaxws ri client runs similar to the cxf
Where's the mistake ? What to analyze?
I've tried to change some annotations parameters or to force the namespace on the fields but nothing changes
PLEASE help me
Joined: Sep 27, 2012
Sep 28, 2012 09:12:24
finally got it working adding the name space to the methods generated by wsimport (
... @WebParam(name = "error", targetNamespace = "http://namespace.../soapPort/", mode = WebParam.Mode.OUT) Holder<String> error, ...
and adding the
in the response bean with the same namespace
@XmlElement(name="error", namespace ="http://namespace.../soapPort/") protected String error;
It is sorta covered in the
JavaRanch Style Guide
subject: Jaxws client binding / unmarshal problem
A problem parsing the response envelope.
SOAP Header Authentication!!!
JAX-WS web service - "Cannot find dispatch method"
problem with String  in axis 1.3 and .net client
Send SOAP Request to wsdl
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014