You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Hattestad <kr...@hotmail.com> on 2008/06/24 16:15:46 UTC

Newbie: Cant forward message to webservice on another machine

Hi

Im new to Synapse and hoping for some answer :)

I have one webservice on my local machine and another one on another.
If i call them with soapUi they both works fine.
If i call the local one (with soapUi) through Synapse i work fine
(PingLocal)
If i call the external one (with soapUi) through Synapse i get a 404 message
in return (Ping).
Any pointers to what might be wrong?

synapse.xml
<proxy name="Ping" >
   <target>
      <endpoint >
         <address uri="http://foxtrot-u1/handel.persistorder/services/Ping"
trace="enable"/>
       </endpoint>
       <outSequence>
	<send/>
       </outSequence>
   </target>
   <publishWSDL
uri="http://foxtrot-u1/handel.persistorder/services/Ping?wsdl" />
</proxy>
<proxy name="PingLocal" >
   <target>
      <endpoint >
         <address
uri="http://localhost:8080//handel.persistorder/services/Ping"
trace="enable"/>
       </endpoint>
       <outSequence>
	<send/>
       </outSequence>
   </target>
   <publishWSDL
uri="http://foxtrot-u1/handel.persistorder/services/Ping?wsdl" />
</proxy>
-- 
View this message in context: http://www.nabble.com/Newbie%3A-Cant-forward-message-to-webservice-on-another-machine-tp18091994p18091994.html
Sent from the Synapse - User mailing list archive at Nabble.com.


Re: Newbie: Cant forward message to webservice on another machine

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi
> >From the logs all seems fine. 
> - I got a friend to call wget from his machine to foxtrot-u1 and he got 404.
> - If i use ip-address in IE or SoapUI i get the same error
> - If i use foxtrot-u in IE or SoapUI all is fine
>
> I'm no network guru but i guess there have to be some difference with
> SoapUi/Browsers and wget/Synapse which i might mimic in Synapse.
> Suggestions?
>   
What is the backend service implementation? i.e. is it .Net, Axis2, 
Axis2/C, ..? and whats the server that hosts it - is it IIS, Tomcat, 
JBoss, Apache ?

