@Override public SOAPFactory getSOAPFactory(OMMetaFactory metaFactory) { return metaFactory.getSOAP11Factory(); }
@Override public SOAPFactory getSOAPFactory(OMMetaFactory metaFactory) { return metaFactory.getSOAP11Factory(); }
/** * Get the default SOAP 1.1 OM factory instance. This method has the same effect as calling * {@link OMMetaFactory#getSOAP11Factory()} on the {@link OMMetaFactory} instance returned by * {@link #getMetaFactory()}. * * @return the default SOAP 1.1 OM factory instance * @throws OMException if the factory's implementation class can't be found * or if the class can't be instantiated */ public static SOAPFactory getSOAP11Factory() { return getMetaFactory().getSOAP11Factory(); }
/** * Create a new <code>SOAPEnvelope</code> of the same version as the * SOAPEnvelope in the given <code>MessageContext</code> * * @param nsUri * @return SOAPEnvelope */ public static SOAPEnvelope createSOAPEnvelope(String nsUri) { OMMetaFactory domFac = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM); if (nsUri != null && SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsUri)) { return domFac.getSOAP11Factory().getDefaultEnvelope(); } else { return domFac.getSOAP12Factory().getDefaultEnvelope(); } }
/** * Create a DOM Document using the org.apache.axiom.soap.SOAPEnvelope * * @param env An org.apache.axiom.soap.SOAPEnvelope instance * @return the org.apache.axis2.soap.impl.dom.SOAPEnvelopeImpl of the given SOAP Envelope */ public static Element toDOOMSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope env) { env.build(); //Check the namespace and find SOAP version and factory String nsURI; OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM); SOAPFactory factory; if (env.getNamespace().getNamespaceURI() .equals(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)) { nsURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI; factory = metaFactory.getSOAP11Factory(); } else { nsURI = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI; factory = metaFactory.getSOAP11Factory(); } StAXSOAPModelBuilder stAXSOAPModelBuilder = new StAXSOAPModelBuilder(env.getXMLStreamReader(), factory, nsURI); SOAPEnvelope envelope = (stAXSOAPModelBuilder).getSOAPEnvelope(); envelope.build(); return (Element)envelope; }
} else { soapEnvelope = metaFactory.getSOAP11Factory().getDefaultEnvelope();
} else { soapEnvelope = metaFactory.getSOAP11Factory().getDefaultEnvelope();
/** * Create a DOM Document using the org.apache.axiom.soap.SOAPEnvelope * * @param env An org.apache.axiom.soap.SOAPEnvelope instance * @return the DOM Document of the given SOAP Envelope */ public static Document getDocumentFromSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope env) { env.build(); //Check the namespace and find SOAP version and factory String nsURI; OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM); SOAPFactory factory; if (env.getNamespace().getNamespaceURI() .equals(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)) { nsURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI; factory = metaFactory.getSOAP11Factory(); } else { nsURI = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI; factory = metaFactory.getSOAP12Factory(); } StAXSOAPModelBuilder stAXSOAPModelBuilder = new StAXSOAPModelBuilder(env.getXMLStreamReader(), factory, nsURI); SOAPEnvelope envelope = (stAXSOAPModelBuilder).getSOAPEnvelope(); envelope.build(); Element envElem = (Element)envelope; return envElem.getOwnerDocument(); }
SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)) { nsURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI; factory = metaFactory.getSOAP11Factory(); } else { nsURI = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
log.debug("Starting to process SOAP 1.2 message"); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(namespaceURI)) { soapFactory = (SOAPFactoryEx)metaFactory.getSOAP11Factory(); log.debug("Starting to process SOAP 1.1 message"); } else {
soapFactory = metaFactory.getSOAP11Factory(); } else if (type.equals(SOAPVersion.SOAP12.getMediaType())) { soapFactory = metaFactory.getSOAP12Factory();
InvocationContextImpl contextImpl = (InvocationContextImpl)context; OperationHandler operationHandler = invocation.getOperation().getAdapter(OperationHandler.class); SOAPFactory factory = metaFactory.getSOAP11Factory(); SOAPEnvelope request = factory.createSOAPEnvelope(); if (!operationHandler.isSuppressSOAPHeader()) {
charset = null; isMTOM = false; soapFactory = metaFactory.getSOAP11Factory(); soapEnvelopeNamespaceURI = null; } else { soapFactory = metaFactory.getSOAP11Factory(); } else if (soapContentType.equals(MediaType.APPLICATION_SOAP_XML)) { soapEnvelopeNamespaceURI = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
soapFactory = metaFactory.getSOAP11Factory(); } else if (soapContentType.equals(MediaType.APPLICATION_SOAP_XML)) { soapFactory = metaFactory.getSOAP12Factory();