Author |
Message
|
anon_kb |
Posted: Wed Aug 26, 2015 3:43 am Post subject: [ERROR] WEB SERVICE |
|
|
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 |
|
 |
maurito |
Posted: Wed Aug 26, 2015 3:47 am Post subject: Re: [ERROR] WEB SERVICE |
|
|
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 |
|
 |
anon_kb |
Posted: Wed Aug 26, 2015 3:52 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Wed Aug 26, 2015 4:31 am Post subject: |
|
|
 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 |
|
 |
joebuckeye |
Posted: Wed Aug 26, 2015 4:35 am Post subject: |
|
|
 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 |
|
 |
joebuckeye |
Posted: Wed Aug 26, 2015 4:38 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Wed Aug 26, 2015 4:51 am Post subject: |
|
|
 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 |
|
 |
fjb_saper |
Posted: Wed Aug 26, 2015 8:30 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Wed Aug 26, 2015 8:34 am Post subject: |
|
|
 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 |
|
 |
anon_kb |
Posted: Thu Aug 27, 2015 11:10 pm Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Fri Aug 28, 2015 5:54 am Post subject: |
|
|
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 |
|
 |
anon_kb |
Posted: Sun Aug 30, 2015 6:08 pm Post subject: |
|
|
Acolyte
Joined: 13 Nov 2014 Posts: 74
|
So it will still retain the session? |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Aug 31, 2015 4:36 am Post subject: |
|
|
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 |
|
 |
anon_kb |
Posted: Mon Aug 31, 2015 10:58 pm Post subject: |
|
|
Acolyte
Joined: 13 Nov 2014 Posts: 74
|
Thanks for your reply Jeff, I'll try it. |
|
Back to top |
|
 |
|