axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Morten Frank (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-3308) SOAP header block attributes
Date Fri, 26 Oct 2007 12:11:50 GMT
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


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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message