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")); } }
/** * * @return */ public static SOAPEnvelope createSOAPEnvelope() { SOAPFactory factory = OMAbstractFactory.getSOAP12Factory(); return factory.createSOAPEnvelope(); }
/** * * @return */ public static SOAPBody createSOAPBody(SOAPEnvelope envelope) { SOAPFactory factory = OMAbstractFactory.getSOAP12Factory(); return factory.createSOAPBody(envelope); }
/** * * @return */ public static SOAPHeader createSOAPHeader(SOAPEnvelope envelope) { SOAPFactory factory = OMAbstractFactory.getSOAP12Factory(); return factory.createSOAPHeader(envelope); }
public static SOAPFactory getSOAPFactory(int SOAPVersion) { if (SOAPVersion == Sandesha2Constants.SOAPVersion.v1_1) return OMAbstractFactory.getSOAP11Factory(); else return OMAbstractFactory.getSOAP12Factory(); } }
public static SOAPFactory getSoapFactory(String soapVersionURI) { if ("http://www.w3.org/2003/05/soap-envelope".equals(soapVersionURI)) return OMAbstractFactory.getSOAP12Factory(); else return OMAbstractFactory.getSOAP11Factory(); }
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(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")); } } }
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 void setClientSessionID(String id) { SOAPFactory soapFactory = OMAbstractFactory.getSOAP12Factory(); OMNamespace synNamespace = soapFactory. createOMNamespace("http://ws.apache.org/namespaces/synapse", "syn"); SOAPHeaderBlock header = soapFactory.createSOAPHeaderBlock("ClientID", synNamespace); header.setText(id); client.addHeader(header); }
public void setClientSessionID(String id) { SOAPFactory soapFactory = OMAbstractFactory.getSOAP12Factory(); OMNamespace synNamespace = soapFactory. createOMNamespace("http://ws.apache.org/namespaces/synapse", "syn"); SOAPHeaderBlock header = soapFactory.createSOAPHeaderBlock("ClientID", synNamespace); header.setText(id); client.addHeader(header); }
public static void setStAXPayload(MessageContext mc, XMLStreamReader streamReader) { if (mc.getEnvelope() == null) { try { mc.setEnvelope(OMAbstractFactory.getSOAP12Factory().createSOAPEnvelope()); } catch (Exception e) { throw new SynapseException(e); } setStAXPayload(mc.getEnvelope(), streamReader); } } }
public static void setXMLPayload(MessageContext mc, OMElement element) { if (mc.getEnvelope() == null) { try { mc.setEnvelope(OMAbstractFactory.getSOAP12Factory() .createSOAPEnvelope()); } catch (Exception e) { throw new SynapseException(e); } } setXMLPayload(mc.getEnvelope(), element); }
public static void setBinaryPayload(MessageContext mc, DataHandler dh) { if (mc.getEnvelope() == null) { try { mc.setEnvelope(OMAbstractFactory.getSOAP12Factory() .createSOAPEnvelope()); } catch (Exception e) { throw new SynapseException(e); } } setBinaryPayload(mc.getEnvelope(), dh); }
public static void setMapPayload(MessageContext mc, SimpleMap map) { if (mc.getEnvelope() == null) { try { mc.setEnvelope(OMAbstractFactory.getSOAP12Factory() .createSOAPEnvelope()); } catch (Exception e) { throw new SynapseException(e); } } setMapPayload(mc.getEnvelope(), map); }
public static void setTextPayload(MessageContext mc, String text) { if (mc.getEnvelope() == null) { try { mc.setEnvelope(OMAbstractFactory.getSOAP12Factory() .createSOAPEnvelope()); } catch (Exception e) { throw new SynapseException(e); } } setTextPayload(mc.getEnvelope(), text); }