Jaxws and MTOM seems not to work - web-services

i want to send a docx document via a Webservice (jaxws) using MTOM.
Here is an excerpt of my wsdl:
<xsd:element name="createDocumentResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="docContent" type="xsd:base64Binary" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
I want to use MTOM, so I annotate the webservice with #MTOM
#WebService(endpointInterface = "de.xy.crm.services.ws...")
#MTOM(enabled = true, threshold = 1024)
public class MyWebservice....
The document's content is set like this:
byte[] convertedDocument = convert(docx);
CreateDocumentResponse response = new CreateDocumentResponse();
response.setDocContent(convertedDocument);
Now when I test it with SOAP UI, it seems that MTOM is enabled, but the actual content is not sent as attachment but inline:
HTTP/1.1 200 OK
Content-Type: multipart/related;start="<rootpart*5544634d-146f-42e7-9c76- 38efd118acfc#example.jaxws.sun.com>";type="application/xop+xml";boundary="uuid:5544634d-146f-42e7-9c76-38efd118acfc";start-info="text/xml"
Transfer-Encoding: chunked
Server: Jetty(8.1.3.v20120522)
--uuid:5544634d-146f-42e7-9c76-38efd118acfc
Content-Id: <rootpart*5544634d-146f-42e7-9c76- 38efd118acfc#example.jaxws.sun.com>
Content-Type: application/xop+xml;charset=utf-8;type="text/xml"
Content-Transfer-Encoding: binary
<?xml version="1.0" encoding="UTF-8"?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Header><version xmlns="http://ws.services.crm.vkb.de/BSIWebService/">2015.2.0.qualifier</version ></S:Header><S:Body><ns2:createDocumentResponse xmlns:ns2="http://ws.services.crm.vkb.de/BsiWebService/"> <docContent>UEsDBBQACAAIABVDnEYAAAAAAAAAAAAAAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbLWV y27CMBBFfyXytiKGLqqqIrDoY9kilUrdGm...
Where is my fault?

Using #MTOM annotation in conjunction with #WebService annotation in your JAX-WS webService should be enough to enable MTOM and to send the bytes as attachment from your server to the client.
However you're using #MTOM(enabled = true, threshold = 1024). In java documentation says the threshold parameter has the follow description:
Property for MTOM threshold value. When MTOM is enabled, binary data
above this size in bytes will be XOP encoded or sent as attachment.
The value of this property MUST always be >= 0. Default value is 0.
So the only thing that I think that could be wrong is that you're sending a document which its size not exceeds 1024. Try sending a bigger document, or removing threshold parameter on #MTOM annotation due this default value for it is 0 and each document will be sent as attachment.
Hope this helps,

Related

why does request format change after data mapper mediator

now I have came across a problem I can't resolve while using WSO2 EI.
The problem is I want to transform some data before the message reaching the endpoint by using data mapper mediator.
The sequence is:
sequence
datamapper
I want to change the node 'name' to 'name'
But if I don't use datamapper, I can print the message in my bak-end service like this:
--MIMEBoundary_dc7c91d3bcc67c948c17ffe48106a3f0875e3927d636256b
Content-Disposition: form-data; name="name"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
dfsdf
--MIMEBoundary_dc7c91d3bcc67c948c17ffe48106a3f0875e3927d636256b--
After using data mapper, the message print in my bak-end service like this:
<mediate><name2>dfsdf</name2></mediate>
It is obviously out of my suppose, I think I should did something wrong, can any one who can tell me how to resolve this?
Did you try by changing the output schema to contain only <name2>:[STRING] without any parent objects (by removing soapEnv Envelope and Body fields)

Coldfusion - HTTPS error / X.509 ws-security

