BizTalk Server General - Problem with variable assignment

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > August 2005 > Problem with variable assignment





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem with variable assignment
Magnus

2005-08-22, 5:56 pm

Hi,

>From a webservice im getting back an xml that looks something like

<RetVal>
<ErrorCode></ErrorCode>
<ErrorDescription></ErrorDescription>
<ProcessingID>123</ProcessingID>
</RetVal>

If everything is ok i get the ProcessingID, and the Code and
description nodes are empty but present. If there is some text in the
description an error has occured that i need to log in the application
log. After that is done i return the xml string to the BizTalk
orchestration where it is loaded into a xmldocument variable, and later
on assigned to a message. What i need is and decision wethere there is
something in the error node or not. Shouldn't be too hard! I've tried
with the message:

strErrorMessage =
System.Convert.ToString(partner_inline_xml_response.ErrorDescription);

However, strErrormessage is always null no matter what ErrorDescription
really is.

I have also tried to get a value from the xmldocument variable, like
this:
strErrorMessage =
strPartnerResponse.SelectSingleNode("//ErrorDescription").InnerText;

That doesn't work either...

Can someone give me a hint on what im doing wrong?

Tomas Restrepo \(MVP\)

2005-08-22, 5:56 pm

Maguns,
> <RetVal>
> <ErrorCode></ErrorCode>
> <ErrorDescription></ErrorDescription>
> <ProcessingID>123</ProcessingID>
> </RetVal>
>
> If everything is ok i get the ProcessingID, and the Code and
> description nodes are empty but present. If there is some text in the
> description an error has occured that i need to log in the application
> log. After that is done i return the xml string to the BizTalk
> orchestration where it is loaded into a xmldocument variable, and later
> on assigned to a message. What i need is and decision wethere there is
> something in the error node or not. Shouldn't be too hard! I've tried
> with the message:
>
> strErrorMessage =
> System.Convert.ToString(partner_inline_xml_response.ErrorDescription);
>
> However, strErrormessage is always null no matter what ErrorDescription
> really is.


Is there any chance you're running into this?
http://support.microsoft.com/defaul...kb;en-us;891447


--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/


Magnus

2005-08-22, 5:56 pm

Hi Tomas,

Thank you for your reply. This could be the problem. However what I
still wonder is if this problem can occur on any of the distinguished
fields (all three elements are distinguished). What I mean is, if Code
and Description contains the error information and ProcessingID is
<ProcessingID></ProcessingID>. The strErrorMessage is still null when i
try to debug the orchestration.

//Magnus


Tomas Restrepo (MVP) wrote:
> Maguns,
>
> Is there any chance you're running into this?
> http://support.microsoft.com/defaul...kb;en-us;891447
>
>
> --
> Tomas Restrepo
> tomasr@mvps.org
> http://www.winterdom.com/


Magnus

2005-08-23, 7:53 am

Because i control the webservice proxy that i call before making the
real web service call to the outside partner i tried to set the return
xml elements to something like:
<ErrorDescription>OK</ErrorDescription>
<ErrorCode>OK</ErrorCode>
<ProcessingID>123</ProcessingID>

if everything is ok. Then i tried to check wether the description was
!="OK". I thought that the problem would go away because no elements
where empty anymore, but the orchestration still behaves in the same
way.

//Magnus

Magnus skrev:
[vbcol=seagreen]
> Hi Tomas,
>
> Thank you for your reply. This could be the problem. However what I
> still wonder is if this problem can occur on any of the distinguished
> fields (all three elements are distinguished). What I mean is, if Code
> and Description contains the error information and ProcessingID is
> <ProcessingID></ProcessingID>. The strErrorMessage is still null when i
> try to debug the orchestration.
>
> //Magnus
>
>
> Tomas Restrepo (MVP) wrote:

Tomas Restrepo \(MVP\)

2005-08-24, 7:50 am

Magnus,

> Because i control the webservice proxy that i call before making the
> real web service call to the outside partner i tried to set the return
> xml elements to something like:
> <ErrorDescription>OK</ErrorDescription>
> <ErrorCode>OK</ErrorCode>
> <ProcessingID>123</ProcessingID>
>
> if everything is ok. Then i tried to check wether the description was
> !="OK". I thought that the problem would go away because no elements
> where empty anymore, but the orchestration still behaves in the same
> way.


Then the next thing I'd check is to see that indeed the XML you're accessing
maps correctly to the schema you are using in biztalk... perhaps there is a
namespace problem, or something?


--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/


Magnus

2005-08-25, 2:52 am

Hi Tomas,

Thanks for your input! When i took a closer look at the xml our partner
sent us i discovered that they didn't supply a namespace, so that was
the problem!

//Magnus

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com