I have a problem with a SOAP header element that I added to a webservice
request, after the webservice provider "improved" their webservice.
SOAPHeaderElement authHeader = new SOAPHeaderElement(
"http://xyz.com/services", "ServiceAuthHeader");
SOAPElement userIdNode = authHeader.addChildElement("Username");
userIdNode.addTextNode(USER_ID);
SOAPElement passwordNode = authHeader.addChildElement("Password");
passwordNode.addTextNode(PASSWORD);
((Stub) service).setHeader(authHeader);
That resultet in generated XML like this:
<soap:Header>
<ns1:ServiceAuthHeader xmlns:ns1="http://xyz.com/services"
soap:actor="http://schemas.xmlsoap.org/soap/actor/next"
soap:mustUnderstand="0">
<ns1:Username>ABC</ns1:Username>
<ns1:Password>DEF</ns1:Password>
</ns1:ServiceAuthHeader>
</soap:Header>
Now, after the upgrade, it just doesn't work anymore. As I am told, the
namespace that is added to the header causes the problem. If the header
would be more like the following, everything would be fine.
<soap:Header>
<ServiceAuthHeader MyAttribute=""
xmlns="http://xyz.com/webservice">
<Username>ABC</Username>
<Password>DEF</Password>
</ServiceAuthHeader>
</soap:Header>
I really tried hard to modify the code in order to achieve a result like
the above, which works with the remote system, but I couldn't. Is this
possible with generated client code?
Just for curiosity: those two XML-snippets should work equally well,
shouldn't they? At least if I understand XML right, or not?
Best regards,
Andy
--
Andy Pahne
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]