I'm using http post and don't want to write marshaler for normal HTTP post request. My full code and flow are given below. Please let me know if you could find the possible reason of error.
http://www.nabble.com/file/p17098335/SMX-Test-Flow.jpg HTTP service1(test.html) is nothing but simple http page with following code: ---------------------------------------------------------------------------------------------------------------------------------- <html> <head> <title>Test</title> </head> <body> <form action="http://localhost:8192/PortalCommExample/" method="post"> <input name="testKey" type="text"/> <input type="submit"/> </form> </body> </html> ---------------------------------------------------------------------------------------------------------------------------------- xbean.xml for first BC is as follow ---------------------------------------------------------------------------------------------------------------------------------- <?xml version="1.0"?> <beans xmlns:http="http://servicemix.apache.org/http/1.0" xmlns:test="http://www.mysite.com/abcde"> <http:endpoint service="test:MyHttpReceiver" endpoint="receiverConsumer" targetService="test:MyProviderService" role="consumer" soap="false" defaultMep="http://www.w3.org/2004/08/wsdl/in-out" locationURI="http://localhost:8192/PortalCommExample/"/> </beans> ---------------------------------------------------------------------------------------------------------------------------------- xbean.xml for second BC is as follow ---------------------------------------------------------------------------------------------------------------------------------- <beans xmlns:http="http://servicemix.apache.org/http/1.0" xmlns:test="http://www.mysite.com/abcd"> <http:endpoint service="test:MyProviderService" endpoint="senderProvider" role="provider" locationURI="http://0.0.0.0/esbtest/testService1.php" defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/> </beans> ---------------------------------------------------------------------------------------------------------------------------------- HTTP service 2 (testService1.php) is as follow ---------------------------------------------------------------------------------------------------------------------------------- <?PHP $testKey = $_REQUEST("testKey"); echo "<html><body>testKey=".$testKey."</body></html>"; ?> ---------------------------------------------------------------------------------------------------------------------------------- The error I'm getting on Service Mix console is as follow ---------------------------------------------------------------------------------------------------------------------------------- DEBUG - JettyContextManager - Dispatching job: [EMAIL PROTECTED],io=0,w=true,b=false|false] DEBUG - jetty - REQUEST /PortalCommExample/ on [EMAIL PROTECTED] DEBUG - jetty - servlet=jbiServlet DEBUG - jetty - chain=null DEBUG - jetty - servlet holder=jbiServlet DEBUG - ConsumerProcessor - Receiving HTTP request: POST /PortalCommExample/ HTTP/1.1 Host: localhost:8192 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://localhost/esbtest/test.html Cache-Control: max-age=0 Content-Type: application/x-www-form-urlencoded Content-Length: 15 DEBUG - HttpComponent - Created correlation id: ID:192.168.2.71-119c1f8b0b1-17:3 DEBUG - DeliveryChannelImpl - Send ID:192.168.2.71-119c1f8b0b1-17:3 in DeliveryChannel{servicemix-http} WARN - DefaultBroker - ServiceName ({http://www.mysite.com/abcde}MyProviderService) specified for routing, but can't find it registered WARN - DefaultBroker - ServiceName ({http://www.mysite.com/abcde}MyProviderService) specified for routing, but can't find it registered [Fatal Error] :1:1: Content is not allowed in prolog. DEBUG - DeliveryChannelImpl - Exception processing: ID:192.168.2.71-119c1f8b0b1-17:3 in DeliveryChannel{servicemix-http} WARN - jetty - /PortalCommExample/ java.lang.IllegalStateException: Cannot write non xml faults for non soap messages at org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124) at org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92) at org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277) at org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176) at org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:309) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) 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) DEBUG - jetty - POST /PortalCommExample/ HTTP/1.1 Host: localhost:8192 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://localhost/esbtest/test.html Cache-Control: max-age=0 Content-Type: application/x-www-form-urlencoded Content-Length: 15 DEBUG - jetty - RESPONSE /PortalCommExample/ 500 DEBUG - jetty - continuation still pending null DEBUG - jetty - continuation [EMAIL PROTECTED],new ---------------------------------------------------------------------------------------------------------------------------------- On browser, I'm getting following message ---------------------------------------------------------------------------------------------------------------------------------- HTTP ERROR: 500 Cannot write non xml faults for non soap messages RequestURI=/PortalCommExample/ Caused by: java.lang.IllegalStateException: Cannot write non xml faults for non soap messages at org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124) at org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92) at org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277) at org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176) at org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:309) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) 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) Powered by Jetty:// ---------------------------------------------------------------------------------------------------------------------------------- The error says, "Cannot write non xml faults for non soap messages". I'm wondering why xml and soap are coming in picture? -- View this message in context: http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p17098335.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
