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 » [ERROR] WEB SERVICE

Post new topic  Reply to topic
 [ERROR] WEB SERVICE « View previous topic :: View next topic » 
Author Message
anon_kb
PostPosted: Wed Aug 26, 2015 3:43 am    Post subject: [ERROR] WEB SERVICE Reply with quote

Acolyte

Joined: 13 Nov 2014
Posts: 74

Hi guys,

I'm developing a web service flow but I encountered this error whenever I send a request to the web service. I've already search the web and this forum, tried all possible solutions but still a fail.

Server did not recognize the value of HTTP Header SOAPAction

Do you know the cause of this issue? Any suggestion to solve this?. This is my code .

Code:
SET Environment.Variables.URL = 'http://10.216.70.138/TEST.SAMPLE/services/X_TEST_SAMPLE.WSEtiqSample.asmx';
       
       --Send Login Request
       SET OutputRoot.MQMD       = Environment.MQMD;
      SET OutputRoot.Properties    = Environment.Properties;
      
       --Header
      SET OutputRoot.MRM.soap:Header = '';       
       --Body
       SET OutputRoot.MRM.soap:Body.web:UserLogin.Username = 'WEB_SERVICE';
      SET OutputRoot.MRM.soap:Body.web:UserLogin.Password = 'LIMS';
      SET Environment.Destination.HTTP.RequestURL[1] = Environment.Variables.URL;


Thanks for your inputs!
Back to top
View user's profile Send private message
maurito
PostPosted: Wed Aug 26, 2015 3:47 am    Post subject: Re: [ERROR] WEB SERVICE Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

anon_kb wrote:
Hi guys,

I'm developing a web service flow but I encountered this error whenever I send a request to the web service. I've already search the web and this forum, tried all possible solutions but still a fail.

Server did not recognize the value of HTTP Header SOAPAction

Do you know the cause of this issue? Any suggestion to solve this?. This is my code .

Code:
SET Environment.Variables.URL = 'http://10.216.70.138/TEST.SAMPLE/services/X_TEST_SAMPLE.WSEtiqSample.asmx';
       
       --Send Login Request
       SET OutputRoot.MQMD       = Environment.MQMD;
      SET OutputRoot.Properties    = Environment.Properties;
      
       --Header
      SET OutputRoot.MRM.soap:Header = '';       
       --Body
       SET OutputRoot.MRM.soap:Body.web:UserLogin.Username = 'WEB_SERVICE';
      SET OutputRoot.MRM.soap:Body.web:UserLogin.Password = 'LIMS';
      SET Environment.Destination.HTTP.RequestURL[1] = Environment.Variables.URL;


Thanks for your inputs!


are you trying to build a MRM or SOAP message ?... you need to explain what you are trying to achieve
Back to top
View user's profile Send private message
anon_kb
PostPosted: Wed Aug 26, 2015 3:52 am    Post subject: Reply with quote

Acolyte

Joined: 13 Nov 2014
Posts: 74

I'm trying yo build an MRM then send that request and somehow gets a response to the web service.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 26, 2015 4:31 am    Post subject: Reply with quote

Grand High Poobah

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

anon_kb wrote:
I'm trying yo build an MRM then send that request and somehow gets a response to the web service.


Why? Why not the more traditional XML? Is this connected to what's hosting the web service - I don't recognize the asmx suffix on the URL (which is my bad)

What version of WMB/IIB?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Wed Aug 26, 2015 4:35 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

Why are you including the MQMD header and then also setting a destination URL?

Are you using HTTP or MQ to send the message?

As far as the SOAPAction HTTP header value goes you must match it up to the Action declared for that operation in the web service's WSDL.

soapUI does this for you automatically but since you are coding it in ESQL you have to do it yourself.

I also am confused why you are building an XML message using the MRM parser.
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Wed Aug 26, 2015 4:38 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

Also, what is the XML message you are trying to build?

You seem to be creating a SOAP Body but what about the SOAP Envelope?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 26, 2015 4:51 am    Post subject: Reply with quote

Grand High Poobah

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

joebuckeye wrote:
I also am confused why you are building an XML message using the MRM parser.


Because he's this guy and he needs the XML one tag to a line so the non-standard parser downstream can process it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 26, 2015 8:30 am    Post subject: Reply with quote

