Author |
Message
|
MSV |
Posted: Wed Nov 08, 2006 1:43 am Post subject: Internal server error while calling a webservice |
|
|
Acolyte
Joined: 11 Apr 2006 Posts: 59
|
Hi,
I am trying to call a webservice(found on net).
Created a message flow.
Mqinput->HttpRequest-->compute-->Mqoutput
The Mqinput nodes takes the SoapRequest message and sends it to the HTTPRequest node.
At the HTTPRequest node, message is propogated from the error terminal giving "X-Original-HTTP-Status-Line = HTTP/1.1 500 Internal Server Error" in HTTPResponseHeader.
I had tested the webservice in WSAD and the SoapResponse message is being generated successfully.
What might be the reason for the error in MessageBroker ?
Thanks in advance. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 08, 2006 3:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
a 500 error code means the service responded to the HTTP protocol, but threw an error trying to process the document you sent.
So your request is not well formed for the service you're invoking. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
MSV |
Posted: Wed Nov 08, 2006 4:39 am Post subject: |
|
|
Acolyte
Joined: 11 Apr 2006 Posts: 59
|
jefflowrey wrote: |
So your request is not well formed for the service you're invoking. |
As i'm able to get the expected Soap response using WSAD, the same input message should work fine within MB.
I tried in the following ways to resolve the error. But, in vain
1) Sent the same message as it is to HTTPRequest
2) Placed a compute node (between Mqinput and HttpRequest)and removed mqmd headers
Are there any specific headers we need to add to the incoming message before sending it to HTTPRequest node ?
Environment:
MB 6.0.0.1,MQ 6.0,Win XP |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 08, 2006 4:41 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes, if you have written your message flow to present the exact same message, then it should indeed work just the same as with WSAD.
You probably won't make any progress on this until you ask the server side what they don't like about the message from Broker. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mgk |
Posted: Wed Nov 08, 2006 5:03 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Can you post the BLOB body of the 500 reply from the server? _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
MSV |
Posted: Wed Nov 08, 2006 6:02 am Post subject: |
|
|
Acolyte
Joined: 11 Apr 2006 Posts: 59
|
MGK,
This is how my message looks after propogating though the HTTPRequest's ERROR terminal
(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = FALSE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2006-11-08 13:58:10.402'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = 'text/xml; charset=utf-8'
)
(0x01000000):HTTPResponseHeader = (
(0x03000000):X-Original-HTTP-Status-Line = 'HTTP/1.1 500 Internal Server Error.'
(0x03000000):X-Original-HTTP-Status-Code = 500
(0x03000000):Server = 'Microsoft-IIS/5.0'
(0x03000000):Date = 'Wed, 08 Nov 2006 13:58:30 GMT'
(0x03000000):X-Powered-By = 'ASP.NET'
(0x03000000):X-AspNet-Version = '1.1.4322'
(0x03000000):Cache-Control = 'private'
(0x03000000):Content-Type = 'text/xml; charset=utf-8'
(0x03000000):Content-Length = '453'
)
(0x01000000):BLOB = (
(0x03000000):UnknownParserName = ''
(0x03000000):BLOB = X'3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d227574662d38223f3e0d0a3c736f61703a456e76656c6f706520786d6c6e733a736f61703d22687474703a2f2f736368656d61732e786d6c736f61702e6f72672f736f61702f656e76656c6f70652f2220786d6c6e733a7873693d22687474703a2f2f7777772e77332e6f72672f323030312f584d4c536368656d612d696e7374616e63652220786d6c6e733a7873643d22687474703a2f2f7777772e77332e6f72672f323030312f584d4c536368656d61223e0d0a20203c736f61703a426f64793e0d0a202020203c736f61703a4661756c743e0d0a2020202020203c6661756c74636f64653e736f61703a436c69656e743c2f6661756c74636f64653e0d0a2020202020203c6661756c74737472696e673e53657276657220646964206e6f74207265636f676e697a65207468652076616c7565206f6620485454502048656164657220534f4150416374696f6e3a202e3c2f6661756c74737472696e673e0d0a2020202020203c64657461696c202f3e0d0a202020203c2f736f61703a4661756c743e0d0a20203c2f736f61703a426f64793e0d0a3c2f736f61703a456e76656c6f70653e'
)
) |
|
Back to top |
|
 |
