/** * Converts the SOAP version of the message context. Creates a new envelope of the given SOAP * version, copy headers and bodies from the old envelope and sets the new envelope to the same * message context. * * @param axisOutMsgCtx messageContext where version conversion is done * @param soapVersionURI either org.apache.axis2.namespace.Constants.URI_SOAP12_ENV or * org.apache.axis2.namespace.Constants.URI_SOAP11_ENV * @throws AxisFault in case of an error in conversion */ public static void convertSoapVersion(org.apache.axis2.context.MessageContext axisOutMsgCtx, String soapVersionURI) throws AxisFault { if (org.apache.axis2.namespace.Constants.URI_SOAP12_ENV.equals(soapVersionURI)) { convertSOAP11toSOAP12(axisOutMsgCtx); } else if (org.apache.axis2.namespace.Constants.URI_SOAP11_ENV.equals(soapVersionURI)) { convertSOAP12toSOAP11(axisOutMsgCtx); } else { throw new SynapseException("Invalid soapVersionURI:" + soapVersionURI); } }
public void testSOAP12To11Conversion() throws Exception { MessageContext msgCtx = TestUtils.getAxis2MessageContext("<test/>", null). getAxis2MessageContext(); msgCtx.setEnvelope(getSOAP12Envelope()); SOAPUtils.convertSOAP12toSOAP11(msgCtx); assertXMLEqual(getSOAP11Envelope().toString(), msgCtx.getEnvelope().toString()); }
public void testSOAP11To12Conversion() throws Exception { MessageContext msgCtx = TestUtils.getAxis2MessageContext("<test/>", null). getAxis2MessageContext(); msgCtx.setEnvelope(getSOAP11Envelope()); SOAPUtils.convertSOAP11toSOAP12(msgCtx); assertXMLEqual(getSOAP12Envelope().toString(), msgCtx.getEnvelope().toString()); }
newSOAPFaultValue.setText(getMappingSOAP12Code(s11Code));
if(value.getTextAsQName() != null) { newSOAPFaultCode.setText( getMappingSOAP11Code(value.getTextAsQName()));
newSOAPFaultValue.setText(getMappingSOAP12Code(s11Code));
if(value.getTextAsQName() != null) { newSOAPFaultCode.setText( getMappingSOAP11Code(value.getTextAsQName()));
/** * Converts the SOAP version of the message context. Creates a new envelope of the given SOAP * version, copy headers and bodies from the old envelope and sets the new envelope to the same * message context. * * @param axisOutMsgCtx messageContext where version conversion is done * @param soapVersionURI either org.apache.axis2.namespace.Constants.URI_SOAP12_ENV or * org.apache.axis2.namespace.Constants.URI_SOAP11_ENV * @throws AxisFault in case of an error in conversion */ public static void convertSoapVersion(org.apache.axis2.context.MessageContext axisOutMsgCtx, String soapVersionURI) throws AxisFault { if (org.apache.axis2.namespace.Constants.URI_SOAP12_ENV.equals(soapVersionURI)) { convertSOAP11toSOAP12(axisOutMsgCtx); } else if (org.apache.axis2.namespace.Constants.URI_SOAP11_ENV.equals(soapVersionURI)) { convertSOAP12toSOAP11(axisOutMsgCtx); } else { throw new SynapseException("Invalid soapVersionURI:" + soapVersionURI); } }
SOAPUtils.convertSOAP12toSOAP11(responseCtx); SOAPUtils.convertSOAP11toSOAP12(responseCtx);
SOAPUtils.convertSOAP12toSOAP11(axisOutMsgCtx); SOAPUtils.convertSOAP11toSOAP12(axisOutMsgCtx);
SOAPUtils.convertSOAP12toSOAP11(axisOutMsgCtx); SOAPUtils.convertSOAP11toSOAP12(axisOutMsgCtx);
SOAPUtils.convertSOAP12toSOAP11(axisOutMsgCtx); SOAPUtils.convertSOAP11toSOAP12(axisOutMsgCtx);
SOAPUtils.convertSOAP12toSOAP11(axisOutMsgCtx); SOAPUtils.convertSOAP11toSOAP12(axisOutMsgCtx);
SOAPUtils.convertSOAP12toSOAP11(response); } else { SOAPUtils.convertSOAP11toSOAP12(response);