Reputation: 71
I am really struggling to understand how the heck WSO2 ESB works. The documentation - especially for the graphical tools - is severely wanting. I'm hoping someone can point me down the right path.
I have a SOAP API with a RPC/Encoded WSDL. I was able to successfully set it up as a WSDL based proxy and the tools to test it within the ESB admin panel indicate that it's working just fine - I'm able to get a session back, etc.
I went in to set up an API to handle REST requests and forward them to the SOAP API. To test this, I'm starting with our login() function. You can see that as a resource in the source view of the API below:
<api xmlns="http://ws.apache.org/ns/synapse" name="VRRestAPI" context="/vrrest">
<resource methods="GET" uri-template="/session/{username}/{password}">
<inSequence>
<log level="full"/>
<payloadFactory>
<format>
<m0:login xmlns:m0="http://services.samples">
<m0:request>
<m0:username>$1</m0:username>
<m0:password>$2</m0:password>
</m0:request>
</m0:login>
</format>
<args>
<arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('uri.var.username')"/>
<arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('uri.var.password')"/>
</args>
</payloadFactory>
</inSequence>
<outSequence>
<log level="full"/>
<send/>
</outSequence>
</resource>
</api>
It saves fine and says the API is now running. So I try calling it using curl:
curl -v http://10.0.6.223:8280/vrrest/session/[email protected]/password
And get the following:
* About to connect() to 10.0.6.223 port 8280 (#0)
* Trying 10.0.6.223... connected
* Connected to 10.0.6.223 (10.0.6.223) port 8280 (#0)
> GET /vrrest/session/[email protected]/password HTTP/1.1
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3
> Host: 10.0.6.223:8280
> Accept: */*
>
< HTTP/1.1 202 Accepted
< Date: Fri, 05 Oct 2012 21:06:54 GMT
< Server: Synapse-HttpComponents-NIO
< Transfer-Encoding: chunked
<
* Connection #0 to host 10.0.6.223 left intact
* Closing connection #0
What I'm expecting to see is a POX representation of the output of my SOAP endpoint's login() method. I'm not even getting so much as an error here. There are no logs showing me any details about the mediation or anything. I'm pretty lost and am about to just give up. Any hints on what I should try next here?
Upvotes: 0
Views: 1520
Reputation: 31
I think you're missing "send" at the end of your "inSequence" ... basically you're not sending your carefully crafted message anywhere :-). See: http://synapse.apache.org/userguide/samples/sample800.html.
Upvotes: 3