mgk |
Posted: Wed Nov 08, 2006 6:39 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
And that BLOB contains the following SOAP FAULT info:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XM
LSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Server did not recognize the value of HTTP Header SOAPAction:
.</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
Which tells you you need to set up the SOAPAction header in an HTTPRequestHeader parser in a Compute node before the HTTPRequest node.
This is really only a specific form of what Jeff was telling you to do: make sure your input message matches what the server wants:-)
This is because by default the HTTPRequest Node sends an Empty "" SOAPAction header, so you have to set it explicitly (if your server wants a SOAPAction header).
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Last edited by mgk on Wed Nov 08, 2006 7:41 am; edited 1 time in total |
|
Back to top |
|
 |
MSV |
Posted: Thu Nov 09, 2006 5:24 am Post subject: |
|
|
Acolyte
Joined: 11 Apr 2006 Posts: 59
|
Thank you Jeff and MGK,
The problem is resolved after setting the required HTTPRequest headers. |
|
Back to top |
|
 |
psicosisdark |
Posted: Wed Jun 20, 2007 2:27 pm Post subject: |
|
|
Newbie
Joined: 18 Apr 2007 Posts: 2
|
Hi, I have the same problem...
but When I was put the TAG SOAPACtion the error is
SET OutputRoot.HTTPRequestHeader.SOAPAction='"http://tempuri.org/WS/EM"';
X-Original-HTTP-Status-Line = HTTP/1.1 400 Bad Request
X-Original-HTTP-Status-Code= 400
Can you help me? |
|
Back to top |
|
 |
MSV |
Posted: Tue Jun 26, 2007 1:44 am Post subject: |
|
|
Acolyte
Joined: 11 Apr 2006 Posts: 59
|
psicosisdark wrote: |
Hi, I have the same problem...
but When I was put the TAG SOAPACtion the error is
SET OutputRoot.HTTPRequestHeader.SOAPAction='"http://tempuri.org/WS/EM"';
X-Original-HTTP-Status-Line = HTTP/1.1 400 Bad Request
X-Original-HTTP-Status-Code= 400
Can you help me? |
Try this code(RHS within single quotes)
Code: |
SET OutputRoot.HTTPRequestHeader.SOAPAction='http://tempuri.org/WS/EM'; |
Please provide me the webservice URL which u r specifying in HTTPRequest node of ur message flow. |
|
Back to top |
|
 |
