use of org.apache.axiom.soap.impl.llom.soap11.SOAP11HeaderBlockImpl in project wso2-synapse by wso2.
the class MessageHelperTest method testCloneSoapEnvelope.
public void testCloneSoapEnvelope() {
SOAPFactory soapFactory;
SOAPHeaderBlock header;
OMFactory omFactory = OMAbstractFactory.getOMFactory();
// Creating a namespace for the header
OMNamespace ns = omFactory.createOMNamespace("http://ws.apache.org/axis2", "hns");
OMElement childNode = omFactory.createOMElement("Child", ns);
// testing SOAP 1.1
soapFactory = OMAbstractFactory.getSOAP11Factory();
// creating a SOAP header block
header = new SOAP11HeaderBlockImpl("CustomHeader", ns, soapFactory);
performTestForCloneEnvelope(soapFactory, header, childNode);
// testing SOAP 1.1
soapFactory = OMAbstractFactory.getSOAP12Factory();
header = new SOAP12HeaderBlockImpl("CustomHeader", ns, soapFactory);
performTestForCloneEnvelope(soapFactory, header, childNode);
}
Aggregations