I'm trying to figure out how to call a legacy  HTTP  interface from the esb
bus.

It expects an URL:     http://host/issue?voucher='xml document'   with an
http POST.

sequence:
1) receive a soap request (proxy)
2) xlst mediator  (builds the  xml document to be posted).
3) then a POX endpoint   with URl   http://host/issue

1. The message send to the server however doesn't have "Content-Length:"
set.
2. The start of the http POST part  "voucher="  is missing.
3. Also It isn't Content-Type: application/x-www-form-urlencoded  but rather
application/xml; charset=UTF-8
(It can be www-form-urlencoded... with REST/GET  but then its not a POST...)

Any idea how I can make it  application/x-www-form-urlencoded, and with the
voucher= parameter.



*example of a working (without esb) call*
POST /vts/issue HTTP/1.1
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXX
User-Agent: Jakarta Commons-HttpClient/3.1
Host: XX.XX.XX
Cookie: $Version=0; JSESSIONID=16ami6ulq3mqr; $Path=/vts
Content-Length: 358
Content-Type: application/x-www-form-urlencoded

voucher=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3CVoucher+xmlns%3D%22urn%3Aietf%3Aparams%3Axml%3Ans%3Avts-issue%22+title%3D%22dfdadfdsfsa%22+key%3D%221233455%22+ean8%3D%221233455%22%3E%3CDescription%3Egsfdgfdgf%3C%2FDescription%3E%3CIssuer+name%3D%22op%22%2F%3E%3CHolder+phone-number%3D%22%2B31655325465%22%2F%3E%3C%2FVoucher%3E

*What I got now*
POST http://192.168.6.108:100/vts/issue?voucher= HTTP/1.1
Host: XX.XX.XX.XX
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXX
SOAPAction: ""
Content-Type: application/xml; charset=UTF-8
Transfer-Encoding: chunked
Connection: Keep-Alive
User-Agent: Synapse-HttpComponents-NIO

d7
<Voucher xmlns="urn:ietf:params:xml:ns:vts-issue" ean8="123456" key="123456"
title="Hier is uw ticket">
<Description>Bla</Description>
<Issuer name="op" />
<Holder email="[EMAIL PROTECTED]" />
</Voucher>
0



Regards,
Harm
_______________________________________________
Esb-java-user mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user

Reply via email to