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 Failure response

Post new topic  Reply to topic
 SOAP Request Failure response « View previous topic :: View next topic » 
Author Message
sweraj
PostPosted: Wed Oct 19, 2011 6:49 pm    Post subject: SOAP Request Failure response Reply with quote

Novice

Joined: 13 Jul 2010
Posts: 14

Hi ,

I am getting an excepiton while hitting webservices using SOAPRequest node . Exception is.. HTTP/1.1 401 Invalid Session ID or Session Expired......... I have checked the generated soap request message in message flow and have tested through SoapUI tool and got the response.

I have generated the message set using the WSDL file which my client provided and configured that wsdl properties in SOAP request node also.

but i am getting the failure response only.. when I hit the same messsage using soapUI i am getting response.

Please find the exceptionlist for your reference.

Code:
Text:CHARACTER:WebService Request Exception
                     Insert
                           Type:INTEGER:12
                           Text:CHARACTER:436f6e74656e742d4c656e6774683a203337370d0a436f6e74656e742d547970
653a20746578742f786d6c3b20636861727365743d69626d2d3433370d0a486f73743a20637a636
86f6c73696e743137372e7072672d64632e64686c2e636f6d3a353535350d0a534f4150416374696
f6e3a202261646472657373446174615265747269657665220d0a50726f78792d436f6e6e656374
696f6e3a206b6565702d616c6976650d0a0d0a
                     Insert
                           Type:INTEGER:12
                           Text:CHARACTER:3c736f6170656e763a456e76656c6f706520786d6c6e733
a736f6170656e763d22687474703a2f2f736368656d61732e786d6c736f6170
2e6f72672f736f61702f656e76656c6f70652f2220786d6c6e733a6164643d22
687474703a2f2f7777772e64686c2e636f6d2f44484c4578707265737345757
26f70652f47532f6164647265737344617461223e3c736f6170656e763a4865
616465722f3e3c736f6170656e763a426f64793e3c6164643a416464726573
73446174614e6f726d616c697a653e3c6164643a616464726573732053747
24e6d3d22323630205350494e4e414b45522057415922204374794e6d3d2
2574553542056414c4c4559204349545922204374727943643d225553222
05a69703d223839393939223e3c4749205372634170703d22434442222f3e
3c2f6164643a616464726573733e3c2f6164643a4164647265737344617461
4e6f726d616c697a653e3c2f736f6170656e763a426f64793e3c2f736f61706
56e763a456e76656c6f70653e
                     Insert
                           Type:INTEGER:12
                           Text:CHARACTER:485454502f312e312034303120496e76616c6964205365
7373696f6e204944206f722053657373696f6e20457870697265640d0a436f
6e74656e742d547970653a20746578742f786d6c0d0a5757572d417574686
56e7469636174653a204261736963207265616c6d3d227765624d6574686
f6473220d0a43616368652d436f6e74726f6c3a2070726f78792d726576616
c69646174650d0a436f6e74656e742d4c656e6774683a20300d0a50726f78
792d436f6e6e656374696f6e3a204b6565702d416c6976650d0a436f6e6e65
6374696f6e3a204b6565702d416c6976650d0a50726f78792d737570706f72
743a2053657373696f6e2d62617365642d61757468656e7469636174696f6
e0d0a446174653a205468752c203230204f637420323031312030323a3334
3a343820474d540d0a0d0a
                     Insert
                           Type:INTEGER:5
                           Text:CHARACTER:
                     Insert
                           Type:INTEGER:5
                           Text:CHARACTER:POST http://czcholsint177.prg-dc.dhl.com:5555/ws/DHLExpressEurope.GS:addressData HTTP/1.1

                     RecoverableException
                           File:CHARACTER:F:\build\S700_P\src\WebServices\WSLibrary\ImbSOAPRequestHelper.cpp
                           Line:INTEGER:1732
                           Function:CHARACTER:ImbSOAPRequestHelper::makeSOAPRequest
                           Type:CHARACTER:
                           Name:CHARACTER:
                           Label:CHARACTER:
                           Catalog:CHARACTER:BIPmsgs
                           Severity:INTEGER:3
                           Number:INTEGER:3691
                           Text:CHARACTER:SyncRequest HTTP Error returned
                           Insert
                                 Type:INTEGER:5
                                 Text:CHARACTER:HTTP/1.1 401 Invalid Session ID or Session Expired
                           Insert
                                 Type:INTEGER:5
                                 Text:CHARACTER:http://czcholsint177.prg-dc.dhl.com:5555/ws/DHLExpressEurope.GS:addressData

