I have been struggling with Apache SOAP to try and build a request. Specifically, I don't understand how to embed these elements into the Header and Body sections. More specifically, how to do this nested tags.
Thanks for any advice you can provide.
 
Below, is a sample of the request I need to send to the server.
 
 
<SOAP-ENV:Header>
<uniqueID>111111111111111</uniqueID>
</ContinueHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<subscribe xmlns="http://xxxx/xxxx/xxxx/service">
<comHdr>
<WSCredentials>
<UserName>xxxxxxx</UserName>
<Password>xxxxxxxx</Password>
</WSCredentials>
</comHdr>
</subscribe>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
 
I can add the <UserName>xxxxxxx</UserName> <Password>xxxxxxxx</Password> to the body of the request using:
 
Vector parms = new Vector();
parms.addElement(new Parameter("UserName", String.class, username, null));
parms.addElement(new Parameter("Token", String.class, password, null));
call.setParams(parms);

I just don't know how to add those tags within the <comHdr> and <WSCredentials> tags.
 

Reply via email to