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 » Https web service calling

Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next
 Https web service calling « View previous topic :: View next topic » 
Author Message
kuzman
PostPosted: Wed May 04, 2011 6:05 am    Post subject: Reply with quote

Apprentice

Joined: 24 Aug 2010
Posts: 27

Yes,
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=/com.ibm.etools.mft.bipmsgs.doc/ay_bip3.htm

And it looks like as the IBM Websphere Toolkit Help.
It describes that how does it work as Webservice caller.
I didn't find any description how does it work as simple web page getter.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 04, 2011 6:10 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You did not post the link that you meant to post.

The difference between a "simple webpage getter" and "an http request" is absolutely nothing.

Every HTTP request returns an HTTP document. An HTTP document is a webpage.

If you are asking how to configure the HTTPRequest node to make an HTTP POST rather than an HTTP GET or the other way around... again, review the documentation.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 04, 2011 6:13 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kuzman wrote:
Yes,
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=/com.ibm.etools.mft.bipmsgs.doc/ay_bip3.htm

And it looks like as the IBM Websphere Toolkit Help.


That looks more like a list of error codes to me.

I was talking about this

kuzman wrote:
It describes that how does it work as Webservice caller.
I didn't find any description how does it work as simple web page getter.


I'll accept the text is focused on using it to access a web service (the more common use). Consider a web page as a simplistic response to a web service, where instead of posting a SOAP message to a url & getting a SOAP message back you simply ping the url and get some HTML back.

After that the InfoCenter has all you need.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kuzman
PostPosted: Wed May 04, 2011 6:29 am    Post subject: Reply with quote

Apprentice

Joined: 24 Aug 2010
Posts: 27

Sorry I want to send that link what you posted.
Same to the WMB Toolkit help, that desicribes how does it works as Webservice caller.

I tryed to GET the www.google.com
(Node settings:
url:http://www.google.com
http method:get

I got BLOB response what is an XML. And inside the xml is:
..
<blockquote>
<H1>Bad Request</H1>
Your client has issued a malformed or illegal request.

<p>
</blockquote>
..
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 04, 2011 6:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kuzman wrote:
I tryed to GET the www.google.com
(Node settings:
url:http://www.google.com
http method:get


What other settings did you set? How did you manage the http headers? What content (if any) did you send?

kuzman wrote:
I got BLOB response what is an XML. And inside the xml is:
..
<blockquote>
<H1>Bad Request</H1>
Your client has issued a malformed or illegal request.

<p>
</blockquote>
..


What was the associated http error?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kuzman
PostPosted: Wed May 04, 2011 6:54 am    Post subject: Reply with quote

Apprentice

Joined: 24 Aug 2010
Posts: 27

The http error is:
400 Bad Request

I am using HTTP Header Node and at HTTPRequesst part I use the Add Header checkbox, but I do not know what should add to the header
ACTION = GET or what?

The http rrequest node settings are the default, I have changed the WS url to www.google.com and http method:GET

I understand when I call Web service I make previously a SOAP request message from compute node and give to the http request node but to get simple webpage I do not know what kind of message should pass to the http request node.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 04, 2011 7:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kuzman wrote:
I am using HTTP Header Node and at HTTPRequesst part I use the Add Header checkbox, but I do not know what should add to the header
ACTION = GET or what?


Did you select GET as likely sounding or did you not use POST for a reason? Randomly selecting values & methods until you hit the right combination is going to be a long and painful process.

Don't forget that the broker in this instance is acting like any other http-aware application, it's just got a lot of the code already built in for you. So you'd use the same as you would in a Java or .NET application trying to read a web page.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kuzman
PostPosted: Wed May 04, 2011 7:15 am    Post subject: Reply with quote

Apprentice

Joined: 24 Aug 2010
Posts: 27

I use every time GET in the http request node bacause it is a get.

I ment I do not know what should I put to the http header node exactly.

From i.e to call a url from JAVa it is about 3-4 lines and it needs only the url.
I do not know what extra parameters travel in the call what the http request nodes makes.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 04, 2011 7:28 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kuzman wrote:
I use every time GET in the http request node bacause it is a get.


As you say.

kuzman wrote:
I ment I do not know what should I put to the http header node exactly.


Start with what you want the http headers to contain and work backwards.

kuzman wrote:
From i.e to call a url from JAVa it is about 3-4 lines and it needs only the url.
I do not know what extra parameters travel in the call what the http request nodes makes.


Much the same parameters the Java method is adding for you.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 04, 2011 7:38 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You need to pass an empty message to the HTTPRequest node if you want to make a GET call that is equivalent to the call made when you put a URL into a browser.

For example, put a Compute node before it that calls NEITHER CopyEntireMessage NOR CopyMessageHeaders.

If you then feel like using an HTTPHeader node to set things, you can, but it's not necessary.
Back to top
View user's profile Send private message
kuzman
PostPosted: Wed May 04, 2011 8:02 am    Post subject: Reply with quote

Apprentice

Joined: 24 Aug 2010
Posts: 27

thanks.
The problem was:
in the previous compute node I have used the copy message haders proc..
HTTP/1.1 200 OK
Back to top
View user's profile Send private message
kuzman
PostPosted: Wed May 04, 2011 8:54 am    Post subject: Reply with quote

Apprentice

Joined: 24 Aug 2010
Posts: 27

Please correct me if I am wrong.
If I should get https address with parameters in the url the broker automaticly changes the key if I set correctly the keystores.
In http request node case I have to define the keystore at execution group level, at broker level is not enough.

If I set incorrect trustedkeystore in the broker how can I remove it from the broker? The -v parameter couldn't be empty.
Back to top
View user's profile Send private message
kuzman
PostPosted: Mon May 09, 2011 7:35 am    Post subject: Reply with quote

Apprentice

Joined: 24 Aug 2010
Posts: 27

It turned out the https service allowed only key in pfx format.

I should create keystore in pkcs12 db format and import the key and set the mqsi parameters to reference that file.

I tried to import but I got the following error:

The provider for keystore type "IBMCMSKS" is not available.
Back to top
View user's profile Send private message
kuzman
PostPosted: Fri May 20, 2011 3:41 am    Post subject: Reply with quote

Apprentice

Joined: 24 Aug 2010
Posts: 27

The previous issue was closed.

I have to call Lotus Domino webservice on https with basic authentication. I biuld up the request , imported the server and client authetication certificate into the mq certificate keystore.
When I try to call the WebService on Https with basic authenticataion I get the following error (I put the authentication to the HttpRequest header):
Body
Fault
faultcode:CHARACTER:soapenv:Server.generalException faultstring:CHARACTER:org.xml.sax.SAXParseException: org.xml.sax.SAXParseException: Content is not allowed in prolog

I do net get any SLL handshake problem, and the message went out at the out node.
What is the problem with the content?

When I try to call the WebService on Https with client authentication, I do not have any problem.
When I try to call the WebService on Http with basic authentication (also the password and username in httprequest header in base64 encoded), I do not have any problem.
Back to top
View user's profile Send private message
kuzman
PostPosted: Fri May 20, 2011 4:06 am    Post subject: Reply with quote

Apprentice

Joined: 24 Aug 2010
Posts: 27

Problem solved.

The HTTPRequest header must be before the XMLNS root when I call https.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next Page 2 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Https web service calling
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.