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 » http request.

Post new topic  Reply to topic
 http request. « View previous topic :: View next topic » 
Author Message
sravan
PostPosted: Tue Jul 03, 2012 11:48 am    Post subject: http request. Reply with quote

Centurion

Joined: 02 Apr 2010
Posts: 104
Location: Charlotte

I am sending a http request as below (I am usingHTTP request node in MB)& (below is from SOAP UI) -

GET http://appstenv2.ABC.com/FAXWSA/service/outboundFax/faxUseIdAndTransactionId?faxUseId=999&transactionId=123456 HTTP/1.1
Authorization: Basic abcddHk3Ng==
Username: abc
User-Agent: Jakarta Commons-HttpClient/3.1
Host: appstenv2.highmark.com
Cookie: $Version=0; ObSSOCookie=loggedoutcontinue; $Path=/; $Domain=.highmark.com
Cookie: $Version=0; OBBasicAuth=fromDialog; $Path=/


Below values are defaulted when I set the Username property in request Properties section in the SOAP UI,Can I know how to set it in MB V7,Cookie: $Version=0; ObSSOCookie=loggedoutcontinue; $Path=/; $Domain=.highmark.com
Cookie: $Version=0; OBBasicAuth=fromDialog; $Path=/


Without these properties I am getting below returned from the webservice,The service team says it is from the apache webserver -
I am already setting the Basic Authorization in Base 64 encoded format correctly.

WWW-Authenticate Basic realm="LDAP username + password"
Date Tue, 03 Jul 2012 19:47:18 GMT
#status# HTTP/1.1 401 Authorization Required
Content-Length 401
Set-Cookie OBBasicAuth=fromDialog; path=/
Content-Type text/html; charset=iso-8859-1
Server Apache
_________________
skr_wmb
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Jul 03, 2012 11:59 am    Post subject: Reply with quote

Jedi Knight

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

If you are using SOAP, why not SOAPRequest node vs. HTTPRequest node?

Did you set the Default_Propagation property?
_________________
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
sravan
PostPosted: Tue Jul 03, 2012 1:02 pm    Post subject: Reply with quote

Centurion

Joined: 02 Apr 2010
Posts: 104
Location: Charlotte

I am using SOAP to test the REST bases request URL with Basic Authorization (base64 encoded user name & password)
set in the request header.

When I use default propogation It is giving below error - :

Wrong type in both mapped and source token,I am only setting the user name passowrd in the request header.
_________________
skr_wmb
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Jul 05, 2012 5:08 am    Post subject: Reply with quote

Jedi Knight

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

Please verify you have set these:

Code:
  SET OutputRoot.Properties.IdentitySourceType     = 'usernameAndPassword';
  SET OutputRoot.Properties.IdentitySourceToken    = 'therightuserid';
  SET OutputRoot.Properties.IdentitySourcePassword = 'therightpassword';

_________________
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 Jul 05, 2012 5:38 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

This is obsolete, but it might still be vaguely helpful.
http://www.ibm.com/developerworks/lotus/library/connections-social-authoring/#N1026C

ESQL these days has a base64encode and base64decode function available directly.

As lancelotlinc suggests, you can get BasicAuth using security profiles rather than hardcoding.
Back to top
View user's profile Send private message
sravan
PostPosted: Thu Jul 05, 2012 9:26 am    Post subject: Reply with quote

Centurion

Joined: 02 Apr 2010
Posts: 104
Location: Charlotte

I set using -

SET OutputRoot.Properties.IdentitySourceType = 'usernameAndPassword';
SET OutputRoot.Properties.IdentitySourceToken = 'therightuserid';
SET OutputRoot.Properties.IdentitySourcePassword = 'therightpassword';


and have the same http 401 error.

The error states WWW-Authenticate Basic realm="LDAP username + password"

How do we set it in ESQL.
_________________
skr_wmb
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Jul 05, 2012 10:08 am    Post subject: Reply with quote

Jedi Knight

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

401 means your uid/pwd is not correct, or you are trying to authenticate with the incorrect mechanism. Use SoapUI to validate your assumptions. Are you successful submitting a request using SoapUI?

Once you have been successful using SoapUI, take a service trace and compare the trace file with your SoapUI settings.
_________________
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
sravan
PostPosted: Thu Jul 05, 2012 10:21 am    Post subject: Reply with quote

Centurion

Joined: 02 Apr 2010
Posts: 104
Location: Charlotte

When Username file in SOAP UI is populated it is generating a
header as below and I am getting a response .

Cookie: $Version=0; ObSSOCookie=loggedoutcontinue; $Path=/; $Domain=.highmark.com
Cookie: $Version=0; OBBasicAuth=fromDialog; $Path=/

How do we set the Username field I entered in SAO UI in the ESQL?
_________________
skr_wmb
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Jul 05, 2012 10:45 am    Post subject: Reply with quote

Jedi Knight

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

sravan wrote:
When Username file in SOAP UI is populated it is generating a
header as below and I am getting a response .

Cookie: $Version=0; ObSSOCookie=loggedoutcontinue; $Path=/; $Domain=.highmark.com
Cookie: $Version=0; OBBasicAuth=fromDialog; $Path=/

How do we set the Username field I entered in SAO UI in the ESQL?



SOAPInput -> ESQL Compute -> SOAPRequest -> ESQL Compute -> SOAP Reply

lancelotlinc wrote:
Please verify you have set these:

Code:
  SET OutputRoot.Properties.IdentitySourceType     = 'usernameAndPassword';
  SET OutputRoot.Properties.IdentitySourceToken    = 'therightuserid';
  SET OutputRoot.Properties.IdentitySourcePassword = 'therightpassword';

_________________
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
marko.pitkanen
PostPosted: Thu Jul 05, 2012 11:02 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi sravan,

I propose you to do a quick testing with soapUI and message broker.
Implement simple flow: httpInput node -> trace node ( echo whole message tree to file or user trace).
Test Rest -service first with soapUI and when you get the successful response change request url pointing to the that simple flow. Evaluate the trace and you will perhaps find the answer. Keep in mind that httpInput herder need to perhaps be httpRequest header when you are creating your request from broker.

--
Marko
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » http request.
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.