|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Calling an external webservice--problem with the request msg |
« View previous topic :: View next topic » |
Author |
Message
|
jefflowrey |
Posted: Mon Sep 24, 2007 11:13 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You need to work heavily with the other side, to understand how the data you are providing them is wrong.
That error message is particular to their application.
It may or may not have anything to do with <.
The only ways in the XML Specifications for including string data that represents XML structures, but not treat it as XML data, is to either use CDATA or entity encoding (<). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Sep 24, 2007 12:35 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20767 Location: LI,NY
|
How about something like this:
Code: |
declare myrsp char;
Set myrsp = InputRoot.XMLNS.soap:Envelope.soap:Body.GetISODataResponse.GetISODataResult.ISOResponses.Reports.Responses.Response;
create Environment.XMLNS PARSE myrsp domain XMLNS etc.....
|
And the tree under Environment .XMLNS is what you are looking for.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
chris boehnke |
Posted: Mon Sep 24, 2007 2:00 pm Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
fjb_saper wrote: |
How about something like this:
Code: |
declare myrsp char;
Set myrsp = InputRoot.XMLNS.soap:Envelope.soap:Body.GetISODataResponse.GetISODataResult.ISOResponses.Reports.Responses.Response;
create Environment.XMLNS PARSE myrsp domain XMLNS etc.....
|
And the tree under Environment .XMLNS is what you are looking for.
Enjoy  |
Hi fjb_saper,
Can you elaborate a bit?. If it works out would be great....Thanks. |
|
Back to top |
|
 |
dilse |
Posted: Mon Sep 24, 2007 2:31 pm Post subject: |
|
|
 Master
