views:

837

answers:

1

I'm having a problem related to JAX-WS and AXIS. JAX-WS (2.1.7) as a client, Axis (1.4.x) as server.

Everything works OK, but the response can't be read to Java.

Response:

<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; <soapenv:Body> <ns1:myserviceResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://my/service"&gt; <ns1:myserviceReturn xsi:type="xsd:string">responsestring</ns1:myserviceReturn> </ns1:myserviceResponse> </soapenv:Body> </soapenv:Envelope>

The problem is that if "ns1:"-namespace declaration is removed from myserviceReturn, JAX-WS is able to return else than null.

Does anyone have a clue how to force JAX-WS to ignore namespaces, how to modify SOAP response manually to exclude "ns1", or other ideas for this kind of problem? Any help is appreciated!!!

A: 

You need to write a custom WSDL file that does not include the name space. This file goes in the META-INF directory. You can start with the default one that your app has now, then save it here.

stevedbrown