Kindly suggest me is there any other things that I have to set for SOAP request node. .. I am not understanding How I am getting the proper response if am using SoapUI tool but not getting resposne through message flow..

Look forwad to your help..
Thanks & Regards
Sweraj
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Oct 19, 2011 10:25 pm    Post subject: Reply with quote

Grand High Poobah

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

Inspect the message on the wire. You'll probably come to notice that you're not sending what you believe you are sending...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sweraj
PostPosted: Wed Oct 19, 2011 10:46 pm    Post subject: Reply with quote

Novice

Joined: 13 Jul 2010
Posts: 14

Hi Saper,

Below is the code i am using to construct the soap message (xmlnsc domain) and the same constructed message is giving proper response in SoapUI tool.

Code:
DECLARE outRef REFERENCE TO OutputRoot;
      DECLARE inRef REFERENCE TO InputRoot.XML.MSG.Bd.Shp;
      CREATE LASTCHILD OF outRef AS outRef DOMAIN 'XMLNSC' NAME 'XMLNSC';
      
      DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/' ;
      DECLARE add NAMESPACE 'http://www.ldl.com/LDLExpressEurope/GS/addressData';
   
      SET outRef.soapenv:Envelope.(XMLNSC.NamespaceDecl)xmlns:"soapenv"=soapenv;      
      SET outRef.soapenv:Envelope.(XMLNSC.NamespaceDecl)xmlns:"add"=add;
      
      CREATE FIELD outRef.soapenv:Envelope.soapenv:Header;
   
      DECLARE i INTEGER 1;
      DECLARE scDtlCount INTEGER CARDINALITY(inRef.ShpTr.SCDtl[]);
      
      WHILE i <= scDtlCount DO
         
         IF inRef.ShpTr.SCDtl[i].(XML.Attribute)CRlTyCd = 'RV' THEN      
            IF (inRef.ShpTr.SCDtl.(XML.Attribute)StrNm <>  ' ') THEN
               SET outRef.soapenv:Envelope.soapenv:Body.add:AddressDataNormalize.add:address.(XMLNSC.Attribute)StrNm = inRef.ShpTr.SCDtl.(XML.Attribute)StrNm;
            ELSE
               SET outRef.soapenv:Envelope.soapenv:Body.add:AddressDataNormalize.add:address.(XMLNSC.Attribute)StrNm = inRef.ShpTr.SCDtl.(XML.Attribute)Addr1;
            END IF;
            
            SET outRef.soapenv:Envelope.soapenv:Body.add:AddressDataNormalize.add:address.(XMLNSC.Attribute)CtyNm = inRef.ShpTr.SCDtl.(XML.Attribute)CtyNm;
            SET outRef.soapenv:Envelope.soapenv:Body.add:AddressDataNormalize.add:address.(XMLNSC.Attribute)CtryCd = inRef.ShpTr.SCDtl.(XML.Attribute)CtryCd;
            SET outRef.soapenv:Envelope.soapenv:Body.add:AddressDataNormalize.add:address.(XMLNSC.Attribute)Zip = inRef.ShpTr.SCDtl.(XML.Attribute)Zip;
            SET outRef.soapenv:Envelope.soapenv:Body.add:AddressDataNormalize.add:address.GI.(XMLNSC.Attribute)SrcApp = InputRoot.XML.MSG.Hdr.Sndr.(XML.Attribute)AppNm;
            SET outRef.soapenv:Envelope.soapenv:Body.add:AddressDataNormalize.add:address.(XMLNSC.Attribute)StrNo = inRef.ShpTr.SCDtl.(XML.Attribute)StrNo;   
         END IF; 
         
         SET i = i +1;
      END WHILE; 


Here is the message after construction.
---------------------------------------------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:add="http://www.ldl.com/LDLExpressEurope/GS/addressData">
 <soapenv:Header/>
 <soapenv:Body>
  <add:AddressDataNormalize>
   <add:address StrNm="260 SPINNAKER WAY" CtyNm="WEST VALLEY CITY" CtryCd="US" Zip="89999">
    <GI SrcApp="CDB"/>
   </add:address>
  </add:AddressDataNormalize>
 </soapenv:Body>
</soapenv:Envelope>


pls let me know if anything i missed out to hit the webservice... OR is this might be a network issue while broker trying to call webservice... ??

If any there any wrong in soap body then I believe, I will get some error response or fault response. But I am getting the " HTTP/1.1 401 Invalid Session ID or Session Expired " error Number 3691 .. from failure terminal.....

Regards
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Oct 19, 2011 11:03 pm    Post subject: Reply with quote

Grand High Poobah

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

