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 » SOAPAction error for webservice(HTTPRequestNode)

Post new topic  Reply to topic
 SOAPAction error for webservice(HTTPRequestNode) « View previous topic :: View next topic » 
Author Message
matam_viswa
PostPosted: Thu Jul 05, 2007 3:21 am    Post subject: SOAPAction error for webservice(HTTPRequestNode) Reply with quote

Novice

Joined: 30 Jul 2006
Posts: 17

Hi,
I am using the HttpRequest node for webservices and facing some problems. I am getting null as response from webservice.

Please find the below details of my Flow

inputNode->computeNode1->Computenode2->HTTPRequestNode-->ComputeNode3-->OutputNode1


HTTPRequest Node: Properties

------
WebService URL: http://lolita/catchservice/service.asmx
RequestTimeout: 180 sec

HttpSettings:
Httpversion: 1.1
Advanced: all are default except the Generate Http Headers from input
----

Code:

ComputeNode1:

-------------
CALL CopyMessageHeaders();
SET Environment.MQMD = InputRoot.MQMD;
SET Environment.Properties1 = InputRoot.Properties;
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 = '2008-01-06';     
SET OutputRoot.XML.TXLifeRequest.OLifE.Holding.(XML.attr)id='HOLD1';
SET OutputRoot.XML.TXLifeRequest.OLifE.Holding.HoldingKey = '10001733';
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.(XML.attr)tc ='1';
SET OutputRoot.XML.TXLifeRequest.OLifE.Holding.OLifEExtension.DocumentType = 'Contribution Certificate';
-------------

ComputeNode2:

-----------

SET OutputRoot.Properties.MessageSet='H4M82FS002001';
SET OutputRoot.Properties.MessageFormat='XML1';
 SET OutputRoot.Properties.MessageType ='Envelope';

SET Environment.Variable.XML = InputRoot.XML;
SET OutputRoot.XML = NULL;
SET OutputRoot.HTTPRequestHeader.Host ='lolita';
SET OutputRoot.HTTPRequestHeader."Content-Type"= 'text/xml; charset=utf-8';
SET OutputRoot.HTTPRequestHeader.SOAPAction = 'http://www.liberty.co.za/RequestTaxYears';
SET OutputRoot.MRM.soapenv:Body.tns:RequestTaxYears.node =Environment.Variable.XML;
-----------------

ComputeNode3:

------------
CALL CopyEntireMessage();
      SET OutputRoot.HTTPResponseHeader = NULL;
      SET OutputRoot.HTTPRequestHeader = NULL;
      SET OutputRoot.Properties = Environment.Properties1;
      CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN 'MQMD';
      SET OutputRoot.MQMD = Environment.MQMD;

      SET OutputRoot.Properties.MessageSet='H4M82FS002001';
      SET OutputRoot.Properties.MessageFormat='XML1';
      SET OutputRoot.Properties.MessageType ='Envelope';   
-----------


output message of computeNode2 is below and this is input for HttpRequest Node
------------------

Host: lolita
Content-Type: text/xml; charset=utf-8
SOAPAction: http://www.liberty.co.za/RequestTaxYears

<?xml version="1.0"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://www.liberty.co.za/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xml="http://www.w3.org/XML/1998/namespace"><soapenv:Body><tns:RequestTaxYears><node><TXLifeRequest><TransRefGUID>414d51204c4d4436554d5149202020204624a52021f6af02</TransRefGUID><TransType>Contribution Certificate</TransType><TransExeDate>2008-01-06</TransExeDate><OLifE><Holding><id>HOLD1</id><HoldingKey>10001733</HoldingKey><OLifEExtension><VendorCode>LIB</VendorCode><SystemCode>CATCH</SystemCode><DocumentType>Contribution Certificate</DocumentType></OLifEExtension></Holding></OLifE></TXLifeRequest></node></tns:RequestTaxYears></soapenv:Body></soapenv:Envelope>
----------------------

Response from webservice (output of HttpRequestNode)

---------------------

<?xml version="1.0"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://www.liberty.co.za/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xml="http://www.w3.org/XML/1998/namespace"><soapenv:Body><tns:RequestTaxYearsResponse><tns:RequestTaxYearsResult></tns:RequestTaxYearsResult></tns:RequestTaxYearsResponse></soapenv:Body></soapenv:Envelope>

-----------------------