I think the server binds only on a particular IP address, and replies 
when you talk using a particular host name. Let me decode the following 
information for you..
> [I/O dispatcher 5] DEBUG headers >> Host: al400587:8280
> [I/O dispatcher 5] DEBUG headers >> Content-Length: 217
> [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [al400587.stb.local/33.111.20.178:1170]: Input ready
> ........
> [HttpServerWorker-1] DEBUG HttpCoreNIOSender A new connection established to: foxtrot-u1:80
>   
Synapse sends the HTTP 1.1 "Host" header as "al400587" on port 8280, but 
actually has connected to "al400587.stb.local/33.111.20.178" on port 
1170.. a bit confusing.. is this backend server on the same network? or 
is it behind a layer of Apache load balancers or other NW appliances?

asankha

-- 
Asankha C. Perera

WSO2 - http://wso2.org
http://esbmagic.blogspot.com


Re: Newbie: Cant forward message to webservice on another machine

Posted by Hattestad <kr...@hotmail.com>.
Hi

Tx for answers. 

>From the logs all seems fine. 
- I got a friend to call wget from his machine to foxtrot-u1 and he got 404.
- If i use ip-address in IE or SoapUI i get the same error
- If i use foxtrot-u in IE or SoapUI all is fine

I'm no network guru but i guess there have to be some difference with
SoapUi/Browsers and wget/Synapse which i might mimic in Synapse.
Suggestions?


--------------------------- SYNAPS.log -----------------

[I/O dispatcher 5] DEBUG ServerHandler HTTP connection
[/33.111.20.178:1170]: Connected
[I/O dispatcher 5] DEBUG ServerHandler HTTP connection
[/33.111.20.178:1170]: POST /soap/Ping.PingHttpSoap11Endpoint HTTP/1.1
[I/O dispatcher 5] DEBUG headers >> POST /soap/Ping.PingHttpSoap11Endpoint
HTTP/1.1
[I/O dispatcher 5] DEBUG headers >> Content-Type: text/xml;charset=UTF-8
[I/O dispatcher 5] DEBUG headers >> SOAPAction: ""
[I/O dispatcher 5] DEBUG headers >> User-Agent: Jakarta
Commons-HttpClient/3.0.1
[I/O dispatcher 5] DEBUG headers >> Host: al400587:8280
[I/O dispatcher 5] DEBUG headers >> Content-Length: 217
[I/O dispatcher 5] DEBUG ServerHandler HTTP connection
[al400587.stb.local/33.111.20.178:1170]: Input ready
[I/O dispatcher 5] DEBUG ServerHandler HTTP connection
[al400587.stb.local/33.111.20.178:1170]: Content decoder [content length:
217; pos: 217; completed: true]
[HttpServerWorker-1] DEBUG TransportUtils createSOAPEnvelope using Builder
(class org.apache.axis2.builder.SOAPBuilder) selected from type (text/xml)
[HttpServerWorker-1] DEBUG ProxyServiceMessageReceiver Proxy Service Ping
received a new message from : 33.111.20.178
[HttpServerWorker-1] DEBUG ProxyServiceMessageReceiver Message To:
/soap/Ping.PingHttpSoap11Endpoint
[HttpServerWorker-1] DEBUG ProxyServiceMessageReceiver SOAPAction: 
[HttpServerWorker-1] DEBUG ProxyServiceMessageReceiver WSA-Action: 
[HttpServerWorker-1] DEBUG ProxyServiceMessageReceiver Forwarding the
message to the anonymous endpoint of the proxy service
[HttpServerWorker-1] DEBUG AddressEndpoint Start : Address Endpoint
[HttpServerWorker-1] DEBUG AddressEndpoint Sending message to endpoint :
AnonymousEndpoint resolves to address =
http://foxtrot-u1/handel.persistorder/services/Ping
[HttpServerWorker-1] DEBUG AddressEndpoint SOAPAction: 
[HttpServerWorker-1] DEBUG AddressEndpoint WSA-Action: 
[HttpServerWorker-1] DEBUG Axis2FlexibleMEPClient Sending [add = true] [sec
= true] [rm = false] [mtom = false] [swa = false] [format = soap11] [force
soap11=true] [force soap12=false] [pox=false] [get=false] [encoding=null]
[to Address: /soap/Ping.PingHttpSoap11Endpoint]
[HttpServerWorker-1]  INFO TimeoutHandler This engine will expire all
callbacks after : 86400 seconds, irrespective of the timeout action, after
the specified or optional timeout
[HttpServerWorker-1] DEBUG SynapseCallbackReceiver Callback added. Total
callbacks waiting for : 1
[HttpServerWorker-1] DEBUG ConnectionPool No connections available for reuse
[HttpServerWorker-1] DEBUG HttpCoreNIOSender A new connection established to
: foxtrot-u1:80
[HttpServerWorker-1] DEBUG Axis2HttpRequest start streaming outgoing http
request
[I/O dispatcher 1] DEBUG ClientHandler HTTP connection
[foxtrot-u1/33.111.242.172:80]: Connected
(org.apache.synapse.transport.nhttp.Axis2HttpRequest@16132c4)
[I/O dispatcher 1] DEBUG ClientHandler ClientHandler connected :
[foxtrot-u1/33.111.242.172:80]
[I/O dispatcher 1] DEBUG SOAPMessageFormatter contentType from the
OMOutputFormat =text/xml
[I/O dispatcher 1] DEBUG SOAPMessageFormatter contentType returned
=text/xml; charset=UTF-8
[I/O dispatcher 1] DEBUG headers >> POST
http://foxtrot-u1/handel.persistorder/services/Ping HTTP/1.1
[I/O dispatcher 1] DEBUG headers >> Host: al400587:8280
[I/O dispatcher 1] DEBUG headers >> SOAPAction: urn:anonOutInOpResponse
[I/O dispatcher 1] DEBUG headers >> Content-Type: text/xml; charset=UTF-8
[I/O dispatcher 1] DEBUG headers >> Transfer-Encoding: chunked
[I/O dispatcher 1] DEBUG headers >> Connection: Keep-Alive
[I/O dispatcher 1] DEBUG headers >> User-Agent: Synapse-HttpComponents-NIO
[HttpServerWorker-1] DEBUG SOAPMessageFormatter start writeTo()
[I/O dispatcher 1] DEBUG ClientHandler HTTP connection
[foxtrot-u1/33.111.242.172:80]: Output ready
[HttpServerWorker-1] DEBUG SOAPMessageFormatter   preserve=false
[I/O dispatcher 1] DEBUG ClientHandler HTTP connection
[foxtrot-u1/33.111.242.172:80]: Content encoder [chunk-coded; completed:
false]
[HttpServerWorker-1] DEBUG SOAPMessageFormatter   isOptimized=false
[HttpServerWorker-1] DEBUG SOAPMessageFormatter   isDoingSWA=false
[HttpServerWorker-1] DEBUG SOAPMessageFormatter end writeTo()
[I/O dispatcher 1] DEBUG ClientHandler HTTP connection
[foxtrot-u1/33.111.242.172:80]: Output ready
[I/O dispatcher 1] DEBUG ClientHandler HTTP connection
[foxtrot-u1/33.111.242.172:80]: Content encoder [chunk-coded; completed:
true]
[I/O dispatcher 1] DEBUG ClientHandler HTTP connection
[foxtrot-u1/33.111.242.172:80]: Request ready
[I/O dispatcher 1] DEBUG ClientHandler HTTP connection
[foxtrot-u1/33.111.242.172:80]: HTTP/1.1 404 Not Found
[I/O dispatcher 1]  WARN ClientHandler Unexpected HTTP status code received
: 404 :: Not Found


-- 
View this message in context: http://www.nabble.com/Newbie%3A-Cant-forward-message-to-webservice-on-another-machine-tp18091994p18106100.html
Sent from the Synapse - User mailing list archive at Nabble.com.


Re: Newbie: Cant forward message to webservice on another machine

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi

Hattestad wrote:
> Hi
>
> Im new to Synapse and hoping for some answer :)
>
> I have one webservice on my local machine and another one on another.
> If i call them with soapUi they both works fine.
> If i call the local one (with soapUi) through Synapse i work fine
> (PingLocal)
> If i call the external one (with soapUi) through Synapse i get a 404 message
> in return (Ping).
> Any pointers to what might be wrong?
>   
So, I guess you can invoke 
"http://foxtrot-u1/handel.persistorder/services/Ping" from soapUI? Can 
you post the log from Synapse to the list.. this should show you the 
actual message sent to the foxtrot-u1 server, which you can then re-try 
through soapUI directly to see whats the problem.