matam_viswa |
Posted: Wed Jun 27, 2007 2:30 am Post subject: SOAPAction error for webservice |
|
|
Novice
Joined: 30 Jul 2006 Posts: 17
|
Hi,
I am facing problem with HttpRequest Node.The error i am getting from the webservice is:
SOAPAction: http://www.liberty.co.za/RequestTaxYears..Content-Length: 56....
<h1>Bad Request (Invalid Hostname)</h1>.
Any one can please let me what i need specify in Soap action?
My FLOW:
InputNode-->ComputeNode1--->ComputeNode2-->HTTPRequestNode-->computeNode-->outputNode
The message
my code is
DECLARE tns NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE ns NAMESPACE 'http://www.liberty.co.za/';
DECLARE soap NAMESPACE 'http://schemas.xmlsoap.org/wsdl/soap/';
DECLARE tm NAMESPACE 'http://microsoft.com/wsdl/mime/textMatching/';
DECLARE soapenc NAMESPACE 'http://schemas.xmlsoap.org/soap/encoding/';
DECLARE mime NAMESPACE 'http://schemas.xmlsoap.org/wsdl/mime/';
DECLARE s NAMESPACE 'http://www.w3.org/2001/XMLSchema';
DECLARE soap12 NAMESPACE 'http://schemas.xmlsoap.org/wsdl/soap12/';
DECLARE http NAMESPACE 'http://schemas.xmlsoap.org/wsdl/http/';
DECLARE wsdl NAMESPACE 'http://schemas.xmlsoap.org/wsdl/';
ComputeNode1
SET Environment.MQMD = InputRoot.MQMD;
SET OutputRoot.Properties.MessageSet = 'J8971Q0002001';
SET OutputRoot.Properties.MessageType = 'Envelope';
SET OutputRoot.Properties.MessageFormat = 'XML1';
SET OutputRoot.XML.TXLifeRequest."TransRefGUID" =InputRoot.MQMD.MsgId;
SET OutputRoot.XML.TXLifeRequest."TransType".(XML.attr)tc='310';
SET OutputRoot.XML.TXLifeRequest."TransType" = 'Contribution Certificate';
SET OutputRoot.XML.TXLifeRequest."TransExeDate" = '2007-04-01';
SET OutputRoot.XML.TXLifeRequest.OLifE.Holding.(XML.attr)id='HOLD1';
SET Environment.Variables.Contract_Number='10000634';
SET OutputRoot.XML.TXLifeRequest.OLifE.Holding.HoldingKey = '10000634';
SET OutputRoot.XML.TXLifeRequest.OLifE.Holding.OLifEExtension.(XML.attr)VendorCode='LIB';
SET OutputRoot.XML.TXLifeRequest.OLifE.Holding.OLifEExtension.(XML.attr)SystemCode='CATCH';
SET OutputRoot.XML.TXLifeRequest.OLifE.Holding.OLifEExtension.DocumentType.tc ='1';
SET OutputRoot.XML.TXLifeRequest.OLifE.Holding.OLifEExtension.DocumentType = 'Contribution Certificate';
ComputeNode2
SET OutputRoot.Properties.MessageSet = 'J8971Q0002001';
SET OutputRoot.Properties.MessageType = 'Envelope';
SET OutputRoot.Properties.MessageFormat = 'XML1';
SET Environment.Properties1 = InputRoot.Properties;
SET Environment.Variables.XMLMessage = InputRoot.XML
SET OutputRoot.MRM.tns:Body.ns:RequestTaxYears.node = Environment.Variables.XMLMessage;
SET OutputRoot.HTTPRequestHeader.SOAPAction='http://www.liberty.co.za/RequestTaxYears';
HTTPRequestNode: properties
WebService URL* :http://lolita/CatchService/Service.asmx
----------
WSDL File
----------
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://www.liberty.co.za/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
targetNamespace="http://www.liberty.co.za/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.liberty.co.za/">
<s:element name="RequestOnline">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="node">
<s:complexType mixed="true">
<s:sequence>
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="RequestOnlineResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="RequestOnlineResult" type="s:boolean" />
<s:element minOccurs="0" maxOccurs="1" name="node">
<s:complexType mixed="true">
<s:sequence>
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetRole">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="userName" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetRoleResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetRoleResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="RequestTaxYears">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="node" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="RequestTaxYearsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RequestTaxYearsResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ProcessJob">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="JobType" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ProcessJobResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ProcessJobResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="SetMQSIStatus">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="str" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="SetMQSIStatusResponse">
<s:complexType />
</s:element>
<s:element name="RequestDuplicateCertificate">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="InputXML" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="RequestDuplicateCertificateResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RequestDuplicateCertificateResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="RequestOnlineSoapIn">
<wsdl:part name="parameters" element="tns:RequestOnline" />
</wsdl:message>
<wsdl:message name="RequestOnlineSoapOut">
<wsdl:part name="parameters" element="tns:RequestOnlineResponse" />
</wsdl:message>
<wsdl:message name="GetRoleSoapIn">
<wsdl:part name="parameters" element="tns:GetRole" />
</wsdl:message>
<wsdl:message name="GetRoleSoapOut">
<wsdl:part name="parameters" element="tns:GetRoleResponse" />
</wsdl:message>
<wsdl:message name="RequestTaxYearsSoapIn">
<wsdl:part name="parameters" element="tns:RequestTaxYears" />
</wsdl:message>
<wsdl:message name="RequestTaxYearsSoapOut">
<wsdl:part name="parameters" element="tns:RequestTaxYearsResponse" />
</wsdl:message>
<wsdl:message name="ProcessJobSoapIn">
<wsdl:part name="parameters" element="tns:ProcessJob" />
</wsdl:message>
<wsdl:message name="ProcessJobSoapOut">
<wsdl:part name="parameters" element="tns:ProcessJobResponse" />
</wsdl:message>
<wsdl:message name="SetMQSIStatusSoapIn">
<wsdl:part name="parameters" element="tns:SetMQSIStatus" />
</wsdl:message>
<wsdl:message name="SetMQSIStatusSoapOut">
<wsdl:part name="parameters" element="tns:SetMQSIStatusResponse" />
</wsdl:message>
<wsdl:message name="RequestDuplicateCertificateSoapIn">
<wsdl:part name="parameters" element="tns:RequestDuplicateCertificate" />
</wsdl:message>
<wsdl:message name="RequestDuplicateCertificateSoapOut">
<wsdl:part name="parameters" element="tns:RequestDuplicateCertificateResponse" />
</wsdl:message>
<wsdl:portType name="WCatchSoap">
<wsdl:operation name="RequestOnline">
<wsdl:input message="tns:RequestOnlineSoapIn" />
<wsdl:output message="tns:RequestOnlineSoapOut" />
</wsdl:operation>
<wsdl:operation name="GetRole">
<wsdl:input message="tns:GetRoleSoapIn" />
<wsdl:output message="tns:GetRoleSoapOut" />
</wsdl:operation>
<wsdl:operation name="RequestTaxYears">
<wsdl:input message="tns:RequestTaxYearsSoapIn" />
<wsdl:output message="tns:RequestTaxYearsSoapOut" />
</wsdl:operation>
<wsdl:operation name="ProcessJob">
<wsdl:input message="tns:ProcessJobSoapIn" />
<wsdl:output message="tns:ProcessJobSoapOut" />
</wsdl:operation>
<wsdl:operation name="SetMQSIStatus">
<wsdl:input message="tns:SetMQSIStatusSoapIn" />
<wsdl:output message="tns:SetMQSIStatusSoapOut" />
</wsdl:operation>
<wsdl:operation name="RequestDuplicateCertificate">
<wsdl:input message="tns:RequestDuplicateCertificateSoapIn" />
<wsdl:output message="tns:RequestDuplicateCertificateSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WCatchSoap" type="tns:WCatchSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="RequestOnline">
<soap:operation soapAction="http://www.liberty.co.za/RequestOnline" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetRole">
<soap:operation soapAction="http://www.liberty.co.za/GetRole" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="RequestTaxYears">
<soap:operation soapAction="http://www.liberty.co.za/RequestTaxYears" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ProcessJob">
<soap:operation soapAction="http://www.liberty.co.za/ProcessJob" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="SetMQSIStatus">
<soap:operation soapAction="http://www.liberty.co.za/SetMQSIStatus" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="RequestDuplicateCertificate">
<soap:operation soapAction="http://www.liberty.co.za/RequestDuplicateCertificate" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WCatch">
<wsdl:port name="WCatchSoap" binding="tns:WCatchSoap">
<soap:address location="http://Lolita/CatchService/service.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
---------------------
Regards
Viswa |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Jun 27, 2007 2:40 am Post subject: Re: SOAPAction error for webservice |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
matam_viswa wrote: |
Hi,
I am facing problem with HttpRequest Node.The error i am getting from the webservice is:... |
Open new thread and show request sent by HTTPRequest node (headers and data) and your ESQL code. _________________ Marcin |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Jun 27, 2007 2:42 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
psicosisdark wrote: |
Hi, I have the same problem...
but When I was put the TAG SOAPACtion the error is
SET OutputRoot.HTTPRequestHeader.SOAPAction='"http://tempuri.org/WS/EM"';
X-Original-HTTP-Status-Line = HTTP/1.1 400 Bad Request
X-Original-HTTP-Status-Code= 400
Can you help me? |
Open new thread and show request sent by HTTPRequest node (headers and data) and your ESQL code. _________________ Marcin |
|
Back to top |
|
 |
|