And what do you think does your message look like when i=2 or 3?
Your outref as reference to OutputRoot is useless at best (you are still walking the full tree from the parser on...) and confusing at worst.
You should move it at the loop level!

Oviously you did not understand the usage of references in loops.

Do you need to pass any credentials? Did you set up the service for that?


_________________
MQ & Broker admin


Last edited by fjb_saper on Wed Oct 19, 2011 11:20 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
sweraj
PostPosted: Wed Oct 19, 2011 11:20 pm    Post subject: Reply with quote

Novice

Joined: 13 Jul 2010
Posts: 14

hmm.. you are right (i will change the code) ..... This webservice is a third party service and no need to pass any credentials..
Back to top
View user's profile Send private message
rekarm01
PostPosted: Wed Oct 19, 2011 11:38 pm    Post subject: Re: SOAP Request Failure response Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Not that this is causing any Exceptions, but is there any particular reason that InputRoot is using the XML domain, rather than XMLNSC?
Back to top
View user's profile Send private message
sweraj
PostPosted: Wed Oct 19, 2011 11:50 pm    Post subject: Reply with quote

Novice

Joined: 13 Jul 2010
Posts: 14

Rek, I am getting plain XML request and I am generating a XMLNSC domain message from the INPUT request in the compute node.. to make a webservice call....

What is exaclty that Error " Invalid Session ID OR Session Expired ". What does it mean.. is that service is expecting anything from my request... is that SessionID is any key or something...

Back to top
View user's profile Send private message
rekarm01
PostPosted: Thu Oct 20, 2011 1:27 am    Post subject: Re: SOAP Request Failure response Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

sweraj wrote:
Rek, I am getting plain XML request

XMLNSC supports plain XML requests. The XML domain is deprecated; new message flows should not use it.

sweraj wrote:
What is exaclty that Error " Invalid Session ID OR Session Expired ". What does it mean..

The third party service is returning that error to the broker. It's expecting some form of authentication:
Code:
HTTP/1.1 401 Invalid Session ID or Session Expired
Content-Type: text/xml
WWW-Authenticate: Basic realm="webMethods"
Cache-Control: proxy-revalidate
Content-Length: 0
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
Proxy-support: Session-based-authentication
Date: Thu, 20 Oct 2011 02:34:48 GMT

Ask the service provider what it means. The broker is merely reporting the error.
Back to top
View user's profile Send private message
sweraj
PostPosted: Thu Oct 20, 2011 1:40 am    Post subject: Reply with quote

Novice

Joined: 13 Jul 2010
Posts: 14

Thank you so much Rek and Saper, Certianly I will change the XML domain and OutRef code in my message flow and will check with the service provider about the authentication detials... If I get any doubt I will come back to you.. Once agian thanks for your help..

Regards
Sweraj
Back to top
View user's profile Send private message
sweraj
PostPosted: Thu Oct 20, 2011 1:43 am    Post subject: Reply with quote

Novice

Joined: 13 Jul 2010
Posts: 14

But one Doubt.. How SoapUI is getting proper response.. that soapUI doesn't need any authentication??... That soapUI is also on the same system and environment.!!!

Back to top
View user's profile Send private message
rekarm01
PostPosted: Thu Oct 20, 2011 2:58 am    Post subject: Re: SOAP Request Failure response Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

sweraj wrote:
But one Doubt.. How SoapUI is getting proper response.. that soapUI doesn't need any authentication??

Compare the soapUI request message with the broker request message (especially the HTTP headers), to see what's different:
Code:
Content-Length: 377
Content-Type: text/xml; charset=ibm-437
Host: czcholsint177.prg-dc.dhl.com:5555
SOAPAction: "addressDataRetrieve"
Proxy-Connection: keep-alive

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:add="http://www.dhl.com/DHLExpressEurope/GS/addressData"><soapenv:Header/><soapenv:Body><add:AddressDataNormalize><add:address StrNm="260 SPINNAKER WAY" CtyNm="WEST VALLEY CITY" CtryCd="US" Zip="89999"><GI SrcApp="CDB"/></add:address></add:AddressDataNormalize></soapenv:Body></soapenv:Envelope>

At the very least, the namespace for xlmns:add doesn't seem to match the given code.
Back to top
View user's profile Send private message
sweraj
PostPosted: Thu Oct 20, 2011 3:21 am    Post subject: Reply with quote

Novice

Joined: 13 Jul 2010
Posts: 14

Hi Rek / Saper, Thank you very much for your valuable suggestions.. now I got the proper response.. there is a problem in the HTTP Header - Authorization ID..a small omission in that..

Really happy of your help..
Back to top
View user's profile Send private message
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 Failure response
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.