You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Yogesh Sagar <yo...@gmail.com> on 2011/12/16 15:44:07 UTC

Http Proxy Server

Hi Paul,

This is the configuration I am using.

Yogesh

What is the content type? I think you may need to configure a
different message builder/formatter pair.

Paul

This is the configuration sample I am using.

<!-- Introduction to Synapse -->
<definitions xmlns="http://ws.apache.org/ns/synapse"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://ws.apache.org/ns/synapse
             http://synapse.apache.org/ns/2010/04/configuration/synapse_config.xsd">

    <sequence name="main">
        <!-- log all attributes of messages passing through -->


        <!-- Send the message to implicit destination -->
        <send/>

    </sequence>

</definitions>


On Thu, Dec 15, 2011 at 8:54 PM, Yogesh Sagar <yo...@gmail.com> wrote:
> Hello,
>
> I am new to Apache Synapse. I am trying to set up Apache synapse as a Http
> Proxy Server by using a very simple configuration. Basically, I have
> configured the LAN Settings of my browser to point to Synapse server. When
> I visit any URL, I see there are exceptions being thrown.
>
> 2011-12-15 15:14:07,163 [-] [HttpClientWorker-1]  WARN ClientWorker
> Unexpected response received. HTTP response code : 200 HTTP status : OK
> exception : com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
> character 'd' (code 100) after '<!' (malformed comment?)
>  at [row,col {unknown-source}]: [1,3]
> 2011-12-15 15:14:07,179 [-] [HttpClientWorker-1] 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:440)
>        at
> org.apache.synapse.util.MessageHelper.cloneSOAPEnvelope(MessageHelper.java:255)
>        at
> org.apache.synapse.core.axis2.SOAPUtils.convertSOAP11toSOAP12(SOAPUtils.java:95)
>        at
> org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:297)
>        at
> org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:139)
>        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
>        at
> org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:252)
>        at
> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>
> The configuration sample I am using is from "synapse_sample_0.xml". Is
> there something wrong with the configuration? I simply wish to log the
> incoming and outgoing messages.
>
> Thanks,
> Yogesh