Hi all. this is my first post. The problem I am experiencing pertains to an unusual xml marshalling by client-side Axis Call.invoke() invocations:
An "extra" (my interpretation of the problem) xml element named 'arg0' (<ns1:arg0>) gets inserted into the xml marshalled by client-side axis (ie. from the junit test case). The issue has nothing to do with nested java-bean types (although this test was originally written to test nested java-bean serialization....hence the class names :) I am expecting to see: <?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"> <soapenv:Body> <ns1:createA soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="NestedBeanTestService"> <ns1:c> <ns1:name>I_AM_A_C</ns1:name> </ns1:c> <ns1:name>I_AM_A_B</ns1:name> </ns1:createA> </soapenv:Body> </soapenv:Envelope> Instead, I see : <?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"> <soapenv:Body> <ns1:createA soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="NestedBeanTestService"> <ns1:arg0> <ns1:c> <ns1:name>I_AM_A_C</ns1:name> </ns1:c> <ns1:name>I_AM_A_B</ns1:name> </ns1:arg0> </ns1:createA> </soapenv:Body> </soapenv:Envelope> This can be observed in TCPMonitor. The archive of this problem can be obtained from http://www.practica.com.au/axis/malformed-request.zip Unpack the contents of the archive. The "problem" folder in this directory contains the full request output sent to the server (including headers). Look at "request-1-malformed.txt". The response (in "response-1-from-malformed-request.txt") states that a nested element is not expected. This (kinda) makes sense. [Aside : i was expecting somewhere that the service-arg-type (B) would be specified somewhere, not just the contents of an instance of class type B] By modifying the request ie. by removing the 'offending wrapper': <ns1:arg0> </ns1:arg0> a valid request is re-sent (via TCPMonitor) and interpreted successfully at the server. The response appears good [aside : once again I can't see a reference to java type A - but maybe that's bc I don't understand WSDL] I think I need to somehow remove this 'arg0' reference programatically before I send. I have explored most options cited in the readme's and the various posts on similar matters. None has helped me to solve this problem. I do not want to: a) go thru the pain of addParameter(...) b) building documents ie. SOAPEnvelope, SOAPBodyElement, RPCElement because each of these outcomes vastly reduces the benefits of using AXIS. I have attached a file "malformed-request.zip" to this post. It contains this readme, the source, the classes, the wsdd file, and the text snippets mentioned above. Your assistance appreciated julian