I am submitting the below input in webservice(their server i.e (http://lolita/catchservice/service.asmx?op=RequestTaxYears) ) and getting successful response
---------------------
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><RequestTaxYears xmlns="http://www.liberty.co.za/"><node><TXLifeRequest><TransRefGUID>c3e2d840d4d8c4f14040404040404040c0abb2c606341409</TransRefGUID> <TransType tc='310'>Contribution Certificate</TransType><TransExeDate>2007-04-01</TransExeDate><OLifE><Holding id='HOLD1'><HoldingKey>10001733</HoldingKey><OLifEExtension VendorCode= 'LIB' SystemCode= 'CATCH'><DocumentType tc= '1'>Contribution Certificate</DocumentType></OLifEExtension></Holding></OLifE></TXLifeRequest></node></RequestTaxYears></soap:Body></soap:Envelope>

--------------

Response from webservice is

-------------------------

<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://www.liberty.co.za/"><?xml version="1.0" encoding="utf-16"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><RequestTaxYears xmlns="http://www.liberty.co.za/"><node><TXLifeRequest><TransRefGUID></TransRefGUID><TransType tc="310">FormInstance Search</TransType><TransExeDate></TransExeDate><TransExeTime>0</TransExeTime><Transresult><ResultCode tc="4">Scuess</ResultCode><RecordsFound>1</RecordsFound></Transresult><OLifE><Holding id="HOLD1" xmlns=""><HoldingKey>10001733</HoldingKey><AsOfDate>20060228 </AsOfDate><OLifEExtension><DocumentType tc="1">Contribution Certificate</DocumentType></OLifEExtension></Holding></OLifE></TXLifeRequest></node>

---------------------




And I am submitting the same input message in NetTool 4.7.2

Method: post
Url:http://lolita/catchservice/service.asmx
Headers:

SoapAction: http://www.liberty.co.za/RequestTaxYears
Content-Type: text/xml; charset=utf-8

Getting response from the webservice is:

-------------
HTTP/1.1 415 Unsupported Media Type
Date: Thu, 05 Jul 2007 09:43:29 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Length: 0
----------------



please help me to solve in this regard.

Regards
Viswa
Back to top
View user's profile Send private message
matam_viswa
PostPosted: Tue Jul 10, 2007 6:24 am    Post subject: XMLNS problem while generating the message for WS Reply with quote

Novice

Joined: 30 Jul 2006
Posts: 17

Hi All,
I need help from the group.

My webservice is working fine and i am facing problem with supplying the correct input to the webservice.
webservice expects the input as below


-----------

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<RequestTaxYears xmlns="http://www.liberty.co.za/">
<node>
<TXLifeRequest>
<TransRefGUID>414d51204c4d4436554d5149202020204624a52022187902</TransRefGUID>
<TransType tc="310">Contribution Certificate</TransType>
<TransExeDate>2007-04-01</TransExeDate>
<OLifE>
<Holding id="HOLD">
<HoldingKey>10001733</HoldingKey>
<OLifEExtension VendorCode="LIB" SystemCode="CATCH">
<DocumentType tc="1">Contribution Certificate</DocumentType>
</OLifEExtension>
</Holding>
</OLifE>
</TXLifeRequest>
</node>
</RequestTaxYears>
</soap:Body>
</soap:Envelope>

-----------------


I am able to generate message as below for webservice
but i need to generate <RequestTaxYears xmlns="http://www.liberty.co.za/"> instead of <RequestTaxYears> below.

-


--------------

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body>
<RequestTaxYears>
<node>
<TXLifeRequest>
<TransRefGUID>414d51204c4d4436554d5149202020204624a52022187902</TransRefGUID>
<TransType tc="310">Contribution Certificate</TransType>
<TransExeDate>2007-04-01</TransExeDate>
<OLifE>
<Holding id="HOLD">
<HoldingKey>10001733</HoldingKey>
<OLifEExtension VendorCode="LIB" SystemCode="CATCH">
<DocumentType tc="1">Contribution Certificate</DocumentType>
</OLifEExtension>
</Holding>
</OLifE>
</TXLifeRequest>
</node>
</RequestTaxYears>
</soap:Body>
</soap:Envelope>
----------

The code iam using here to generate the above message is

Code:

CREATE COMPUTE MODULE FLOWFORWSO_Compute
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN
       CALL CopyMessageHeaders();
      -- CALL CopyEntireMessage();
       SET OutputRoot.Properties.MessageSet='JM30L2O002001';
       SET OutputRoot.Properties.MessageFormat='XML';
       SEt OutputRoot.Properties.MessageType='Envelope';
       SET OutputRoot.MQMD.Format ='MQSTR';
       SET Environment.Variables.msgblob = InputRoot.BLOB.BLOB;
       SET Environment.Variables.msgchar = CAST(Environment.Variables.msgblob as char CCSID       InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);
       SET OutputRoot.MRM.soap:Body.RequestTaxYears.node = Environment.Variables.msgchar;
RETURN TRUE;
END;



I am using the WSDL file in my messageSET for creating message definition file.

Please find my WSDL as below

-----------------------
<?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="RequestXML" 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" xmlns="http://www.liberty.co.za/" >
<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>

--------------
Back to top
View user's profile Send private message
chanti
PostPosted: Tue Jul 10, 2007 11:55 am    Post subject: Reply with quote

Novice

Joined: 20 Dec 2005
Posts: 11

You can do it by adding the attribute value to the root element "RequestTaxYears".

this code will do it for you.

RequestTaxYears.(XML.attr)xmlns='http://www.liberty.co.za/'
Back to top
View user's profile Send private message
wbi_telecom
PostPosted: Tue Jul 10, 2007 12:10 pm    Post subject: Reply with quote

Disciple

Joined: 15 Feb 2006
Posts: 188
Location: Harrisburg, PA

I think that's the namespace to which the element belongs. You need to set the namespace in your OutputRoot.

Cheers,
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jul 10, 2007 3:54 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Except, of course, this is a double-post.
_________________
I am *not* the model of the modern major general.
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 » SOAPAction error for webservice(HTTPRequestNode)
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.