Hi all, I'm a kind of newbie in Axis and SOAP in general, and I have a problem.
I have a gSOAP server and an Axis client trying to communicate, but they fail. They are both generated with the same WSDL. My client launches its request, the gSOAP server handles it and responds. But an exception is raised by the sax parser. Here is the request : POST / HTTP/1.0 Content-Type: text/xml; charset=utf-8 Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/1.2beta3 Host: localhost:5555 Cache-Control: no-cache Pragma: no-cache SOAPAction: "http://namespace1/MyMethod" Content-Length: 665 <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"> <soapenv:Body> <MyMethod xmlns="urn:plop"> <Attribute1 xmlns="">Value</Attribute1> <Attribute2 xmlns=""> <Node1> Some stuff </Node1> </Attribute2> </MyMethod> </soapenv:Body> </soapenv:Envelope> And the response : HTTP/1.1 200 OK Server: gSOAP/2.5 Content-Type: text/xml; charset=utf-8 Content-Length: 985 Connection: close <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:ns1="http://namespace1.com"> <SOAP-ENV:Body id="_0"> <MyMethodResponse xmlns="urn:plop"> <Attribute1 xsi:type="ns1:Attribute1"> <Node1 xsi:type="ns1:Node1"> Some stuff </Node1> </Attribute1> <return xsi:type="ns1:Report">OK</return> </MyMethodResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Now the exception raised : org.xml.sax.SAXException: Invalid element in com.namespace1.Attribute1 - Node1 I managed to isolate what seems to be the problem : When I put a xmlns="" in the response element <Attribute1 xsi:type="ns1:Attribute1">, everything works fine. But I'd like to find a solution on Axis side, by eliminating those empty namespaces from messages sent by my client. How can I do that ? Is there a link with elementFormDefault and attributeFormDefault ? Thanks, Laurent
