[ 
https://issues.apache.org/jira/browse/SYNAPSE-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609513#action_12609513
 ] 

Jasper Spoel commented on SYNAPSE-365:
--------------------------------------

Hi Ruwan,

I've tested this issue again with the latest snapshot and still get the same 
results, even with the pointers you gave in the last comment.
Here's an overview of what happens:

synapse config:
<definitions xmlns="http://ws.apache.org/ns/synapse";>
  <proxy name="Forwarder">
      <target>
          <endpoint>
              <address uri="http://10.0.0.12:8081/workflow"; format="get"/>
          </endpoint>
          <outSequence>
              <send/>
          </outSequence>
      </target>
  </proxy>
</definitions>

the call to service: http://10.0.0.12:8081/workflow/servers
should return: 
<servers><server>name</server></servers>

TCPMon set up to work as a proxy on port 5555  (for the input trace)

curl call: 
curl -G -H "Content-Type: text/xml" -x 127.0.0.1:5555 
http://localhost:8280/soap/Forwarder/servers

synapse does not answer this call, so there's no trace for that data. Synapse 
crashes while repeating the nullpointer exception like so:

2008-07-01 11:53:22,794 [10.0.0.12-equilibrium.local] [HttpServerWorker-1]  
INFO TimeoutHandler This engine will expire all callbacks after : 86400 
seconds, irrespective of the timeout action, after the specified or optional 
timeout
2008-07-01 11:53:22,855 [10.0.0.12-equilibrium.local] [I/O dispatcher 3] ERROR 
ClientHandler Received bad request: Bad Request

================================== 
the follow part is then repeated until a ctrl-c is done on synapse
==================================

2008-07-01 11:53:22,858 [10.0.0.12-equilibrium.local] [I/O dispatcher 3]  WARN 
HttpCoreNIOSender System may be unstable: IOReactor encountered a runtime 
exception : null
java.lang.NullPointerException
        at 
org.apache.synapse.transport.nhttp.ClientHandler.inputReady(ClientHandler.java:321)
        at 
org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:135)
        at 
org.apache.http.impl.nio.DefaultClientIOEventDispatch.inputReady(DefaultClientIOEventDispatch.java:99)
        at 
org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:98)
        at 
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:195)
        at 
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:180)
        at 
org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:142)
        at 
org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:70)
        at 
org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:318)
        at java.lang.Thread.run(Thread.java:613)


TCPMon shows this input:
GET http://localhost:8280/soap/Forwarder/servers HTTP/1.1
User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l 
zlib/1.2.3
Host: localhost:8280
Pragma: no-cache
Accept: */*
Proxy-Connection: Keep-Alive
Content-Type: text/xml


To me this all seems pretty straightforward and correct (data / input wise).
Hope you see something wrong here....

Greetz,
Jasper

> REST support not working in synapse 1.2
> ---------------------------------------
>
>                 Key: SYNAPSE-365
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-365
>             Project: Synapse
>          Issue Type: Bug
>          Components: Endpoints, Proxy Services, Transports
>            Reporter: Jasper Spoel
>            Assignee: Ruwan Linton
>             Fix For: NIGHTLY
>
>
> When submitting a GET request to a synapse proxy service that points to a 
> REST webservice
> AND Content-Type is not text/xml or application/xml the error: "Cannot create 
> DocumentElement without destination EPR" comes out. (e.g try to approach the 
> service proxy with a webbrowers and it will do this)
> configuration is as follows:
> <definitions xmlns="http://ws.apache.org/ns/synapse";>
>   <proxy name="Forwarder">
>       <target>
>           <endpoint>
>               <address uri="http://localhost:11111/MyService/echo"; 
> format="get"/>
>           </endpoint>
>           <outSequence>
>               <send/>
>           </outSequence>
>       </target>
>   </proxy>
> </definitions>
> If the message is send with the 'correct' content-type like for example so: 
> curl -G -H "Content-Type: text/xml" http://localhost:8280/Forwarder/mediate
> Synapse gives me the following output:
> 2008-06-18 15:10:59,714 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] 
> DEBUG ServerHandler HTTP connection [/0:0:0:0:0:0:0:1%0:56697]: Connected
> 2008-06-18 15:10:59,732 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] 
> DEBUG ServerHandler HTTP connection [/0:0:0:0:0:0:0:1%0:56697]: GET 
> /soap/Forwarder/mediate HTTP/1.1
> 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] 
> DEBUG headers >> GET /soap/Forwarder/mediate HTTP/1.1
> 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] 
> DEBUG headers >> User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) 
> libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
> 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] 
> DEBUG headers >> Host: localhost:8280
> 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] 
> DEBUG headers >> Accept: */*
> 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] 
> DEBUG headers >> Content-Type:application/xml
> 2008-06-18 15:10:59,797 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG TransportUtils createSOAPEnvelope using Builder (class 
> org.apache.axis2.builder.ApplicationXMLBuilder) selected from type 
> (application/xml)
> 2008-06-18 15:10:59,841 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG SynapseMessageReceiver Synapse received a new message for message 
> mediation...
> 2008-06-18 15:10:59,841 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG SynapseMessageReceiver Received To: null
> 2008-06-18 15:10:59,841 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG SynapseMessageReceiver SOAPAction: null
> 2008-06-18 15:10:59,843 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG SynapseMessageReceiver WSA-Action: null
> 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG Axis2SynapseEnvironment Injecting MessageContext
> 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG Axis2SynapseEnvironment Using Main Sequence for injected message
> 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG SequenceMediator Start : Sequence <main>
> 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG SequenceMediator Sequence <SequenceMediator> :: mediate()
> 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG LogMediator Start : Log mediator
> 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1]  
> INFO LogMediator To: , MessageID: urn:uuid:27AA6F4DF24676A7641213794659778, 
> Direction: request
> 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG LogMediator End : Log mediator
> 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG DropMediator Start : Drop mediator
> 2008-06-18 15:10:59,852 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG DropMediator End : Drop mediator
> 2008-06-18 15:10:59,852 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG SequenceMediator End : Sequence <main>
> 2008-06-18 15:10:59,853 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] 
> DEBUG ServerWorker Sending 202 Accepted response for MessageID : 
> urn:uuid:27AA6F4DF24676A7641213794659778 response written : null response 
> will follow : true acked : false forced ack : false
> 2008-06-18 15:10:59,862 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] 
> DEBUG ServerHandler HTTP connection [localhost/0:0:0:0:0:0:0:1%0:56697]: 
> Output ready
> 2008-06-18 15:10:59,863 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] 
> DEBUG ServerHandler HTTP connection [localhost/0:0:0:0:0:0:0:1%0:56697]: 
> Content encoder [chunk-coded; completed: true]
> 2008-06-18 15:10:59,864 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] 
> DEBUG ServerHandler HTTP connection [localhost/0:0:0:0:0:0:0:1%0:56697]: 
> Response ready
> 2008-06-18 15:10:59,865 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] 
> DEBUG ServerHandler HTTP connection [closed]: Closed

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to