Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 48274 invoked from network); 2 Nov 2010 20:25:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Nov 2010 20:25:51 -0000 Received: (qmail 74020 invoked by uid 500); 2 Nov 2010 20:26:22 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 73988 invoked by uid 500); 2 Nov 2010 20:26:22 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 73980 invoked by uid 99); 2 Nov 2010 20:26:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Nov 2010 20:26:22 +0000 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.158 is neither permitted nor denied by domain of unmarshall@gmail.com) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Nov 2010 20:26:16 +0000 Received: from sam.nabble.com ([192.168.236.26]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1PDNQZ-0004FA-Gk for users@camel.apache.org; Tue, 02 Nov 2010 13:25:55 -0700 Date: Tue, 2 Nov 2010 13:25:55 -0700 (PDT) From: unmarshall To: users@camel.apache.org Message-ID: <1288729555512-3247439.post@n5.nabble.com> In-Reply-To: <4CCE6752.90801@gmail.com> References: <0E608B3AEB71BF429396A5AF065ED05D0AEA3DFEB2@S3Q2173.enbw.net> <1288172961648-3238440.post@n5.nabble.com> <0E608B3AEB71BF429396A5AF065ED05D0AEA3DFEB3@S3Q2173.enbw.net> <1288186565419-3238726.post@n5.nabble.com> <4CCE6752.90801@gmail.com> Subject: Re: AW: AW: Calling external webservice using cxf camel endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Willem, Thanks for your response. I always have trace on while development. For a producer the binding operation info are never set. A look at the source cod= e for the producer confirms the same. I added a custom processor which will then add the operation name and namespace. It works if there is one external web service. Now what is strange is that in case the route has 2 producers then CXF applies transfer-encoding only to the request to the second external webservice. Following is the request that goes (you can see the Transfer-Encoding=3D[chunked] there: 01:46:29.404 INFO [default-workqueue-1] o.a.c.processor.interceptor.Tracer [Logger.java:88] - ID-INLN50091056A-57098-1288728953488-11-5 >>> (route22) com.sap.ping.util.OperationMappingProcessor@504a89f7 --> cxf://bean:salesArrangementERPEndpoint <<< Pattern:InOut, Headers:{User-Agent=3DJakarta Commons-HttpClient/3.1, Host=3Dlocalhost:8080= , SOAPAction=3D"http://sap.com/xi/WebService/soap1.1", operationName=3DsalesArrangementERPByIdentifyingElementsQueryResponseIn, accept-encoding=3Dgzip,deflate, ResponseContext=3D{org.apache.cxf.interceptor.DocLiteralInInterceptor.DocLi= teralInInterceptor.keep-parameters-wrapper=3Dtrue, javax.xml.ws.wsdl.port=3D{http://sap.com/xi/APPL/SE/Global}SalesOrderItemBy= BuyerAndProductQueryResponseInImplPort, org.apache.cxf.service.model.MessageInfo=3D[MessageInfo OUTPUT: {http://sap.com/xi/APPL/SE/Global}salesOrderItemByBuyerAndProductQueryRespo= nseInResponse], org.apache.cxf.client=3Dtrue, org.apache.cxf.message.inbound=3Dtrue, org.apache.cxf.message.Message.PROTOCOL_HEADERS=3D{content-type=3D[text/xml= ;charset=3Dutf-8], Date=3D[Tue, 02 Nov 2010 20:16:29 GMT], transfer-encoding=3D[chunked], Server=3D[Apache-Coyote/1.1]}, javax.xml.ws.wsdl.service=3D{http://sap.com/xi/APPL/SE/Global}SalesOrderIte= mByBuyerAndProductQueryResponse_InService, org.apache.cxf.message.Message.ENCODING=3DUTF-8, javax.xml.ws.wsdl.interface=3D{http://sap.com/xi/APPL/SE/Global}SalesOrderI= temByBuyerAndProductQueryResponseInImpl, javax.xml.ws.wsdl.operation=3D{http://sap.com/xi/APPL/SE/Global}salesOrderI= temByBuyerAndProductQueryResponseIn, javax.xml.ws.wsdl.description=3Dhttp://localhost:8081/jaxws-demows/SalesOrd= erItemByBuyerAndProductQuery?wsdl, Content-Type=3Dtext/xml;charset=3Dutf-8, org.apache.cxf.headers.Header.list= =3D[], org.apache.cxf.message.Message.RESPONSE_CODE=3D200}, org.apache.cxf.headers.Header.list=3D[], content-type=3Dtext/xml;charset=3D= utf-8, operationNamespace=3Dhttp://sap.com/xi/APPL/SE/Global, Server=3DApache-Coyote/1.1, Date=3DTue, 02 Nov 2010 20:16:29 GMT, transfer-encoding=3Dchunked}, BodyType:String, Body: 10 The problem is then even when i have the following configuration, it still applies chunking: =09 =09=09 =09 Which is strange in my opinion. I have the services hosted on tomcat. Now when the chunked request goes to tomcat it throws an exception: SEVERE: Couldn't create SOAP message due to exception: Unable to create StA= X reader or writer com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: Unable to create StAX reader or writer =09at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:365) =09at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:277= ) =09at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93) =09at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.ja= va:457) =09at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244= ) =09at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.= java:135) =09at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDele= gate.java:129) =09at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDel= egate.java:160) =09at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75) =09at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) =09at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) =09at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio= nFilterChain.java:304) =09at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC= hain.java:208) =09at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j= ava:240) =09at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j= ava:203) =09at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:16= 4) =09at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10= 8) =09at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558) =09at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav= a:118) =09at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379) =09at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java= :281) =09at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(= Http11AprProtocol.java:357) =09at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java= :1671) =09at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j= ava:886) =09at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 908) =09at java.lang.Thread.run(Thread.java:619) Caused by: com.sun.xml.ws.streaming.XMLReaderException: Unable to create StAX reader or writer =09at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$NoLock.doCreate(XMLStre= amReaderFactory.java:412) =09at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$Woodstox.doCreate(XMLSt= reamReaderFactory.java:436) =09at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.doCreate(XMLStreamReade= rFactory.java:201) =09at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.create(XMLStreamReaderF= actory.java:154) =09at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:3= 01) =09at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:1= 29) =09at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:360) =09... 25 more Caused by: com.ctc.wstx.exc.WstxIOException: Invalid chunk header =09at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:5= 48) =09at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604= ) =09at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:660= ) =09at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.j= ava:355) =09at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$NoLock.doCreate(XMLStre= amReaderFactory.java:410) =09... 31 more Caused by: java.io.IOException: Invalid chunk header =09at org.apache.coyote.http11.filters.ChunkedInputFilter.doRead(ChunkedInputFilt= er.java:143) =09at org.apache.coyote.http11.InternalAprInputBuffer.doRead(InternalAprInputBuff= er.java:526) =09at org.apache.coyote.Request.doRead(Request.java:426) =09at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:28= 6) =09at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:407) =09at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:309) =09at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java= :198) =09at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264) =09at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) =09at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) =09at java.io.InputStreamReader.read(InputStreamReader.java:167) =09at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245) =09at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:1= 32) =09at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:5= 43) =09... 35 more One of the possible reasons is listed @ http://trenaman.blogspot.com/2008/12/take-care-when-propagating-transport.h= tml - however setting AllowChunking=3D"false" is not working for me. So i am st= uck yet again. Any help would be appreciated. Best Regards, madhav Willem.Jiang wrote: >=20 > On 10/27/10 9:36 PM, unmarshall wrote: >> >> Hi Christian, >> >> Thanks for your response. Camel Http component worked but that is not >> what >> we are looking for. Following are the reasons: >> >> 1. The routes are usually created by the clients and they range from >> simple >> to complex. Along with the routes they provide XSLT mappings which will >> essentially only work on payloads. For using HTTP component i had to >> change >> the XSLT to add a soap envelop so that when a HTTP call is made to the >> external webservice it does not fail because after application of XSLT o= n >> the payload there is no soap envelop. >> 2. If we use ServiceMix along with CXF we can easily do this by creating >> cxf >> consumers and producers so i am not sure why is this so difficult to do >> using cxf and camel. >> >> I am planning to debug the Camel CXF codebase to see why >> OperationBindingInfo is not found even when we explicitly set it on the >> producer. >> >=20 > Can you try to use the trace[1] to print out the messages ? > Maybe the binding operation header is missing in the 4th endpoint. >=20 > You can add it back in a customer processor, if the header is missed. >=20 >> Thanks& Regards, >> Madhav >> >> >> Schneider Christian wrote: >>> >>> Status code 500 means internal server error. I guess the endpoint you >>> sent >>> the request to was not able to process the request. Perhaps you will >>> have >>> more details in the log of this endpoint. >>> >>> It could be some invalid soap for that service... >>> >>> Best regards >>> >>> Christian >>> >>> Christian Schneider >>> Informationsverarbeitung >>> Business Solutions >>> Handel und Dispatching >>> >>> Tel : +49-(0)721-63-15482 >>> >>> EnBW Systeme Infrastruktur Support GmbH >>> Sitz der Gesellschaft: Karlsruhe >>> Handelsregister: Amtsgericht Mannheim =C2=AD HRB 108550 >>> Vorsitzender des Aufsichtsrats: Dr. Bernhard Beck >>> Gesch=C3=A4ftsf=C3=BChrer: Jochen Adenau, Hans-G=C3=BCnther Meier >>> >>> >> >=20 >=20 > --=20 > Willem > ---------------------------------- > FuseSource > Web: http://www.fusesource.com > Blog: http://willemjiang.blogspot.com (English) > http://jnn.javaeye.com (Chinese) > Twitter: willemjiang >=20 >=20 --=20 View this message in context: http://camel.465427.n5.nabble.com/Calling-ext= ernal-webservice-using-cxf-camel-endpoint-tp3238383p3247439.html Sent from the Camel - Users mailing list archive at Nabble.com.