org.apache.axis2.client.Stub addHeader ignores custom header attributes
-----------------------------------------------------------------------
Key: AXIS2-3575
URL: https://issues.apache.org/jira/browse/AXIS2-3575
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: kernel
Affects Versions: 1.3
Environment: Java5
Reporter: Frank Heyder
We are using a 3rd party webservice, which requires us to add a custom object
to the soap header. This custom object has a required attribute. Debugging
shows that the omElementToadd in the addHeader function of
org.apache.axis2.client.Stub has the correct attribut, but the attributes are
not transfered to the soapHeaderBlock.
I have build fix for our case by adding
Iterator atribIterator = omElementToadd.getAllAttributes();
while (atribIterator.hasNext())
{
OMAttribute omAttribute = (OMAttribute)atribIterator.next();
if (soapHeaderBlock.getAttribute(omAttribute.getQName()) == null)
{
soapHeaderBlock.addAttribute(omAttribute);
}
}
to the addHeader function. I'm not sure, if this is a valid solution but it
works for us.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]