Consume Web Service...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

I get "System.Runtime.Serialization.SerializationException" when I try
to call a web service in my orchestration. This web service takes two
Xml parameters as string datatypes and processes this Xml and returns
back Xml as string which is web service response. I get the error at
Send shape. In my orchestration I assign the WSRequestMsg.Param1 &
WSRequestMsg.Param2 to be xmlDocument1.OuterXml & xmlDocument2.OuterXml
respectively. And I have my Send & Receive shapes in Scope block and I
tested changing the Synchronized property to both True & False, no
luck.

Is this a design issue that I have web service parameters to be string
datatype and the xml that is passed on wire is not serialized if so
what is the workaround or design enhancement. My webservice input
parameter is dynamic xml thus I can't define a static schema parameter
to this web service.

Appreciate your responses.

System.Runtime.Serialization.SerializationException: Type
'System.Xml.XmlDocument' in Assembly 'System.Xml, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as
serializable.

at
System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType
type)

at
System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type
type, StreamingContext context)

at
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()

at
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object
obj, ISurrogateSelector surrogateSelector, StreamingContext context,
SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter,
ObjectWriter objectWriter)

at
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object
obj, ISurrogateSelector surrogateSelector, StreamingContext context,
SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter,
ObjectWriter objectWriter)

at
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo
objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)

at
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object
graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)

at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream
serializationStream, Object graph, Header[] headers, Boolean fCheck)

at Microsoft.XLANGs.Core.ObjectSerializer._serialize(Object graph,
StringLookup sl)

at
Microsoft.XLANGs.Core.ObjectSerializer.SerializeStateManager(IStateManager
stateMgr, StringLookup lookup)

at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context
ctx, Boolean idleRequired, Boolean finalPersist, Boolean bypassCommit,
Boolean terminate)

at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean
ignore, XMessage msg)

at
Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean
ignoreCommit, XMessage msg)

at
Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean
ignoreCommit, XMessage msg)

at Microsoft.XLANGs.Core.Service.PendingCommit(Boolean ignore,
XMessage msg)

at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean
ignore, XMessage msg)

at
Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean
ignoreCommit, XMessage msg)

at
Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean
ignoreCommit, XMessage msg)

at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32
iOperation, XLANGMessage msg, Correlation[] initCorrelations,
Correlation[] followCorrelations, SubscriptionWrapper&
subscriptionWrapper, Context cxt, Segment seg, ActivityFlags flags)

at Microsoft.XLANGs.Core.PortBase.SendMessage(Int32 iOperation,
XLANGMessage msg, Correlation[] initCorrelations, Correlation[]
followCorrelations, SubscriptionWrapper& subscriptionWrapper, Context
cxt, Segment seg)

at
IPG.FinancialData.CommonObjects.InvokeCommonWS.segment2(StopConditions
stopOn)

at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s,
StopConditions stopCond, Exception& exp)
System.Runtime.Serialization.SerializationException
Scoped@
InvokeCommonWS.
InvokeCommonWS.InvokeCommonWS
UploadData.
UploadData.UploadData
05012235-4fc0-41ac-bb68-8468836e6a3a

.



Relevant Pages

  • Re: how to return xml document from a web service
    ... public string MyMethod ... it out in SOAP Xml so ensure the clients have a way of knowing to decode it ... > I can't tell if the consumer of the web service will use .Net or maybe ... > XmlDocument webservice method ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: serialising parameters manually
    ... You'll be a better Web service developer if you ... You can find lots of more information on controlling the Xml ... >> Can anyone tell me how to serialise an arraylist manually? ... >> would be to serialise the objects to a string, ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: String compression
    ... something that was basically a web service. ... We did it by building the XML message, zipping it, then base64 encoding the ... Then we embedded that base64-encoded string inside of a very simple ... In those days we had to compress to file and then operate on the file. ...
    (microsoft.public.dotnet.languages.csharp)
  • Converting a Schema message to a string message and vice-versa
    ... public string Process ... conforms to a schema. ... drop an xml file into, and Biztalk pass this xml to the web method ... per the schema defined by my web service and a Send port and Send ...
    (microsoft.public.biztalk.general)
  • Re: SP1 Problem SOAPException doesnt return quote and Umlaute correcty
    ... Our app returns XML in the fault string. ... returned in the fault string of a soap exception. ...
    (microsoft.public.dotnet.framework.webservices)