Problem with variable assignment
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > Problem with variable assignment




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Problem with variable assignment  
Magnus


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-22-05 10: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?






[ Post a follow-up to this message ]



    Re: Problem with variable assignment  
Tomas Restrepo \(MVP\)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-22-05 10: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/







[ Post a follow-up to this message ]



    Re: Problem with variable assignment  
Magnus


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-22-05 10: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/






[ Post a follow-up to this message ]



    Re: Problem with variable assignment  
Magnus


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-23-05 12:53 PM

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: 






[ Post a follow-up to this message ]



    Re: Problem with variable assignment  
Tomas Restrepo \(MVP\)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-24-05 12:50 PM

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/







[ Post a follow-up to this message ]



    Re: Problem with variable assignment  
Magnus


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-25-05 07: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






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:27 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register