[
https://issues.apache.org/jira/browse/AXIS2-3308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Amila Chinthaka Suriarachchi resolved AXIS2-3308.
-------------------------------------------------
Resolution: Fixed
Already fixed
> SOAP header block attributes
> ----------------------------
>
> Key: AXIS2-3308
> URL: https://issues.apache.org/jira/browse/AXIS2-3308
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3
> Environment: Windows XP, JDK 1.6
> Reporter: Morten Frank
> Assignee: Amila Chinthaka Suriarachchi
>
> Method: org.apache.axis2.client.Stub.addHeader ignores attributes needed in
> SOAP header block.
> Original method:
> protected void addHeader(OMElement omElementToadd, SOAPEnvelope envelop,
> boolean mustUnderstand) {
> SOAPHeaderBlock soapHeaderBlock =
> envelop.getHeader().addHeaderBlock(omElementToadd.getLocalName(),omElementToadd.getNamespace());
> soapHeaderBlock.setMustUnderstand(mustUnderstand);
> OMNode omNode = null;
> for (Iterator iter = omElementToadd.getChildren(); iter.hasNext();){
> omNode = (OMNode) iter.next();
> soapHeaderBlock.addChild(omNode);
> }
> }
> This change works:
> protected void addHeader(OMElement omElementToadd, SOAPEnvelope envelop,
> boolean mustUnderstand) {
> SOAPHeaderBlock soapHeaderBlock =
>
> envelop.getHeader().addHeaderBlock(omElementToadd.getLocalName(),omElementToadd.getNamespace());
> soapHeaderBlock.setMustUnderstand(mustUnderstand);
> OMNode omNode = null;
> for (Iterator iter = omElementToadd.getChildren(); iter.hasNext();) {
> omNode = (OMNode) iter.next();
> soapHeaderBlock.addChild(omNode);
> }
> OMAttribute omAtt = null;
> for (Iterator i = omElementToadd.getAllAttributes(); i.hasNext(); ) {
> omAtt = (OMAttribute)i.next();
> soapHeaderBlock.addAttribute(omAtt);
> }
> }
--
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]