Also, we need the log to analyze the error returned by the remote server :)

asankha

-- 
Asankha C. Perera

WSO2 - http://wso2.org
http://esbmagic.blogspot.com


Re: Newbie: Cant forward message to webservice on another machine

Posted by Ruwan Linton <ru...@gmail.com>.
Hi,

Your configuration seems to be just fine, if you can invoke this service
with the SOAPUI using the address
http://foxtrot-u1/handel.persistorder/services/Ping from the machine where
you run synapse then there should not be any problem in accessing this
service through Synapse.

Can you please post the DEBUG log of Synapse. You can turn on the DEBUG logs
by changing the log level of package org.apache.synapse and
org.apache.synapse.transport from INFO to DEBUG in the lib/log4j.properties
file found at the synapse home directory.

Thanks,
Ruwan

On Tue, Jun 24, 2008 at 7:45 PM, Hattestad <kr...@hotmail.com>
wrote:

>
> Hi
>
> Im new to Synapse and hoping for some answer :)
>
> I have one webservice on my local machine and another one on another.
> If i call them with soapUi they both works fine.
> If i call the local one (with soapUi) through Synapse i work fine
> (PingLocal)
> If i call the external one (with soapUi) through Synapse i get a 404
> message
> in return (Ping).
> Any pointers to what might be wrong?
>
> synapse.xml
> <proxy name="Ping" >
>   <target>
>      <endpoint >
>         <address uri="http://foxtrot-u1/handel.persistorder/services/Ping"
> trace="enable"/>
>       </endpoint>
>       <outSequence>
>        <send/>
>       </outSequence>
>   </target>
>   <publishWSDL
> uri="http://foxtrot-u1/handel.persistorder/services/Ping?wsdl" />
> </proxy>
> <proxy name="PingLocal" >
>   <target>
>      <endpoint >
>         <address
> uri="http://localhost:8080//handel.persistorder/services/Ping"
> trace="enable"/>
>       </endpoint>
>       <outSequence>
>        <send/>
>       </outSequence>
>   </target>
>   <publishWSDL
> uri="http://foxtrot-u1/handel.persistorder/services/Ping?wsdl" />
> </proxy>
> --
> View this message in context:
> http://www.nabble.com/Newbie%3A-Cant-forward-message-to-webservice-on-another-machine-tp18091994p18091994.html
> Sent from the Synapse - User mailing list archive at Nabble.com.
>
>


-- 
Ruwan Linton
http://wso2.org - "Oxygenating the Web Services Platform"
http://ruwansblog.blogspot.com/