Joined: 24 Jun 2004 Posts: 270
|
Chris,
From my understanding you are getting the web service response just fine but they are sending the response(GetISODataResult) whole as a "String". That is the reason why you are not seeing any '<', '>' etc. but you are seeing only the escape characters in this tag(GetISODataResult). You need to read the "GetISODataResult" tag as a string and convert it to BLOB and then PARSE it as XML.
You could do something like the following.
Code: |
DECLARE NS1 NAMESPACE 'http://air-worldwide.com/webservices/';
SET Environment.Variables.BodyBlob = CAST(InputBody.soap:Envelope.soap:Body.NS1:GetISODataResponse.NS1:GetISODataResult AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
CREATE LASTCHILD OF OutputRoot DOMAIN 'XML' PARSE(Environment.Variables.BodyBlob); |
Note: You may also need to convert the "xmlReqStg" XML tree as a STRING and then assign this string to th tag "xmlReqStg" before you send out the request. I am hoping this hsould work just fine.
Hope this helps!! Let us know how it goes.
DilSe.. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Sep 24, 2007 2:39 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20767 Location: LI,NY
|
Code: |
create last child of Environment Name 'XMLNS' domain 'XMLNS';
declare myblob BLOB;
SET myblob = cast myrsp as BLOB CCSID InputRoot.Properties.CodedCharSetId;
Create lastChild of Environment.XMLNS Parse (myblob
OPTIONS FolderBitStream & ValidateNone
CCSID InputRoot.Properties.CodedCharSetId ) ;
Set OutputRoot.XMLNS.pathtomyelt = Environment.XMLNS; |
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
chris boehnke |
Posted: Tue Sep 25, 2007 9:34 pm Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
dilse wrote: |
Chris,
From my understanding you are getting the web service response just fine but they are sending the response(GetISODataResult) whole as a "String". That is the reason why you are not seeing any '<', '>' etc. but you are seeing only the escape characters in this tag(GetISODataResult). You need to read the "GetISODataResult" tag as a string and convert it to BLOB and then PARSE it as XML.
You could do something like the following.
Code: |
DECLARE NS1 NAMESPACE 'http://air-worldwide.com/webservices/';
SET Environment.Variables.BodyBlob = CAST(InputBody.soap:Envelope.soap:Body.NS1:GetISODataResponse.NS1:GetISODataResult AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
CREATE LASTCHILD OF OutputRoot DOMAIN 'XML' PARSE(Environment.Variables.BodyBlob); |
Note: You may also need to convert the "xmlReqStg" XML tree as a STRING and then assign this string to th tag "xmlReqStg" before you send out the request. I am hoping this hsould work just fine.
Hope this helps!! Let us know how it goes.
DilSe.. |
Hi DilSe,
Thanks for your response. I tried the code what you suggested. I am getting the parsing exception error for this statement
CREATE LASTCHILD OF OutputRoot DOMAIN 'XML' PARSE(Environment.Variables.BodyBlob);
I am posting the exception below...
Please suggest ...thanks. |
|
Back to top |
|
 |
chris boehnke |
Posted: Tue Sep 25, 2007 9:48 pm Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
fjb_saper wrote: |
Code: |
create last child of Environment Name 'XMLNS' domain 'XMLNS';
declare myblob BLOB;
SET myblob = cast myrsp as BLOB CCSID InputRoot.Properties.CodedCharSetId;
Create lastChild of Environment.XMLNS Parse (myblob
OPTIONS FolderBitStream & ValidateNone
CCSID InputRoot.Properties.CodedCharSetId ) ;
Set OutputRoot.XMLNS.pathtomyelt = Environment.XMLNS; |
 |
Hi fjb_saper and DilSe,
Here is the response message what I am getting from the webservice:
DebugMessage
Message
Properties
HTTPRequestHeader
Host = demo.aws.air-worldwide.com
Content-Length = 1257
SOAPAction = http://air-worldwide.com/webservices/GetISOData
POST = /aws/PassportToGo.asmx
ContentType = text/xml
Content-Type = text/xml; charset=utf-8
HTTPResponseHeader
X-Original-HTTP-Status-Line = HTTP/1.1 200 OK
X-Original-HTTP-Status-Code = 200
Date = Wed, 26 Sep 2007 05:26:51 GMT
Server = Microsoft-IIS/6.0
X-Powered-By = ASP.NET
X-AspNet-Version = 2.0.50727
Cache-Control = private, max-age=0
Content-Type = text/xml; charset=utf-8
Content-Length = 3040
Set-Cookie = HomeValueLB=1; Path=/; Domain=www.isohomevalue.com
XMLNS
Envelope
Body
GetISODataResponse
GetISODataResult
<ISOResponses><ResponseHeader><AIRTrack><Instance>633263668119292543;dhvasf1;AWS;2007-09-26T01:26:51.929-0400;/LM/W3SVC/1/Root/AWS-20-128352580095855643;</Instance><Instance>633263668119292543;dhvasf1;8089;2007-09-26T01:26:51.929-0400;Air.VL.ServiceHost.ServiceDriver.exe;AccumResponse;</Instance></AIRTrack><runtimeinformation responseid="1258357258;633263668119292543" clientparam="UnknownUserHostAddress"><time start="9/26/2007 1:26:50 AM" end="9/26/2007 1:26:51 AM" timespan="1.062" /><count reportcount="1" errorcount="0" /></runtimeinformation></ResponseHeader><Reports><Report product="HomeValueRepCost" version="5.2.0.24" timespan="1.062" sequence="2762" success="True" ASF.ErrorCode="1" ASF.ErrorMessage=";Server was unable to process request. ---> Object reference not set to an instance of an object." ASF.InfoMessage="Consolidated HomeValue with Engine" ASF.PercentCompleted="" ASF.StatusMessage="" ASF.Logfile=""><Responses><Response><ErrorReturn par0="NoHomeValueExc" par1="Server was unable to process request. ---> Object reference not set to an instance of an object." par2=" at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
 at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
 at HomeValueWS2.GetHomeValueRepCost(String strInputXML)
 at AirReportProvider.cHomeValueReport.GetReport(XmlDocument reqData)" par3="<ISORequests><RequestHeader><AIR><LoginID>WestfieldGroup_ws</LoginID><Password>west9919</Password><LicenseKey>QLAFKIUDJ%7DLWS%60WPCLAHABVKPT</LicenseKey></AIR><HomeValue><UserName>WestfieldGroup_ws</UserName><Password>west9919</Password><LicenseKey>QLAFKIUDJ%7DLWS%60WPCLAHABVKPT</LicenseKey></HomeValue></RequestHeader><ISORequest><Products>HomeValueRepCost</Products><Addresses><Address><RequestID>IQ-347593346-070206-103732</RequestID></Address></Addresses></ISORequest></ISORequests>" /></Response></Responses></Report></Reports></ISOResponses>
LocalEnvironment
Destination
HTTP
RequestURL = https://demo.aws.air-worldwide.com/aws/PassportToGo.asmx?op=GetISOData
Environment
Variables
SOA
MQMD
XSLTs
XMLNS
ExceptionList
OutputExceptionList
OutputLocalEnvironment
OutputRoot
This is the code in the Compute node what I am trying to modify the response message:
CALL CopyMessageHeaders();
-- Output is MQ, so remove HTTP headers
SET OutputRoot.HTTPRequestHeader = null;
SET OutputRoot.HTTPResponseHeader = null;
-- Add an MQMD, and restore from the original MQInput
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN 'MQMD';
SET OutputRoot.MQMD = Environment.MQMD;
--Dilse
-- DECLARE BodyBlob BLOB;
DECLARE NS1 NAMESPACE 'http://air-worldwide.com/webservices/';
CREATE FIELD Environment.Variables.BodyBlob;
SET Environment.Variables.BodyBlob = CAST(InputBody.soap:Envelope.soap:Body.NS1:GetISODataResponse.NS1:GetISODataResult AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
-- DECLARE options INTEGER BITOR(RootBitStream, ValidateContent,ValidateValue,ValidateImmediate);
--ibm site
-- DECLARE bodyBlob BLOB ASBITSTREAM(InputRoot.XML.TestCase.myFolder,
-- InputProperties.Encoding,
-- InputProperties.CodedCharSetId,",",",FolderBitStream);
-- DECLARE creationPtr REFERENCE TO OutputRoot;
-- CREATE LASTCHILD OF OutputRoot DOMAIN('XML') PARSE(Environment.Variables.BodyBlob,InputProperties.Encoding,InputProperties.CodedCharSetId,",",",FolderBitStream);
DECLARE myrsp BLOB ASBITSTREAM(Environment.Variables.BodyBlob, InputProperties.Encoding,
InputProperties.CodedCharSetId);
CREATE FIELD Environment.Variables.myXMLTree;
DECLARE creationPtr REFERENCE TO Environment.Variables.myXMLTree;
CREATE FIRSTCHILD OF creationPtr DOMAIN('XML') PARSE(myrsp,InputProperties.Encoding, InputProperties.CodedCharSetId);
--end ibm site
RETURN TRUE;
When I debug my code, I am getting the parsing excetion when I reach this part of the code:
CREATE FIRSTCHILD OF creationPtr DOMAIN('XML') PARSE(myrsp,InputProperties.Encoding, InputProperties.CodedCharSetId);
Here I am posting the exception:
Message
Properties
MQMD
BLOB
UnknownParserName = MQSTR
BLOB = 43424c4844563031303230304d5148445055542020202020202020202020202020202020202020202020202020202020202020204d51484447455420202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020205752432d484f4d452d56414c5545202020202020202020202020202020202020423533502d50524f442d5057455357313030202020202020202020202020202020202020202020202020202053455220313939323831312030332030302030303149512d3334373539333334362d3037303230362d3130333733322020202020202020202020202020202020202020202020203032363430303030202020202020202020
LocalEnvironment
Environment
Variables
SOA
myXMLTree
MQMD
XSLTs
XMLNS
ExceptionList
RecoverableException
File = /build/S600_P/src/DataFlowEngine/ImbDataFlowNode.cpp
Line = 616
Function = ImbDataFlowNode::createExceptionList
Type = ComIbmMQInputNode
Name = SOASchema/WestMF#FCMComposite_1_1
Label = SOASchema.WestMF.ESB.REQUEST
Catalog = BIPv600
Severity = 3
Number = 2230
Text = Node throwing exception
RecoverableException
File = /build/S600_P/src/DataFlowEngine/PluginInterface/ImbJniNode.cpp
Line = 922
Function = ImbJniNode::evaluate
Type = ComIbmJniNode
Name = SOASchema/WestF#FCMComposite_1_5
Label = SOASchema.WestMF.EndpointLookup
Catalog = BIPv600
Severity = 3
Number = 2230
Text = Caught exception and rethrowing
RecoverableException
File = /build/S600_P/src/DataFlowEngine/ImbComputeNode.cpp
Line = 464
Function = ImbComputeNode::evaluate
Type = ComIbmComputeNode
Name = SOASchema/WestMF#FCMComposite_1_31
Label = SOASchema.WestMF.RestoreOriginalMsgInfo
Catalog = BIPv600
Severity = 3
Number = 2230
Text = Caught exception and rethrowing
RecoverableException
File = /build/S600_P/src/DataFlowEngine/ImbRdl/ImbRdlStatementGroup.cpp
Line = 589
Function = SqlStatementGroup::execute
Type = ComIbmComputeNode
Name = SOASchema/WestMF#FCMComposite_1_31
Label = SOASchema.WestMF.RestoreOriginalMsgInfo
Catalog = BIPv600
Severity = 3
Number = 2488
Text = Error detected, rethrowing
Insert
Type = 5
Text = SOASchema.WestMF_RestoreOriginalMsgInfo.Main
Insert
Type = 5
Text = 33.1
Insert
Type = 5
Text = CREATE FIRSTCHILD OF creationPtr DOMAIN 'XML' PARSE(myrsp, InputProperties.Encoding, InputProperties.CodedCharSetId);
RecoverableException
File = /build/S600_P/src/DataFlowEngine/ImbRdl/ImbRdlTreeStatements.cpp
Line = 174
Function = SqlCreateFieldStatement::execute
Type = ComIbmComputeNode
Name = SOASchema/WestMF#FCMComposite_1_31
Label = SOASchema.WestMF.RestoreOriginalMsgInfo
Catalog = BIPv600
Severity = 3
Number = 2906
Text =
Insert
Type = 5
Text = SOASchema.WestMF_RestoreOriginalMsgInfo.Main
Insert
Type = 5
Text = 33.1
Insert
Type = 5
Text = NULL
Insert
Type = 5
Text = BITSTREAM
Insert
Type = 5
Text = CREATE
Insert
Type = 5
Text = CHARACTER, BIT, BLOB
Insert
Type = 5
Text = NULL
Please let me know your thoughts.....Thanks much |
|
Back to top |
|
 |
chris boehnke |
Posted: Wed Sep 26, 2007 4:56 am Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi Guys,
I am calling a webservice and I am getting a response but in the response some of the XML tags are missing...i.e. in place of '<' and '>' I am getting '<' and '>' respectively...
Here is the response what I am getting:
XMLNS
Envelope
Body
GetISODataResponse
GetISODataResult
<ISOResponses>
<ResponseHeader>
<AIRTrack>
<Instance>633263668119292543;dhvasf1;AWS;2007-09-26T01:26:51.929-0400;/LM/W3SVC/1/Root/AWS-20-128352580095855643;
</Instance>
<Instance>633263668119292543;dhvasf1;8089;2007-09-26T01:26:51.929-0400;Air.VL.ServiceHost.ServiceDriver.exe;AccumResponse;
</Instance>
</AIRTrack>
<runtimeinformation responseid="1258357258;633263668119292543" clientparam="UnknownUserHostAddress">
<time start="9/26/2007 1:26:50 AM" end="9/26/2007 1:26:51 AM" timespan="1.062" />
<count reportcount="1" errorcount="0" />
</runtimeinformation>
</ResponseHeader>
<Reports>
<Report product="HomeValueRepCost" version="5.2.0.24" timespan="1.062" sequence="2762" success="True" ASF.ErrorCode="1" ASF.ErrorMessage=";Server was unable to process request. ---> Object reference not set to an instance of an object." ASF.InfoMessage="Consolidated HomeValue with Engine" ASF.PercentCompleted="" ASF.StatusMessage="" ASF.Logfile="">
<Responses>
<Response>
<ErrorReturn par0="NoHomeValueExc" par1="Server was unable to process request. ---> Object reference not set to an instance of an object." par2=" at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
 at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
 at HomeValueWS2.GetHomeValueRepCost(String strInputXML)
 at AirReportProvider.cHomeValueReport.GetReport(XmlDocument reqData)" par3="<ISORequests><RequestHeader><AIR><LoginID>WestfieldGroup_ws</LoginID><Password>west9919</Password><LicenseKey>QLAFKIUDJ%7DLWS%60WPCLAHABVKPT</LicenseKey></AIR><HomeValue><UserName>WestfieldGroup_ws</UserName><Password>west9919</Password><LicenseKey>QLAFKIUDJ%7DLWS%60WPCLAHABVKPT</LicenseKey></HomeValue></RequestHeader><ISORequest><Products>HomeValueRepCost</Products><Addresses><Address><RequestID>IQ-347593346-070206-103732</RequestID></Address></Addresses></ISORequest></ISORequests>" />
</Response>
</Responses>
</Report>
</Reports>
</ISOResponses>
I need to convert the above message in to the proper XML message..i.e SOAP message.
My message flow looks like this :
MQInput->Compute node1->HTTPRequest node ->Compute node2->MQOutput
In the Compute node2, just after the HTTPRequest node, I am this part of the code to convert the above generated response to proper XML format.
DECLARE NS1 NAMESPACE 'http://air-worldwide.com/webservices/';
CREATE FIELD Environment.Variables.BodyBlob;
SET Environment.Variables.BodyBlob = CAST(InputBody.soap:Envelope.soap:Body.NS1:GetISODataResponse.NS1:GetISODataResult AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
DECLARE myrsp BLOB ASBITSTREAM(Environment.Variables.BodyBlob, InputProperties.Encoding,
InputProperties.CodedCharSetId);
CREATE FIELD Environment.Variables.myXMLTree;
DECLARE creationPtr REFERENCE TO Environment.Variables.myXMLTree;
CREATE FIRSTCHILD OF creationPtr DOMAIN('XML') PARSE(myrsp,InputProperties.Encoding, InputProperties.CodedCharSetId);
In the above code, I am getting the exception error at the CREATE FIRSTCHILD OF ...(bolded part of the code).
You can see the Exception tree in the above post.
Please suggest how to convert the response into proper XML message format?.
Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Sep 26, 2007 11:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20767 Location: LI,NY
|
Quote: |
SET Environment.Variables.BodyBlob = CAST(InputBody.soap:Envelope.soap:Body.NS1:GetISODataResponse.NS1:GetISODataResult AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
|
This is your problem. You need to extract only the code that is escaped....
So you should parse only:
Declare mychar CHARACTER Environment.Variables.BodyBlob.GetISODataResult.ISOResponses.Reports.Responses.Response.ErrorReturn;
Declare myblob BLOB CAST(mychar as BLOB CCSID InputRoot.Properties.CodedCharSetId);
Then parse it as a FolderBitStream...
You may need to manipulate it some.
This does not look to me as a clear serialization of xml. Check out the value mychar before you cast it ... You might have to trim some stuff but I don't expect you to...
Anything you try won't work clean because your xml is not clean.
You concatenated an xml escaped string to an error description string in the attributes of ErrorReturn.
You need a clean attribute that contains only the xml escaped string.
Then you can extract that attribute and parse it!...
Enjoy
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
chris boehnke |
Posted: Wed Sep 26, 2007 1:09 pm Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
fjb_saper wrote: |
Quote: |
SET Environment.Variables.BodyBlob = CAST(InputBody.soap:Envelope.soap:Body.NS1:GetISODataResponse.NS1:GetISODataResult AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
|
This is your problem. You need to extract only the code that is escaped....
So you should parse only:
Declare mychar CHARACTER Environment.Variables.BodyBlob.GetISODataResult.ISOResponses.Reports.Responses.Response.ErrorReturn;
Declare myblob BLOB CAST(mychar as BLOB CCSID InputRoot.Properties.CodedCharSetId);
Then parse it as a FolderBitStream...
You may need to manipulate it some.
This does not look to me as a clear serialization of xml. Check out the value mychar before you cast it ... You might have to trim some stuff but I don't expect you to...
Anything you try won't work clean because your xml is not clean.
You concatenated an xml escaped string to an error description string in the attributes of ErrorReturn.
You need a clean attribute that contains only the xml escaped string.
Then you can extract that attribute and parse it!...
Enjoy
 |
Hi All,
Thanks very much for your inputs. A special thanks to fjb_saper and DilSe . I appreciate your help.
Now I am able to parse the XML message.
Here is the Code what I used in the compute node just after the httpRequest node:
DECLARE NS1 NAMESPACE 'http://air-worldwide.com/webservices/';
SET Environment.Variables.BodyBlob = CAST(InputBody.*:Envelope.*:Body.NS1:GetISODataResponse.NS1:GetISODataResult AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
CREATE LASTCHILD OF OutputRoot DOMAIN 'XML' PARSE(Environment.Variables.BodyBlob, InputProperties.Encoding,InputProperties.CodedCharSetId);
Here is the Output Response from the Compute Node:
Message
Properties
MQMD
XML
ISOResponses
ResponseHeader
AIRTrack
Instance
633264224837898541;dhvasf1;AWS;2007-09-26T16:54:43.789-0400;/LM/W3SVC/1/Root/AWS-216-128353136817430315;
Instance
633264224837742295;dhvasf1;8089;2007-09-26T16:54:43.774-0400;Air.VL.ServiceHost.ServiceDriver.exe;AccumResponse;
runtimeinformation
responseid = 1258357258;633264224837742295
clientparam = UnknownUserHostAddress
time
start = 9/26/2007 4:54:43 PM
end = 9/26/2007 4:54:43 PM
timespan = 0.734
count
reportcount = 1
errorcount = 0
Reports
Report
product = HomeValueRepCost
version = 5.2.0.24
timespan = 0.734
sequence = 3700
success = True
ASF.ErrorCode = 1
ASF.ErrorMessage = ;Server was unable to process request. ---> Object reference not set to an instance of an object.
ASF.InfoMessage = Consolidated HomeValue with Engine
ASF.PercentCompleted =
ASF.StatusMessage =
ASF.Logfile =
Responses
Response
ErrorReturn
par0 = NoHomeValueExc
par1 = Server was unable to process request. ---> Object reference not set to an instance of an object.
par2 = at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)\r\n at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)\r\n at HomeValueWS2.GetHomeValueRepCost(String strInputXML)\r\n at AirReportProvider.cHomeValueReport.GetReport(XmlDocument reqData)
par3 = <ISORequests><RequestHeader><AIR><LoginID>WestfieldGroup_ws</LoginID><Password>west9919</Password><LicenseKey>QLAFKIUDJ%7DLWS%60WPCLAHABVKPT</LicenseKey></AIR><HomeValue><UserName>WestfieldGroup_ws</UserName><Password>west9919</Password><LicenseKey>QLAFKIUDJ%7DLWS%60WPCLAHABVKPT</LicenseKey></HomeValue></RequestHeader><ISORequest><Products>HomeValueRepCost</Products><Addresses><Address><RequestID>IQ-347593346-070206-103732</RequestID></Address></Addresses></ISORequest></ISORequests>
LocalEnvironment
Environment
ExceptionList
I need to verify the Output response with my Application team. I will update you once I hear from them.
A BIG THANKS TO ALL... |
|
Back to top |
|
 |
chris boehnke |
Posted: Wed Sep 26, 2007 2:13 pm Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi Guys,
There is one more problem.
I can see the '<' and '>' tags for the path in my Toolkit Variables panel...InputBody.soap:Envelope.soap:Body.NS1:GetISODataResponse.NS1:GetISODataResult.ISOResponses.ResponseHeader.Reports.Report.Responses.Response.ErrorReturn
and when I write the message to a queue, again I DONT see the '<' and '>' tags for this part of the response:
ErrorReturn
par0 = NoHomeValueExc
par1 = Server was unable to process request. ---> Object reference not set to an instance of an object.
par2 = at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)\r\n at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)\r\n at HomeValueWS2.GetHomeValueRepCost(String strInputXML)\r\n at AirReportProvider.cHomeValueReport.GetReport(XmlDocument reqData)
par3 = <ISORequests><RequestHeader><AIR><LoginID>WestfieldGroup_ws</LoginID><Password>west9919</Password><LicenseKey>QLAFKIUDJ%7DLWS%60WPCLAHABVKPT</LicenseKey></AIR><HomeValue><UserName>WestfieldGroup_ws</UserName><Password>west9919</Password><LicenseKey>QLAFKIUDJ%7DLWS%60WPCLAHABVKPT</LicenseKey></HomeValue></RequestHeader><ISORequest><Products>HomeValueRepCost</Products><Addresses><Address><RequestID>IQ-347593346-070206-103732</RequestID></Address></Addresses></ISORequest></ISORequests>
When I write the response message, the message looks like this:
<ISOResponses>
<ResponseHeader>
<AIRTrack>
<Instance>633264224837898541;dhvasf1;AWS;2007-09-26T16:54:43.789-0400;/LM/W3SVC/1/Root/AWS-216-128353136817430315;</Instance>
<Instance>633264224837742295;dhvasf1;8089;2007-09-26T16:54:43.774-0400;Air.VL.ServiceHost.ServiceDriver.exe;AccumResponse;</Instance>
</AIRTrack>
<runtimeinformation responseid="1258357258;633264224837742295" clientparam="UnknownUserHostAddress">
<time start="9/26/2007 4:54:43 PM" end="9/26/2007 4:54:43 PM" timespan="0.734" />
<count reportcount="1" errorcount="0" />
</runtimeinformation>
</ResponseHeader>
<Reports>
<Report product="HomeValueRepCost" version="5.2.0.24" timespan="0.734" sequence="3700" success="True" ASF.ErrorCode="1" ASF.ErrorMessage=";Server was unable to process request. ---> Object reference not set to an instance of an object." ASF.InfoMessage="Consolidated HomeValue with Engine" ASF.PercentCompleted="" ASF.StatusMessage="" ASF.Logfile="">
<Responses>
<Response>
<ErrorReturn par0="NoHomeValueExc" par1="Server was unable to process request. ---> Object reference not set to an instance of an object." par2=" at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at HomeValueWS2.GetHomeValueRepCost(String strInputXML) at AirReportProvider.cHomeValueReport.GetReport(XmlDocument reqData)" par3="<ISORequests><RequestHeader><AIR><LoginID>WestfieldGroup_ws</LoginID><Password>west9919</Password><LicenseKey>QLAFKIUDJ%7DLWS%60WPCLAHABVKPT</LicenseKey></AIR><HomeValue><UserName>WestfieldGroup_ws</UserName><Password>west9919</Password><LicenseKey>QLAFKIUDJ%7DLWS%60WPCLAHABVKPT</LicenseKey></HomeValue></RequestHeader><ISORequest><Products>HomeValueRepCost</Products><Addresses><Address><RequestID>IQ-347593346-070206-103732</RequestID></Address></Addresses></ISORequest></ISORequests>" />
</Response>
</Responses>
</Report>
</Reports>
</ISOResponses>
Your thoughts please...
Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Sep 26, 2007 2:33 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20767 Location: LI,NY
|
well your par3 is an attribute.
In order for the xml under par3 not to be escaped you would need to parse it and enter it as elements.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
dilse |
Posted: Wed Sep 26, 2007 8:20 pm Post subject: |
|
|
 Master
Joined: 24 Jun 2004 Posts: 270
|
It seems like a error response. From my understanding, when you are getting a successful response you were getting it in the 'GetISODataResult' ans when you are getting a error response, you were getting it in the 'ErrorReturn' tag. So based on the situation, read the particular tag.
Also instead of using '*' before soap envelope and body tags, you can declare a namespace with 'soap' as following.
Code: |
DECLARE soap NAMESPACE 'http://www.w3.org/2001/12/soap-envelope'; |
and use 'soap' instead of '*' as I mentioned.
Good luck..
DilSe.. |
|
Back to top |
|
 |
chris boehnke |
Posted: Thu Sep 27, 2007 10:17 am Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi Guys,
Now I am getting the proper response from the service.
Actually the request message is supposed to include one more xml element.
Here is the request msg:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://air-worldwide.com/webservices/">
<soapenv:Header/>
<soapenv:Body use="literal">
<web:GetISOData>
<!--Optional:-->
<!--type: string-->
<web:xmlReqStg><![CDATA[<ISORequests>
<RequestHeader>
<AIR>
<LicenseKey>safkhfkhafkhdsa</LicenseKey>
<LoginID>fhksjflks</LoginID>
<Password>xxxxxxx</Password>
</AIR>
<HomeValue>
<LicenseKey>hsfakhakshsaha</LicenseKey>
<UserName>hfkshkfsk</UserName>
<Password>xxxxxxxxxx</Password>
</HomeValue>
</RequestHeader>
<ISORequest>
<Products>HomeValueRepCost</Products>
<Addresses>
<Address>
<RequestID>IQ-347593346-070206-103732</RequestID>
</Address>
</Addresses>
<HomeValue>
</HomeValue>
</ISORequest>
</ISORequests>]]></web:xmlReqStg>
</web:GetISOData>
</soapenv:Body>
</soapenv:Envelope>
Here is the response from the service which looks good:
<ISOResponses>
<ResponseHeader>
<AIRTrack>
<Instance>633264818633855785;dhvasf1;AWS;2007-09-27T09:24:23.385-0400;/LM/W3SVC/1/Root/AWS-70-128353730597450467;</Instance>
<Instance>633264818633699539;dhvasf1;8089;2007-09-27T09:24:23.369-0400;Air.VL.ServiceHost.ServiceDriver.exe;AccumResponse;</Instance>
</AIRTrack>
<runtimeinformation responseid="1258357258;633264818633699539" clientparam="UnknownUserHostAddress">
<time start="9/27/2007 9:24:20 AM" end="9/27/2007 9:24:23 AM" timespan="2.391" />
<count reportcount="1" errorcount="0" />
</runtimeinformation>
</ResponseHeader>
<Reports>
<Report product="HomeValueRepCost" version="5.2.0.24" timespan="2.391" sequence="4338" success="True" ASF.ErrorCode="0" ASF.ErrorMessage="" ASF.InfoMessage="Consolidated HomeValue with Engine" ASF.PercentCompleted="" ASF.StatusMessage="" ASF.Logfile="">
<Responses>
<Response>
<Report product="HomeValueRepCost" xmlns:ns="urn:schemas-microsoft-com:xslt">
<Status>COMPLETE</Status>
<RequestID>IQ-347593346-070206-103732</RequestID>
<LocGUID>{20377DF5-F7B5-DB11-B97A-000423786E34}</LocGUID>
<StdAddress>
<StreetAddress>35 TROPHY LN</StreetAddress>
<StreetNumber>35</StreetNumber>
<StreetNumberSuffix />
<StreetPrefix />
<StreetName>TROPHY</StreetName>
<StreetType>LN</StreetType>
<StreetSuffix />
<StreetUnit />
<City>POINCIANA</City>
<State>FL</State>
<ZIP5>34759</ZIP5>
<ZIP4>3346</ZIP4>
<ZIP9 />
<Zip>34759</Zip>
<County>POLK</County>
</StdAddress>
<PropertyInfo>
<LocationName source="2">IQ-347593346-070206-103732</LocationName>
<CreateDateTime source="2">02/06/2007 - 10:37:32 AM</CreateDateTime>
<LivingSquareFeet est="1600" ppn="" gui="1600" source="2">1600</LivingSquareFeet>
<YearBuilt est="1933" gui="1933" ppn="1933" source="2">1933</YearBuilt>
</PropertyInfo>
<RepCostResults date="20070927" time="09/27/2007 - 9:24:23 AM" svc="C3001-L09190-A11637-T11350-C098-G040-S100-X100-P104-R100-U600:100-ms0-F13445-t10569-B10283-EB70618" build="5.2.0.20070618.1600" JobID="1490194">
<coverage id="A" ev="$150,134" lo="$110,173" hi="$204,591">
<est id="A00" name="TOTAL" ev="150,134" sft="93.83" pct="100.0%" />
<est id="A01" name="Site Preparation" ev="2,999" sft="1.87" pct="2.0%" />
<est id="A02" name="Excavation" ev="1,821" sft="1.14" pct="1.2%" />
<est id="A03" name="Foundation" ev="17,123" sft="10.70" pct="11.4%" />
<est id="A05" name="Floor Construction" ev="13,158" sft="8.22" pct="8.8%" />
<est id="A06" name="Ext Wall Const." ev="16,222" sft="10.14" pct="10.8%" />
<est id="A07" name="Ext Windows+Doors" ev="11,678" sft="7.30" pct="7.8%" />
<est id="A08" name="Roof Construction" ev="14,966" sft="9.35" pct="10.0%" />
<est id="A09" name="Inter. Construction" ev="4,570" sft="2.86" pct="3.0%" />
<est id="A10" name="Inter. Finishes" ev="9,403" sft="5.88" pct="6.3%" />
<est id="A11" name="Ceilings" ev="6,531" sft="4.08" pct="4.4%" />
<est id="A12" name="Specialties" ev="0" sft="0.00" pct="0.0%" />
<est id="A13" name="Floor Finish" ev="5,287" sft="3.30" pct="3.5%" />
<est id="A14" name="HVAC" ev="5,308" sft="3.32" pct="3.5%" />
<est id="A15" name="Plumbing" ev="12,153" sft="7.60" pct="8.1%" />
<est id="A16" name="Electrical" ev="3,393" sft="2.12" pct="2.3%" />
<est id="A17" name="OH+Fees+Profit" ev="25,523" sft="15.95" pct="17.0%" />
<est id="A90" name="Special Features" ev="0" sft="0.00" pct="0.0%" />
</coverage>
<coverage id="B" ev="$0" lo="" hi="" />
</RepCostResults>
</Report>
</Response>
</Responses>
</Report>
</Reports>
</ISOResponses>
Thanks very much guys. I really appreciate your help in getting this work. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 27, 2007 10:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
chris boehnke wrote: |
Now I am getting the proper response from the service.
Actually the request message is supposed to include one more xml element. |
jefflowrey wrote: |
You need to work heavily with the other side, to understand how the data you are providing them is wrong. |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|