ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » SOAP Request to REST GET URI conversion

Post new topic  Reply to topic
 SOAP Request to REST GET URI conversion « View previous topic :: View next topic » 
Author Message
kevin0304
PostPosted: Thu Feb 28, 2013 8:37 am    Post subject: SOAP Request to REST GET URI conversion Reply with quote

Newbie

Joined: 28 Feb 2013
Posts: 3

Hi,

I'm having consumer sending SOAP request and Provider supporting REST API and SOAP interfaces as well.

The REST API that has been implemented by provider requires less calls from message broker when compared to SOAP interface(as no wrapper Interface exist to call internal calls within the provider system) for a service request.

I want to validate the requests from consumer using SOAP WSDL and transform into REST GET URI (for my 'getinformation' interface) to call my provider. [requirement is to expect SOAP request from consumer]

- My understanding is that constructing an REST GET URI from SOAP request message in message broker could be very complex. URI to be constructed based on the few parameters in request and these parameters could be a long list. eg: get me a record with modified date on '28-02-2012' and with author 'kevin' of version 3.

1) Can I convert the SOAP request from consumer after validation into JSON format and send to my provider as REST GET with JSON payload.
I'm not sure on this. Looking into few documentation my understanding is we can not do a REST GET with payload ???
2) could above implementation be done with REST POST with JSON payload ???
I read while googling that when parameter list is quite big, the best option is to use REST POST with payload even though it has to be GET. Please advice if this is true. If I'm posting, I'm not deleting the rest of the informaiton that is not there in my request ???

Your ideas are much appreciated.

Thanks
Kevin
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Feb 28, 2013 8:44 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

You might try the sample, which demonstrates your scenarios:

http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.samples.jsonrest.doc%2Fdoc%2Fintroduction.htm
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Feb 28, 2013 8:45 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You need to send the message as required by the provider.

That may seem obvious, but it's really what you're asking about.

There's no specific reason that I'm aware of that you can't construct an arbitrarily long URL for an HTTP GET request that you send to the HTTPRequest node.
Back to top
View user's profile Send private message
kevin0304
PostPosted: Thu Feb 28, 2013 5:50 pm    Post subject: Reply with quote

Newbie

Joined: 28 Feb 2013
Posts: 3

Thanks for your responses.

The JSON sample someway similar to what I'm trying to do except I do not want to use the parameters appended in URI.

-with all parameters in URI as below
Code:
HTTP GET 
http://{hostname}:{port}/objectname/?text="record123"&pagesize=10&metadata="date updated" is "today"&metadata="owner" is "kevin"&metadata="version" is "3"......


rather than having as above, Is it possible to have something as below and still supported by REST API !!
Code:

HTTP GET
http://{hostname}:{port}/objectname
{
     "text": record123
     "pagezige": 10
     "metadata": [
                       "owner" : "kevin"
                       "Version" : 3
                       .................             
                      ]
}



Thanks
Kevin
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 28, 2013 7:59 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

mqjeff wrote:
You need to send the message as required by the provider.

That may seem obvious, but it's really what you're asking about.

There's no specific reason that I'm aware of that you can't construct an arbitrarily long URL for an HTTP GET request that you send to the HTTPRequest node.


I believe HTTP Get has a certain length limit. An HTTP POST if accepted by the provider will not be submitted to the same length constraints.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kevin0304
PostPosted: Thu Feb 28, 2013 10:00 pm    Post subject: Reply with quote

Newbie

Joined: 28 Feb 2013
Posts: 3

I think Http GET with payload is not possible. I was trying with google REST API with Chrome REST console and it seems that the payload is just getting ignored when doing REST get operation.

We can add the parameters in name value pairs which is working that this would be part of query.
something like below, which is working fine

Quote:
Request Url: https://www.google.com.au/search
Request Method: GET
Status Code: 200
Params: {
"q": "SOUTH AFRICA",
"num": "50",
"cr": "countryAU",
"as_filetype": "pdf",
"safe": "images"
}


I wondering how I can add complex parameter structure.

Any ideas!!!

Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Mar 01, 2013 9:30 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you looked into the http query string?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » SOAP Request to REST GET URI conversion
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.