[jboss-dev-forums] [JBoss ESB Development] - httprouter issues with GET/POST WADL Services and Web Routing
jack lista
do-not-reply at jboss.com
Thu Jul 15 13:21:36 EDT 2010
jack lista [http://community.jboss.org/people/jackalista] replied to the discussion
"httprouter issues with GET/POST WADL Services and Web Routing"
To view the discussion, visit: http://community.jboss.org/message/552862#552862
--------------------------------------------------------------
I'm trying to run down some of the last issues so I can try to get this stuff running. There is an HttpRequest class that's extracted from the incoming message (in my case this won't exist, as I'm not trying to route, but to simply make an outgoing request) and you use the query params to supply to the outgoing GET request. I'm trying to make sure I have the right imports, so checking your HttpRequest from the jboss package (org.jboss.soa.esb.http.HttpRequest) against the javadocs, I'm seeing a slight discrepancy, here's the call imbedded in your http client get call:
response = JerseyClientSingleton.get(endpointUrl
,requestInfo.getQueryParams()
,method
,restfulrequest
);
from: http://docs.jboss.org/resteasy/docs/1.0.0.GA/javadocs/index.html http://docs.jboss.org/resteasy/docs/1.0.0.GA/javadocs/index.html, see HttpRequest
There's a *similar* method called "getFormParameters()" but nothing called getQueryParams(), am I looking at the right class here?
Also, since I don't have an incoming request, it looks like I'll have to go construct this:
MultivaluedMap<java.lang.String,java.lang.String>
Where can I read about how to use this thing? I'm looking at the Jersey site but it's not clear exactly what I need to look at, any pointer to relevant docs woiuld be great...
I have now got this code to compile and load into the ESB, but I had to comment out one of your "get" methods from the JerseyClientSingleton class you get me, the compiler didn't like the ambiguity between the two supplied methods. I am manually constructing the 2nd map parameter for the "get" method as I have no incoming request to exploit to get this value, I'm making a fresh GET request with a couple of String valued query parameters, so I used a CaseInsensitiveMap, which implements the spec'ed interface. If any of this looks off base to you, please do tell, I've no familiarity with Jersey whatsoever, but I am just trying to make a pretty simple GET request. I will go try reading up on the Jersey code and it's care and feeding, but any details relating to this would be much appreciated. Also, I'm kind of surprised, what with jboss making statements about REST that it takes this level of screwing around to make a simple service call from an action pipeline, so there really is no support other than roll your own, eh? Anyway, thanks a *ton* for your kind contribution of code, and I will set about to getting this stuff working, any further details and / or pointers to docs gladly accepted...
--j
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552862#552862]
Start a new discussion in JBoss ESB Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2032]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20100715/4487e7b7/attachment.html
More information about the jboss-dev-forums
mailing list