problem initializing a message from an XmlDocument
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 Orchestration > problem initializing a message from an XmlDocument




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

    problem initializing a message from an XmlDocument  
rnorthedge@hotmail.com


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


 
06-12-06 06:18 PM

I have an external web service that has a single string input parameter
and returns a string result. The web service expects the strings to
contain XML data that conforms to a particular schema (call it
mySchema). No, I didn't design the web service.

Anyway, in my Biztalk 2004 orchestration I have a message myMessageIn
of type mySchema. To pass its contents in as a string to the web
service, I am using an XmlDocument variable like this:

myXmlDoc = myMessageIn;
myWSRequest.RequestString = myXmlDoc.OuterXml;

This works OK, but when I try and do the same thing in reverse for the
result of the web service, like so:

myXmlDoc.LoadXml(myWSResponse.ResultString);
myMessageOut = myXmlDoc;

I get an error: Cannot implicitly convert type 'System.Xml.XmlDocument'
to 'Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy'.

Now: myMessageIn is an inbound parameter of the orchestration (I'm
trying to encapsulate this web service call with its crazy string
manipulation into a callable orchestration), so I understand that
beneath the covers it is using the XmlDocumentSerializationProxy class.
However, myMessageOut is currently just a normal message in the
orchestration, not an inbound or an outbound parameter, so I don't see
why it would be using XmlDocumentSerializationProxy.

Anyway, how can I use the XML from the string myWSResponse.ResultString
to construct myMessageOut?

Any help greatly appreciated,

Richard






[ Post a follow-up to this message ]



    RE: problem initializing a message from an XmlDocument  
Sujesh


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


 
06-13-06 12:22 PM

This link might solve the problem.

http://martijnh.blogspot.com/2005_0...nh_archive.html


"rnorthedge@hotmail.com" wrote:

> I have an external web service that has a single string input parameter
> and returns a string result. The web service expects the strings to
> contain XML data that conforms to a particular schema (call it
> mySchema). No, I didn't design the web service.
>
> Anyway, in my Biztalk 2004 orchestration I have a message myMessageIn
> of type mySchema. To pass its contents in as a string to the web
> service, I am using an XmlDocument variable like this:
>
> myXmlDoc = myMessageIn;
> myWSRequest.RequestString = myXmlDoc.OuterXml;
>
> This works OK, but when I try and do the same thing in reverse for the
> result of the web service, like so:
>
> myXmlDoc.LoadXml(myWSResponse.ResultString);
> myMessageOut = myXmlDoc;
>
> I get an error: Cannot implicitly convert type 'System.Xml.XmlDocument'
> to 'Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy'.
>
> Now: myMessageIn is an inbound parameter of the orchestration (I'm
> trying to encapsulate this web service call with its crazy string
> manipulation into a callable orchestration), so I understand that
> beneath the covers it is using the XmlDocumentSerializationProxy class.
> However, myMessageOut is currently just a normal message in the
> orchestration, not an inbound or an outbound parameter, so I don't see
> why it would be using XmlDocumentSerializationProxy.
>
> Anyway, how can I use the XML from the string myWSResponse.ResultString
> to construct myMessageOut?
>
> Any help greatly appreciated,
>
> Richard
>
>





[ Post a follow-up to this message ]



    RE: problem initializing a message from an XmlDocument  
Sujesh


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


 
06-13-06 12:22 PM

I am assuming your callable orch have an output parameter to the calling orc
h.
There might be a type mismatch there.

"rnorthedge@hotmail.com" wrote:

> I have an external web service that has a single string input parameter
> and returns a string result. The web service expects the strings to
> contain XML data that conforms to a particular schema (call it
> mySchema). No, I didn't design the web service.
>
> Anyway, in my Biztalk 2004 orchestration I have a message myMessageIn
> of type mySchema. To pass its contents in as a string to the web
> service, I am using an XmlDocument variable like this:
>
> myXmlDoc = myMessageIn;
> myWSRequest.RequestString = myXmlDoc.OuterXml;
>
> This works OK, but when I try and do the same thing in reverse for the
> result of the web service, like so:
>
> myXmlDoc.LoadXml(myWSResponse.ResultString);
> myMessageOut = myXmlDoc;
>
> I get an error: Cannot implicitly convert type 'System.Xml.XmlDocument'
> to 'Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy'.
>
> Now: myMessageIn is an inbound parameter of the orchestration (I'm
> trying to encapsulate this web service call with its crazy string
> manipulation into a callable orchestration), so I understand that
> beneath the covers it is using the XmlDocumentSerializationProxy class.
> However, myMessageOut is currently just a normal message in the
> orchestration, not an inbound or an outbound parameter, so I don't see
> why it would be using XmlDocumentSerializationProxy.
>
> Anyway, how can I use the XML from the string myWSResponse.ResultString
> to construct myMessageOut?
>
> Any help greatly appreciated,
>
> Richard
>
>