Grand High Poobah

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

Vitor wrote:
joebuckeye wrote:
I also am confused why you are building an XML message using the MRM parser.


Because he's this guy and he needs the XML one tag to a line so the non-standard parser downstream can process it.

You can do that but it gets painful to add a CRLF text element after each field...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed Aug 26, 2015 8:34 am    Post subject: Reply with quote

Grand High Poobah

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

fjb_saper wrote:
Vitor wrote:
joebuckeye wrote:
I also am confused why you are building an XML message using the MRM parser.


Because he's this guy and he needs the XML one tag to a line so the non-standard parser downstream can process it.

You can do that but it gets painful to add a CRLF text element after each field...




As we said in the other thread.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
anon_kb
PostPosted: Thu Aug 27, 2015 11:10 pm    Post subject: Reply with quote

Acolyte

Joined: 13 Nov 2014
Posts: 74

Hi again guys, I already solve the problem by adding SoapAction in the code. Another question, hope you don't mind.

I have this three functions. Login-Encapsulate Message-Logout

Code:

--Send Login Request
SET OutputRoot.MQMD       = Environment.MQMD;
SET OutputRoot.Properties    = Environment.Properties;
      
SET Environment.Variables.MessageType = 'Login';
--Header
SET OutputRoot.HTTPRequestHeader.SOAPAction = 'http://www.test.com/webservices/UserLogin';
SET OutputRoot.MRM.soap:Header = '';       
--Body
SET OutputRoot.MRM.soap:Body.web:UserLogin.Username = 'WEB_SERVICE';
SET OutputRoot.MRM.soap:Body.web:UserLogin.Password = 'LIMS';
SET Environment.Destination.HTTP.RequestURL[1] = Environment.Variables.URL;

--Map and Send ETIQ_FABRICATE Message with WS Request
ELSEIF Environment.Variables.RepeatCount = 2 THEN
DECLARE inRef REFERENCE TO InputRoot.XMLNSC.ETIQFlow1;
SET OutputRoot.MQMD       = Environment.MQMD;
SET OutputRoot.Properties    = InputRoot.Properties;
SET Environment.Variables.MessageType = 'Encapsulated Message';
SET OutputRoot.HTTPRequestHeader.SOAPAction = 'http://www.test.com/webservices/WSEtiqSQS';   
--Encapsulation
SET OutputRoot.MRM.soap:Header = '';   
SET OutputRoot.MRM.soap:Body.web:WSEtiqSQS.EtiqData = inRef;
SET Environment.Destination.HTTP.RequestURL[1] = Environment.Variables.URL;

--Send Logout Request
ELSEIF Environment.Variables.RepeatCount = 3 THEN
SET OutputRoot.MQMD       = Environment.MQMD;
SET OutputRoot.Properties    = Environment.Properties;
SET Environment.Variables.MessageType = 'Logout';
SET OutputRoot.HTTPRequestHeader.SOAPAction = 'http://www.test.com/webservices/UserLogout';
SET OutputRoot.MRM.soap:Body.web:UserLogout = '';
SET Environment.Destination.HTTP.RequestURL[1] = Environment.Variables.URL;
       END IF;


Problem is I can only make successful Request on the Login but if it continues the condition it suddenly stopped it doesnt allow anonymous user. Is there anyway to still carry on the Login until the condition ends. Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Aug 28, 2015 5:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you need to send more than one request in the same flow, then you need to call the compute node more than once and tell it to send out more than one message - but only one message at a time.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
anon_kb
PostPosted: Sun Aug 30, 2015 6:08 pm    Post subject: Reply with quote

Acolyte

Joined: 13 Nov 2014
Posts: 74

So it will still retain the session?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 31, 2015 4:36 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

anon_kb wrote:
So it will still retain the session?

If you don't erase it in the message tree.

The http based nodes do not manage sessions for you. You need to capture and reuse session IDs and cookies. These are just part of the logical message tree from the return.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
anon_kb
PostPosted: Mon Aug 31, 2015 10:58 pm    Post subject: Reply with quote

Acolyte

Joined: 13 Nov 2014
Posts: 74

Thanks for your reply Jeff, I'll try it.
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 » [ERROR] WEB SERVICE
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.