Need help with http-gateway on jboss esb
nnpaul Jan 18, 2011 1:35 PMHello!
I try to do simple test for send POST request from GWT using RequestBuilder
RequestBuilder rb=new RequestBuilder(RequestBuilder.POST, "http://localhost:8080/Test-Services/http/test/check");
String xml="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n" +
"<request>\n" +
"<test>test</test>\n" +
"</request>";
rb.setHeader("Content-type", "text/xml");
try {
rb.sendRequest(xml,new RequestCallback(){
public void onResponseReceived(Request request, Response response) {
}
public void onError(Request request, Throwable throwable) {
}
});
} catch (RequestException e) {
e.printStackTrace();
}
And jboss-esb.xml is:
<service category="Test" name="Service" description="" invmScope="GLOBAL">
<listeners>
<http-gateway name="test" busidref="testBus" urlPattern="test/*" payloadAs="STRING" />
</listeners>
<actions mep="RequestResponse">
<action name="dispatchAction" class="com.simpletest.esb.TestActions" process="dispatchAction"/>
</actions>
</service>
Request reach service, but when I print request info :
20:17:10,370 INFO [STDOUT] <org.jboss.soa.esb.http.HttpRequest>
<contextPath>/Test-Service</contextPath>
<localAddr>127.0.0.1</localAddr>
<localName>activate.adobe.com</localName>
<method>OPTIONS</method>
<pathInfo>/check</pathInfo>
<protocol>HTTP/1.1</protocol>
<remoteAddr>127.0.0.1</remoteAddr>
<remoteHost>127.0.0.1</remoteHost>
<contentLength>-1</contentLength>
<requestURI>/Test-Service/http/test/check</requestURI>
<scheme>http</scheme>
<serverName>localhost</serverName>
<requestPath>/http/test</requestPath>
<pathInfoTokens>
<string>check</string>
</pathInfoTokens>
<queryParams/>
I see that method is OPTIONS and Content-type is absent and I don't receive any XML data inside message body.
May be someone faced with this or similar problem? What I am doing wrong?
Thanks in advance.