I'm very new to SOAP, and this is my first project. I am trying to connect to a HTTPS WSDL in order to pull some information on my webpage.
There is a certificate setup ready for both local server connect with the service provider server. There is a response when I try to connect the https webservice, so I believe there is no connection issue between both server :
Here is the SOAPUI sample given from the third party technical team :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soap="http://soap.ipr.tfp.com/">
<soapenv:Header/>
<soapenv:Body>
<soap:create>
<arg0>
<attribute_1>abc</attribute_1>
<attribute_2></attribute_2>
<attribute_3>abc123</attribute_3>
<attribute_4>abc234</attribute_4>
<attribute_5></attribute_5>
</arg0>
</soap:create>
</soapenv:Body>
</soapenv:Envelope>
Below is my cfm code used to connect the Webservice :
<cfscript>
ws = CreateObject("webservice", [HTTPS URL]?wsdl);
//show web service methods for debugging purposes
writeDump(ws);
// construct arguments
args = {attribute_1="abc"
, attribute_2=""
, attribute_3="abc123"
, attribute_4="abc234"
, attribute_5=""
};
// call the method
result = ws.create(arg0=args);
writeDump(result)
</cfscript>
Issue :
I'm getting below error message when execute my cfm script :
Cannot perform web service invocation create.
The fault returned when invoking the web service operation is:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}AsymmetricBinding: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token: The received token does not match the token inclusion requirement
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}InitiatorToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}RecipientToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedParts: {http://schemas.xmlsoap.org/soap/envelope/}Body not SIGNED
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}EncryptedParts: {http://schemas.xmlsoap.org/soap/envelope/}Body not ENCRY...
Questions :
Is this error related to the SSL certificate setup in the ColdFusion keystore?
Anything wrong with my CFM script? Refer to the SOAPUI sample, the xml format is `[arg0] --> [attribute_1], [attribute_2] and so on. Can I pass the attributes this way?
result = ws.create(arg0=args);
The same service works from SoapUI tool. Am I missing anything here?
Thank you for your time. Your help is appreciated.
2016-05-30 - Update -
I tried to use the CFHTTP tag to submit the XML, but it seemed to return a differenct error:
<cfhttp
url = "[HTTPS URL]?wsdl"
method ="post"
result ="httpResponse"
charset ="utf-8">
<cfhttpparam
type="header"
name="accept-encoding"
value="no-compression"
/>
<cfhttpparam
type="xml"
value="#trim( soapBody )#"
/>
</cfhttp>
Error:
Here is the error message in the file content :
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
AsymmetricBinding: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
X509Token: The received token does not match the token inclusion requirement
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
X509Token
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
InitiatorToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
RecipientToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
IncludeTimestamp: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
SignedParts: {http://schemas.xmlsoap.org/soap/envelope/}
Body not SIGNED
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
EncryptedParts:
{http://schemas.xmlsoap.org/soap/envelope/}
Body not ENCRYPTED
</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
The error message seems similar to cfobject tag. When I read closely in the error message, it seemed related with the X.509 ws-security encryption where the SOAP content needs to encrypted before send to the Web service request.
After did some research, the encryption flow seem work as below:
Save SOAP content into temp folder.
Used Java Class file to encrypt the SOAP content into X.509 ws-security format.
Sent new encrypted SOAP content to Webservice.
I have no idea how CF works with Java class files. Has anyone done the same encryption conversion before?
In your code to connect to web service, change
ws = CreateObject("webservice", [HTTPS URL]);
to
ws = CreateObject(
"webservice",
"[HTTPS URL]",
{wsversion="1"}
);
in case only Axis 1 works for you.
Also check at the other end, if your using ColdFusion to expose the web service make sure is set up for Axis 1.

Calling multiple WCF and asmx web services dynamically without generating proxy or using WSDL

We connect with multiple (20-30) third-party web services within our C# Batch Application. We are attempting to find the best way to call these web services dynamically (without generating proxy or using wsdl). All the third party agencies endpoints or URL's will be configured in database table. Client app will check the URL at run-time and make a service call. We are not worried about async calls it’s all synchronized process.
SQL Table : Client-configuration
Client URL Method IsActive
A http://serverhost/ClientA/Service1.svc Submit 1
B http://serverhost/ClientB/Service2.asmx Submit 1
The only issue is we are not sure about the third party service implementation is WCF or asmx. I have read few articles online to use HttpWebRequest to call web services dynamically (without generating proxies/wsdl.)
Is this the best way to implement this or any concerns I need to think of?
Please see below ex:
public static void CallWebService(string xml)
{
var _Url = "http://serverhost/ClientA/Service1.svc";
var _action = "http://serverhost/ClientA/Service1.svc/Submit";
try
{
ASCIIEncoding encoder = new ASCIIEncoding();
byte[] data = encoder.GetBytes(xml);
XmlDocument soapEnvelopeXml = CreateSoapEnvelope(xml);
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(_Url);
webRequest.Headers.Add("SOAPAction", _action);
webRequest.ContentType = "text/xml;charset=\"utf-8\"";
webRequest.ContentLength = data.Length;
webRequest.Accept = "text/xml";
webRequest.Method = "POST";
Stream webStream = webRequest.GetRequestStream();
webStream.Write(data, 0, data.Length);
webStream.Close();
WebResponse response = webRequest.GetResponse();
Stream responseStream = response.GetResponseStream();
using (StreamReader sr = new StreamReader(responseStream))
{
string s = sr.ReadToEnd();
}
}
catch (Exception ex)
{
responseStream = ex.Response.GetResponseStream();
}
}
Here is the details shared by one of the client.
http://setup.localhost.com/ClientA/Service1.asmx
Operation : Submit
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be
replaced with actual values.
POST /ClientA/Service1.asmx HTTP/1.1
Host: setup.localhost.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://setup.localhost.com/Submit"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Submit xmlns="http://setup.localhost.com/">
<eCitXML>string</eCitXML>
<eCitPdf>base64Binary</eCitPdf>
<eCitKey>string</eCitKey>
</Submit>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SubmitResponse xmlns="http://setup.localhost.com/">
<SubmitResult>string</SubmitResult>
</SubmitResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be
replaced with actual values.
POST /ClientA/Service1.asmx HTTP/1.1
Host: setup.localhost.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-
envelope">
<soap12:Body>
<Submit xmlns="http://setup.localhost.com/">
<eCitXML>string</eCitXML>
<eCitPdf>base64Binary</eCitPdf>
<eCitKey>string</eCitKey>
</Submit>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-
envelope">
<soap12:Body>
<SubmitResponse xmlns="http://setup.localhost.com/">
<SubmitResult>string</SubmitResult>
</SubmitResponse>
</soap12:Body>
</soap12:Envelope>
I think your question could be rephrased as
Is there a generic method to call any SOAP 1.1 or 1.2 web service operation without prior knowledge of the service operation except for the SOAP action and URL?
I'm assuming that all the third party web services expose a common operation which accepts and returns the same types.
If this is the case then providing you model the service operation contract correctly you could use ChannelFactory to call all the services.
Calling WCF services is straightforward in this manner, but to call asmx services you'd need to do a bit more work. So your client code would need to know if the service was asmx or wcf, and moreover, if wcf, whether the service is soap 1.1 or 1.2.
I must say I'm struggling to understand what advantage you will have once you have achieved this. I can see the value if you owned all the 20+ services you were calling, but this clearly is not the case.
Granted, you won't have a ton of nasty generated service reference code, but the whole point of WSDL is it allows for machine generated service contracts. If the third party services make any breaking changes you'll need to manually synchronize these inside your client code, rather than just regenerating the client.

JAXB Marshsall issue Weblogic12c

Issue
Application migration to 12c and jaxb is not working on it
Description
The application is currently on Weblogic 10 and consumes some webservices. We post the XML directly to the webservice using HttpURLConnection. Before posting we marshal the request and after receiving the response we unmarshall them
The app needs to be migrated on 12c and when we tested the app on 12c , it was not working the same. The request that was sent to the webservice had a difference.Please see below the schema, java classes and marshalled request
Refund.xsd
----------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:avis="http://www.avis.com/XMLSchema" elementFormDefault="unqualified">
<xsd:element name="RefundRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Request" avis:usage="ups"/>
<xsd:element ref="DeliveryNumber" avis:usage="ups"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!-- Request and DeliveryNumber attributes her -->
Generated the Refund.java and related classes using Eclipse-->Generate--> JAxB classes.
am behind a firewall and in teh JAXB wizard it did ask me for a proxy. I didnt provide any poxy. Generted class
Refund.java
#XmlAccessorType(XmlAccessType.FIELD)
#XmlType(name = "",propOrder = {
"request",
"barCodeDeliveryNumber"
})
#XmlRootElement(name = "TrackRequest")
public class RefundRequest{
#XmlElement(name = "Request", required = true)
protected Request request;
#XmlElement(name = "DeliveryNumber", required = true)
protected String deliveryNumber;
/**
* Gets the value of the request property.
*
* #return
* possible object is
* {#link Request }
*
*/
public Request getRequest() {
return request;
}
/**
* Sets the value of the request property.
*
* #param value
* allowed object is
* {#link Request }
*
*/
public void setRequest(Request value) {
this.request = value;
}
/**
* Gets the value of the DeliveryNumber property.
*
* #return
* possible object is
* {#link String }
*
*/
public String getDeliveryNumber() {
return barCodeDeliveryNumber;
}
/**
* Sets the value of the barCodeDeliveryNumber property.
*
* #param value
* allowed object is
* {#link String }
*
*/
public void setDeliveryNumber(String value) {
this.barCodeDeliveryNumber = value;
}
Am marshalling the object to XML(see below) and passing it to the web service . Web service returns "XML not well formed"
App Library
javax.annotation_1.0.jar
javax.annotation_1.1.jar
javax.persistence_1.0.0.0_1-0.jar
javax.persistence_1.0.1.0_1-0.jar
javax.xml.bind_2.0.jar
javax.xml.bind_2.1.1.jar
jaxb-api.jar
jaxb-impl.jar
jaxws-api.jar
jaxws-rt.jar
jsr181-api.jar
jsr250-api.jar
Weblogic 12c using jrockit160_29
Code Snippet
private static Marshaller mreqinfo;
JAXBContext jxcreq =JAXBContext.newInstance(RefundRequest.class.getPackage().getName());
mreqinfo=jxcreq.createMarshaller();
mreqinfo.marshall(refundRequestObj)
Looking at the logs , i could see the teh following marshalled request on weblogic 12c.
There is an xmlns:ns0="" which i think is creating the problem
**Marshalled Request - not working one when tried in weblogic 12c jrockit160_29
.**
Need to get rid of the xmlns:ns0=""
<?xml version="1.0" encoding="UTF-8"?>
<RefundRequest xmlns:ns0="">
<Request>
<TransactionReference>
<CustomerContext>YILE00010208201120.04.08.4|11/22/2013 12:28:31:085</CustomerContext>
</TransactionReference>
<RequestAction>Refund</RequestAction>
</Request>
<DeliveryNumber>974869</DeliveryNumber>
</RefundRequest>
***Marshalled Request in Weblogic 10 (existing working version in weblogic 10 jrockit160_29
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RefundRequest>
<Request>
<TransactionReference>
<CustomerContext>YILE00010208201120.04.08.4|11/22/2013 12:28:31:085</CustomerContext>
</TransactionReference>
<RequestAction>Refund</RequestAction>
</Request>
<DeliveryNumber>974869</DeliveryNumber>
</RefundRequest>
In WebLogic 12.1.1 which you are using EclipseLink JAXB (MOXy) is used as the default JAXB (JSR-222) provider (see: http://blog.bdoughan.com/2011/12/eclipselink-moxy-is-jaxb-provider-in.html). The issue that you are hitting is due to a bug that has since been fixed in the EclipseLink 2.3.3 release (current release is EclipseLink 2.5.1).
Below is a link with instructions on using a newer version of EclipseLink in WebLogic:
http://blog.bdoughan.com/2012/10/updating-eclipselink-in-weblogic.html
If you are an Oracle Support customer then you can communicate with them to request an official patch for this issue.
To fix this issue, you can add your own jaxb jars (jaxb-core.jar, jaxb-impl.jar) by overriding the jaxb jars in Weblogic 12c. You can do this by placing your own jaxb jars into your war, under WEB-INF/lib and configure the weblogic.xml by using the prefer-web-inf-classes element tag. Then place the weblogic.xml under WEB-INF directory of your war
prefer-web-inf-classes Element
The weblogic.xml Web application deployment descriptor contains a
element (a sub-element of the
element). By default, this element is set to
False. Setting this element to True subverts the classloader
delegation model so that class definitions from the Web application
are loaded in preference to class definitions in higher-level
classloaders. This allows a Web application to use its own version of
a third-party class, which might also be part of WebLogic Server.
Refer to this link for more details
http://docs.oracle.com/cd/E13222_01/wls/docs90/programming/classloading.html
weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
<wls:weblogic-version>12.1.</wls:weblogic-version>
<wls:container-descriptor>
<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
</wls:container-descriptor>
<wls:container-descriptor>
<wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled>
</wls:container-descriptor>
<wls:context-root>your_context_root_name</wls:context-root>
Had the same problem: JAXB placing prefixes like < ns0:TagName>.
Solved by adding prefer-application-resources to weblogic-application.xml:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-application>
<prefer-application-resources>
<resource-name>META-INF/services/javax.xml.bind.*</resource-name>
</prefer-application-resources>
</weblogic-application>

How do I create a Mule ESB Service to HTTP POST using name/value pairs?

I need to create a mule service that will POST data to a web service that expects name/value pairs (not xml), then process the XML response from that service. I cannot find a good example on how to prep the payload for an http POST.
Can someone provide some insight or examples?
What I have so far is (I don't know if 'PathToTransformerClass' is needed):
<service name="myService">
<inbound>
<vm:inbound-endpoint path="myService.request" synchronous="true">
<custom-transformer class="PathToTransformerClass" />
</vm:inbound-endpoint>
</inbound>
<outbound>
<pass-through-router>
<http:outbound-endpoint address="URIofWebServiceToPostTo" method="POST" synchronous="true">
<response-transformers>
<custom-transformer class="PathToClassToProcessTheResponse" />
</response-transformers>
</http:outbound-endpoint>
</pass-through-router>
</outbound>
</service>
The following might be helpful: http://comments.gmane.org/gmane.comp.java.mule.user/29342
I can't find any examples either, but it looks like the built-in HTTP transformers are
http-response-to-object-transformer A
transformer that converts an HTTP
response to a Mule Message. The
payload may be a String, stream, or
byte array.
http-response-to-string-transformer
Converts an HTTP response payload
into a string. The headers of the
response will be preserved on the
message.
object-to-http-request-transformer
This transformer will create a valid
HTTP request using the current message
and any HTTP headers set on the
current message.
message-to-http-response-transformer
This transformer will create a valid
HTTP response using the current
message and any HTTP headers set on
the current message.
object-to-http-request-transformer might be your best bet; perhaps you can create a map of key-value pairs and then convert that into URL encoded form? Not sure but hopefully this gives you some things to Google.
Are you asking about how to take XML and create key value pairs to send out via HTTP? For that you can use an XLST transformer where in the XSL you set the method output to be text.
1) Let variables=<map><entry><string>idEvent_Type</string><string>1</string></entry></map>&options=user:admin
be the Map body to post as HTTP request.
2) URL encode it (eg. using http://meyerweb.com/eric/tools/dencoder/)
which produce :
variables%3D%3Cmap%3E%3Centry%3E%3Cstring%3EidEvent_Type%3C%2Fstring%3E%3Cstring%3E1%3C%2Fstring%3E%3C%2Fentry%3E%3C%2Fmap%3E%26options%3Duser%3Aadmin
3) then create a Mule set-payload transformer :
<set-payload value="variables%3D%3Cmap%3E%3Centry%3E%3Cstring%3EidEvent_Type%3C%2Fstring%3E%3Cstring%3E1%3C%2Fstring%3E%3C%2Fentry%3E%3C%2Fmap%3E%26options%3Duser%3Aadmin
" doc:name="Set playload"/>
4) then create a Mule HTTP endpoint :
<http:outbound-endpoint exchange-pattern="request-response" host="..." port="..." path="..." user="..." password="..." contentType="application/x-www-form-urlencoded" doc:name="POSTHTTPRequest"/>
and it works
Maybe U can give a try using Object-to-http-request-transformer as this transformer will create a valid HTTP request using the message currently received and any HTTP headers set on the current message.
Have never tried it, but that is the only transformer I can get in my mind after reading ur query...hope it works.. :D