public static SOAPFactory getSoapFactory(String soapVersionURI) { if ("http://www.w3.org/2003/05/soap-envelope".equals(soapVersionURI)) return OMAbstractFactory.getSOAP12Factory(); else return OMAbstractFactory.getSOAP11Factory(); }
public SOAPFactory run() { if (isSOAP12Required) return OMAbstractFactory.getSOAP12Factory(); else return OMAbstractFactory.getSOAP11Factory(); } });
protected SOAPFactory getSoapFactory() { SOAPFactory soapFactory = null; if ((soapNamesapce != null) && soapNamesapce.equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) { soapFactory = OMAbstractFactory.getSOAP12Factory(); } else { // default is taken as soap 1.1 soapFactory = OMAbstractFactory.getSOAP11Factory(); } return soapFactory; }
public static SOAPFactory getSOAPFactory(int SOAPVersion) { if (SOAPVersion == Sandesha2Constants.SOAPVersion.v1_1) return OMAbstractFactory.getSOAP11Factory(); else return OMAbstractFactory.getSOAP12Factory(); } }
private static SOAPFactory getFactory(String soapVersionURI) { if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapVersionURI)) { return OMAbstractFactory.getSOAP11Factory(); } else if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapVersionURI)) { return OMAbstractFactory.getSOAP12Factory(); } else { throw new RuntimeException(org.apache.axis2.i18n.Messages .getMessage("unknownsoapversion")); } }
private SOAPFactory getSOAPFactory(MessageContext msgContext) throws AxisFault { String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI(); if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP11Factory(); } else { throw new AxisFault(Messages.getMessage("invalidSOAPversion")); } } }
public SOAPFactory getSOAPFactory(MessageContext msgContext) throws AxisFault { String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI(); if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP11Factory(); } else { throw new AxisFault(Messages.getMessage("invalidSOAPversion")); } }
public SOAPFactory getSOAPFactory(org.apache.axis2.context.MessageContext msgContext) throws AxisFault { String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI(); if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP11Factory(); } else { throw new AxisFault(Messages.getMessage("invalidSOAPversion")); } } }
public SOAPFactory getSOAPFactory(MessageContext msgContext) throws AxisFault { String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI(); if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP11Factory(); } else { throw new AxisFault(Messages.getMessage("invalidSOAPversion")); } }
private SOAPFactory getSOAPFactory(MessageContext msgContext) throws AxisFault { String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI(); if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP11Factory(); } else { throw new AxisFault(Messages.getMessage("invalidSOAPversion")); } } }
private static SOAPFactory getSOAPFactory(Options options) { String soapVersionURI = options.getSoapVersionURI(); if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapVersionURI)) { return OMAbstractFactory.getSOAP12Factory(); } else { // make the SOAP 1.1 the default SOAP version return OMAbstractFactory.getSOAP11Factory(); } } }
private SOAPFactory getSOAPFactory(String nsURI) throws AxisFault { if (nsURI == null) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP11Factory(); } else { throw new AxisFault(Messages.getMessage("invalidSOAPversion")); } }
private SOAPFactory getSOAPFactory(String nsURI) throws AxisFault { if (nsURI == null) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP11Factory(); } else { throw new AxisFault(Messages.getMessage("invalidSOAPversion")); } } }
private SOAPEnvelope getSOAPEnvFromOM(OMElement inlineElement) { SOAPFactory soapFactory; if (inlineElement.getQName().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) { soapFactory = OMAbstractFactory.getSOAP12Factory(); } else { soapFactory = OMAbstractFactory.getSOAP11Factory(); } StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(inlineElement.getXMLStreamReader(), soapFactory, inlineElement.getQName().getNamespaceURI()); return builder.getSOAPEnvelope(); }
private SOAPEnvelope createSOAPEnvelope(OMElement payload , String soapNamespaceUri) { SOAPFactory soapFactory = null; if (soapNamespaceUri.equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) { soapFactory = OMAbstractFactory.getSOAP12Factory(); } else { soapFactory = OMAbstractFactory.getSOAP11Factory(); } SOAPEnvelope envelope = soapFactory.getDefaultEnvelope(); envelope.getBody().addChild(payload); return envelope; } }
/** * Copied from {@link ServiceClient} */ protected SOAPFactory getSOAPFactory() { final String soapVersionURI = getOptions().getSoapVersionURI(); if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapVersionURI)) { return OMAbstractFactory.getSOAP12Factory(); } else { // make the SOAP 1.1 the default SOAP version return OMAbstractFactory.getSOAP11Factory(); } }
public AxisMessage encode(ClientOptions options, String message) throws Exception { AxisMessage result = new AxisMessage(); result.setMessageType("text/plain"); SOAPFactory factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope envelope = factory.getDefaultEnvelope(); OMElement wrapper = factory.createOMElement(BaseConstants.DEFAULT_TEXT_WRAPPER); wrapper.addChild(factory.createOMText(message)); envelope.getBody().addChild(wrapper); result.setEnvelope(envelope); return result; } };
public AxisMessage encode(ClientOptions options, String message) throws Exception { AxisMessage result = new AxisMessage(); result.setMessageType("text/plain"); SOAPFactory factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope envelope = factory.getDefaultEnvelope(); OMElement wrapper = factory.createOMElement(BaseConstants.DEFAULT_TEXT_WRAPPER); wrapper.addChild(factory.createOMText(message)); envelope.getBody().addChild(wrapper); result.setEnvelope(envelope); return result; } };
public static void testDeleteConnect() throws AxisFault { SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope(); envelope.getBody().addChild(createOMElement("<delete/>")); testCtx.setEnvelope(envelope); testConnect("delete", SalesforceUtil.SALESFORCE_SOBJECTS, new SetupDeleteSobjects()); }
protected void setUp() throws Exception { super.setUp(); SynapseConfiguration synCfg = new SynapseConfiguration(); AxisConfiguration config = new AxisConfiguration(); testCtx = new Axis2MessageContext(new org.apache.axis2.context.MessageContext(), synCfg, new Axis2SynapseEnvironment(new ConfigurationContext(config), synCfg)); ((Axis2MessageContext) testCtx).getAxis2MessageContext().setConfigurationContext(new ConfigurationContext(config)); SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope(); envelope.getBody().addChild(createOMElement("<sendEmail/>")); testCtx.setEnvelope(envelope); }