I have an http-consumer that act like a proxy for jms-producer. I'm trying to
send a message to http endpoint with a simple http client and I got
following error:
DEBUG - jetty - EXCEPTION
java.io.IOException: An existing connection was forcibly closed by the
remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.mortbay.io.nio.ChannelEndPoint.fill(ChannelEndPoint.java:128)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:282)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
http consumer configuration is:
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:tns="http://mynamespace/test">
<http:endpoint
service="tns:jmsProvider"
endpoint="jmsProvider"
role="consumer"
locationURI="http://localhost:8192/httpConsumer/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-only">
</http:endpoint>
</beans>
the client code:
public static void main(String[] args) throws Exception
{
String httpEndpoint = "http://localhost:8192/httpConsumer/";
URLConnection connection = new URL(httpEndpoint).openConnection();
connection.setDoOutput(true);
OutputStream sender = connection.getOutputStream();
String msg = "<TestMsg>hello!</TestMsg>";
sender.write(msg.getBytes());
sender.flush();
sender.close();
}
Similar error was reported here:
http://www.nabble.com/http-jbi-connector-tf3065579s12049.html#a8526348
http://www.nabble.com/http-endpoint-tf3121826s12049.html#a8649586
I noticed that in all three cases in-only MEP is used but (AFAIK) http
consumer allow this kind of MEP.
--
View this message in context:
http://www.nabble.com/http-endpoint---connection-forcibly-closed-tf4676702s12049.html#a13361766
Sent from the ServiceMix - User mailing list archive at Nabble.com.