|
Home > Archive > BizTalk Server Orchestration > May 2006 > Uncaught exception terminated service :Exception type: Serializati
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 |
Uncaught exception terminated service :Exception type: Serializati
|
|
|
| Hi All,
I have an Orchestration with Exception Handling scope.
I am catching the Exception inside the Exception Handler and withing the
CatchException block I am constructing an ErrorMessage and sending to to a
file location
The message assignment inside the construct shape contains the following code
//initialize the xm variable
xm=new System.Xml.XmlDocument();
//instanciate xm with the xml structure string
xm.LoadXml("<ns0:Error xmlns:ns0="the
namespace"><ErrorDetails><ErrorId/><ErrorDescription/></ErrorDetails><InputMessage></InputMessage></ns0:Error>");
assigning the xm to ErrorMsg schema
ErrorMsg =xm;
//assigning values to Distinguished fields of ErrorMsg schema
ErrorMsg.ErrorDetails.ErrorId="1234";
ErrorMsg.ErrorDetails.ErrorDescription =exobj.Message;
//Assigning input message to an xml variable xmAIS
xmAIS=AISCOC;
//xpath to assign the input message to the ErrorMsg schema
xpath(ErrorMsg ,"//InputMessage")=xmAIS.OuterXml;
My code is working fine upto this.
And after this construct shape is the send shape which sends the ErrorMsg to
a file location.
But i am getting the following error most of the time..
I dont know how to find out the route cause for these error..
Uncaught exception terminated service
ABC(9420f059-f0ad-c80a-a679-8a4892e8f30c), instance
4b1844c3-4168-4dbd-97fb-9961f79ab088
The type System.Xml.XmlDocument in Assembly System.Xml, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 is not marked as
serializable.
Exception type: SerializationException
Source: mscorlib
Target Site: System.Reflection.MemberInfo[]
InternalGetSerializableMembers(System.RuntimeType, Boolean)
Help Link:
Additional error information:
Anybody Help plz
--
Many Thanks,
Sulaiman Abubacker
| |
| Michael Elizarov [MSFT] 2006-05-31, 1:16 pm |
| The reason is that XmlDocument is not serializable. All types that you use
in an orchestration need to be binary serializable. The reason is that when
send shape completes instance state is persisted, and this involves
serializing. If you have any non-serializable objects in your code you will
fail.
-- Michael
--------------------[vbcol=seagreen]
a[vbcol=seagreen]
code[vbcol=seagreen]
tMessage></InputMessage></ns0:Error>");[vbcol=seagreen]
to[vbcol=seagreen]
Version=1.0.5000.0,[vbcol=seagreen]
|
|
|
|
|