[ Post a follow-up to this message ]



    Re: problem initializing a message from an XmlDocument  
rnorthedge@hotmail.com


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


 
06-13-06 12:22 PM


Sujesh wrote:
> This link might solve the problem.
>
> http://martijnh.blogspot.com/2005_0...nh_archive.html
>
>
> "rnorthedge@hotmail.com" wrote:
>
Hi Sujesh,

Thanks for your reply. Yes, I saw the link you referenced before I
posted, but in Martijn's blog post, the orchestration has generic
parameters eg. of type XmlDocument, whereas my input parameter is a
message of type mySchema.

His post also seems to be referring to a scenario where the called
orchestration is in a separate assembly, whereas mine is in the same
assembly as the orchestrations that call it. (Well, if it worked, that
is.)

Richard






[ Post a follow-up to this message ]



    Re: problem initializing a message from an XmlDocument  
Sujesh


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


 
06-14-06 06:19 AM

Is your mymessageout of type XmlDocument or does it have a message
type(namespace#rootnode?

Also does mymessageout defined inside called orchestration or calling
orchestration?

"rnorthedge@hotmail.com" wrote:

>
> Sujesh wrote: 
> Hi Sujesh,
>
> Thanks for your reply. Yes, I saw the link you referenced before I
> posted, but in Martijn's blog post, the orchestration has generic
> parameters eg. of type XmlDocument, whereas my input parameter is a
> message of type mySchema.
>
> His post also seems to be referring to a scenario where the called
> orchestration is in a separate assembly, whereas mine is in the same
> assembly as the orchestrations that call it. (Well, if it worked, that
> is.)
>
> Richard
>
>





[ Post a follow-up to this message ]



    Re: problem initializing a message from an XmlDocument  
rnorthedge@hotmail.com


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


 
06-16-06 06:23 PM

Hi,

Thanks for getting back to me.

Sujesh wrote:
> Is your mymessageout of type XmlDocument or does it have a message
> type(namespace#rootnode?

It has a message type - the same message type as myMessageIn (a type of
mySchema).

> Also does mymessageout defined inside called orchestration or calling
> orchestration?

It's declared as a variable inside the orchestration. Ideally, I'd like
it to be an out parameter, but I can live without that - I can pass a
string back rather than the message, if necessary. But I do need to
convert the string returned from the web service into a message type of
mySchema, so I can do some processing on it. The only way I could see
of getting the string converted into a message is via an XmlDocument,
as I wrote in my original post:

myXmlDoc.LoadXml(myWSResponse.ResultString); // myXmlDoc is an
XmlDocument variable
myMessageOut = myXmlDoc;

but the second line of this is giving me the SerializationProxy error.


Richard






[ Post a follow-up to this message ]



    Re: problem initializing a message from an XmlDocument  
Sujesh


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


 
06-18-06 06:18 AM

I have tried to replicate the exact same scenario in my dev environment and
it didn't give me any error. It worked fine for me.

If you dont mind sending me the project or files, I can have a look and see
if there is something missing.

you can send me on skodoth@apl.co.nz

Are you using BTS2006 or BTS2004?

"rnorthedge@hotmail.com" wrote:

> Hi,
>
> Thanks for getting back to me.
>
> Sujesh wrote: 
>
> It has a message type - the same message type as myMessageIn (a type of
> mySchema).
> 
>
> It's declared as a variable inside the orchestration. Ideally, I'd like
> it to be an out parameter, but I can live without that - I can pass a
> string back rather than the message, if necessary. But I do need to
> convert the string returned from the web service into a message type of
> mySchema, so I can do some processing on it. The only way I could see
> of getting the string converted into a message is via an XmlDocument,
> as I wrote in my original post:
>
> myXmlDoc.LoadXml(myWSResponse.ResultString); // myXmlDoc is an
> XmlDocument variable
> myMessageOut = myXmlDoc;
>
> but the second line of this is giving me the SerializationProxy error.
>
>
> Richard
>
>





[ Post a follow-up to this message ]



    Re: problem initializing a message from an XmlDocument  
rnorthedge@hotmail.com


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


 
06-20-06 12:20 PM

I have tried a simpler scenario on a separate development server and it
seems to compile OK. I think I need to start building another
orchestration up from scratch on the same machine as the problem
orchestration and seeing at what point it breaks.

It's BTS2004, by the way.

Cheers,
Richard

Sujesh wrote:
> I have tried to replicate the exact same scenario in my dev environment an
d
> it didn't give me any error. It worked fine for me.
>
> If you dont mind sending me the project or files, I can have a look and se
e
> if there is something missing.
>
> you can send me on skodoth@apl.co.nz
>
> Are you using BTS2006 or BTS2004?
>






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:19 PM.      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