All,
I try to access a message style web service with following client code (1.2RC1):
Call call = (Call) new Service().createCall(); call.setTargetEndpointAddress(ENDPOINT); InputStream input = new FileInputStream("h:/COMPLEXCompany.xml"); SOAPEnvelope reqEnv = new SOAPEnvelope(); SOAPBody body = reqEnv.getBody(); body.addChildElement(new SOAPBodyElement(input)); SOAPEnvelope resEnv = call.invoke(reqEnv);
The soap-request I see with TcpMon on the wire has set the namespaces explicitely for each element in the request:
snippet:
<UserAgent xmlns="http://a.b.c/schema/sd/20040701/SalaryDeclarationContainer"> <Producer
xmlns="http://a.b.c/schema/sd/20040701/SalaryDeclarationContainer">Producer</Producer>
<Name
xmlns="http://a.b.c/schema/sd/20040701/SalaryDeclarationContainer">Test</Name> <Version
xmlns="http://a.b.c/schema/sd/20040701/SalaryDeclarationContainer">0.1</Version>
<Certificate
xmlns="http://a.b.c/schema/sd/20040701/SalaryDeclarationContainer">None</Certificate>
</UserAgent>
But the appropriate snippet in the file I put into the envelope is as follows:
<SalaryDeclarationRequest xmlns="http://a.b.c/schema/sd/20040701/SalaryDeclarationContainer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UserAgent> <Producer>Producer</Producer> <Name>Test</Name> <Version>0.1</Version> <Certificate>None</Certificate> </UserAgent>...
Any ideas why this duplicating of namespaces is happening?
Yves