Buenas The emitter references SOAP MEP when building the methodElement ...as seen in AxisServiceBasedMultiLanguageEmitter.java //build the method based on //serviceName //binding e.g. databinding(s) are adb, xmlbeans, jibx and jaxbri (Default: adb). Element methodElement = generateMethodElement(doc, serviceName, axisBindingOperation); if (WSDL2Constants.URI_WSOAP_MEP.equalsIgnoreCase(mep)) { // "http://www.w3.org/2003/05/soap/mep/soap-response/" methodElement.appendChild(generateOptionParamComponent(doc, "org.apache.axis2.Constants.Configuration.ENABLE_REST", // "enableREST"; "true")); methodElement.appendChild(generateOptionParamComponent(doc, "org.apache.axis2.Constants.Configuration.HTTP_METHOD", //"HTTP_METHOD" "\"" + org.apache.axis2.Constants.Configuration .HTTP_METHOD_GET + //"GET" "\"")); methodElement.appendChild(generateOptionParamComponent(doc, "org.apache.axis2.Constants.Configuration.CONTENT_TYPE", //"ContentType"; "\"" + org.apache.axis2.transport.http.HTTPConstants .MEDIA_TYPE_X_WWW_FORM + //"application/x-www-form-urlencoded"; "\"")); methodElement.appendChild(generateOptionParamComponent(doc, "org.apache.axis2.Constants.Configuration.MESSAGE_TYPE", //"messageType" "\"" + org.apache.axis2.transport.http.HTTPConstants .MEDIA_TYPE_X_WWW_FORM + //"application/x-www-form-urlencoded"; "\"")); methodElement.appendChild(generateOptionParamComponent(doc, "org.apache.axis2.Constants.Configuration.SOAP_RESPONSE_MEP", //soapResponseMEP" "true"));
To understand content-type we can look at W3C to quote " 17.13.4 Form content types The enctype attribute of the FORM element specifies the content type used to encode the form data set for submission to the server. User agents must support the content types listed below. Behavior for other content types is unspecified. Please also consult the section on escaping ampersands in URI attribute values. application/x-www-form-urlencoded This is the default content type. Forms submitted with this content type must be encoded as follows: Control names and values are escaped. Space characters are replaced by `+', and then reserved characters are escaped as described in [RFC1738], section 2.2: Non-alphanumeric characters are replaced by `%HH', a percent sign and two hexadecimal digits representing the ASCII code of the character. Line breaks are represented as "CR LF" pairs (i.e., `%0D%0A'). The control names/values are listed in the order they appear in the document. The name is separated from the value by `=' and name/value pairs are separated from each other by `&'. MG>Notice previous assumption of 'Form' Submission "application/x-www-form-urlencoded" to Server but this will be corrected MG> later on by axis2 TransportUtils createDocumentElement as seen here public static OMElement createDocumentElement(String contentType, MessageContext msgContext, InputStream inStream) throws AxisFault, XMLStreamException { String type = null; if (contentType != null) { // pull type out of contentType stack parameter int index = contentType.indexOf(';'); if (index > 0) { type = contentType.substring(0, index); } else { type = contentType; ... // Some services send REST responces as text/xml. We should convert it to // application/xml if its a REST response, if not it will try to use the SOAPMessageBuilder. // isDoingREST should already be properly set by HTTPTransportUtils.initializeMessageContext if (msgContext.isDoingREST() && HTTPConstants.MEDIA_TYPE_TEXT_XML.equals(type)) //"text/xml"; { if (msgContext.isServerSide()) { if (msgContext.getSoapAction() == null) { //soapAction = null should never be the case but lets assign default type to "application/xml" type = HTTPConstants.MEDIA_TYPE_APPLICATION_XML; // "application/xml"; } // } else if (msgContext.isDoingREST() && // !msgContext.isPropertyTrue(Constants.Configuration.SOAP_RESPONSE_MEP)) { } else if (!msgContext.isPropertyTrue(Constants.Configuration.SOAP_RESPONSE_MEP)) { // "soapResponseMEP" type = HTTPConstants.MEDIA_TYPE_APPLICATION_XML; //"application/xml"; } Entiendes? Saludos Cordiales desde EEUU Martin ______________________________________________ Porfavor..no altere ni interrumpir esta communicacion...Gracias Date: Wed, 24 Jul 2013 10:13:36 +0100 From: enricj...@yahoo.es Subject: SOAP MEP and WSDL MEP To: java-user@axis.apache.org I have a doubt about the SOAP MEP feature ( http://www.w3.org/2003/05/soap/mep/soap-response): I guess SOAP Envelopes convey MEP information. Is that true? Is there any example of raw envelopes? I can't find any example (neither in the SOAP specification) Does someone know of any example of a SOAP MEP showing the exchange of raw envelopes? In Axis2 I see examples of WSDL MEP, but I don't find in Axis2 any example of SOAP MEP. Is this feature implemented? Sincerely/Enric