Hi all,

I have a requirement to proxy a file servlet that delivers pdf
the esb client should receive the PDF file (without SOAP)

backend : AS + servlet
http get : http://backendServer/webappContext/servlet?id=1234
response : PDF File: 1234.pdf

How can I proxy this through the ESB.
My actual proxy get to the wsas and receives the pdf but throws an error

<proxy xmlns="http://ws.apache.org/ns/synapse"; name="FS" transports="http"
statistics="disable" trace="disable" startOnLoad="true">
   <target>
      <outSequence>
         <send />
      </outSequence>
  <property name="CONTENT_TYPE" value="application/pdf" scope="axis2"/>
      <endpoint>
         <address uri="http://172.30.10.111:9763/fs/"; format="get" />
      </endpoint>
   </target>
</proxy>


I call the ESB with http get :
http://localhost:8280/services/FS/FileSystem?ID=29263
I can see the get in the wsas and the pdf hitting the ESB

error in the ESB

[2012-08-06 18:28:42,103]  WARN - ClientWorker Unexpected response
received. HTTP response code : 200 HTTP status : OK exception :
com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0xe3 (at char
#10, byte #-1)
[2012-08-06 18:28:42,106] ERROR - NativeWorkerPool Uncaught exception
java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMTextImpl
cannot be cast to org.apache.axiom.om.OMElement
        at
org.apache.synapse.util.MessageHelper.cloneSOAPFault(MessageHelper.java:441)
        at
org.apache.synapse.util.MessageHelper.cloneSOAPEnvelope(MessageHelper.java:254)
        at
org.apache.synapse.core.axis2.SOAPUtils.convertSOAP11toSOAP12(SOAPUtils.java:95)
        at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:317)
        at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:159)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
        at
org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:274)
        at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)


-----------------------------------------------------
Is this this correct approach for this?


Thanks

Guillaume
_______________________________________________
User mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/user

Reply via email to