WCF Error when sending a string in multipart message

Home Page Forums BizTalk 2004 – BizTalk 2010 WCF Error when sending a string in multipart message

Viewing 1 reply thread
  • Author
    Posts
    • #22111

      Hello Gurus,

      I’m still very new to biztalk.  We are utilizing biztalk’s mapping tools to convert an xml from one schema type to another.  When we send our source document, we will convert it to a string so we don’t need to publish the schema.  Inside the orchestration the string will be parsed into an xml document.  Then will be mapped.  Then converted back to a string and sent back to the client.  The string is contained in a multipart message (StringIn.Body and StringOut.Body).  Body is of type string.

      The conventional soap adapter works very well.  However, I need to figure out a way to utilize WCF to perform the same procedure.  So I published the orchestration using the WCF service wizard (basic http).  Then I used svcutil.exe from the LOB SDK to create the BiztalkServiceInstance.cs class and output.config files.  Then I configured the web.config as best as I knew how.  I set the receive location pipeline to use passthrough, but it looks like it was set to XML by default.  Then I used my proxy app to send a test string to this test biztalk application.  It is supposed to simply take that string, concatenate a bit to it and then send it back out (using request-response port which is required).

      Seems simple enough, but I’m getting an error.  The event viewer dump is below.  It looks like the error centers around the message is being put into a <string xmlns=’http://schemas.microsoft.com/2003/10/Serialization/’></string&gt; tag.

      What I have tried:

      I tried unsuccessfully to manually set the xpath on the port to point to <string></string>.

      I have tried creating a property schema that simply has a string field promoted and set the pipeline to XML receive.  That did not work either.

      I realize there are probably many other things I should try.  I’m hoping that someone may be able to give some ideas.

      Thank you for your time.

       

      Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘WcfStringTest.StringTest_Orch(5056f5bf-979a-eec3-b99c-a58d0a1caed5)’.

      The service instance will remain suspended until administratively resumed or terminated. 

      If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.

      InstanceId: a6d8f4e1-e5d5-41c0-8e01-0b654d82497a

      Shape name: ConstructMessage_1

      ShapeId: c1f60c16-019f-401f-8a99-fcc953a1fdfc

      Exception thrown from: segment 1, progress 6

      Inner exception: There is an error in XML document (1, 2).

              

      Exception type: InvalidOperationException

      Source: System.Xml

      Target Site: System.Object Deserialize(System.Xml.XmlReader, System.String, System.Xml.Serialization.XmlDeserializationEvents)

      The following is a stack trace that identifies the location where the exception occured

       

         at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

         at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)

         at Microsoft.XLANGs.RuntimeTypes.XmlHelpers.ObjectFromStreamReader(StreamReader sr, Type t)

         at Microsoft.XLANGs.RuntimeTypes.XmlHelpers.ObjectFromStream(Stream s, Type t)

         at Microsoft.XLANGs.Core.Value.GetObject(Type t)

         at Microsoft.XLANGs.Core.Value.RetrieveAs(Type t)

         at Microsoft.XLANGs.Core.Part.ProtectedRetrieveAs(Type t)

         at Microsoft.XLANGs.Core.Part.RetrieveAs(Type t)

         at WcfStringTest.__System_String__.get_TypedValue()

         at WcfStringTest.StringTest_Orch.segment1(StopConditions stopOn)

         at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)

      Additional error information:

       

              <string xmlns=’http://schemas.microsoft.com/2003/10/Serialization/’&gt; was not expected.

              

      Exception type: InvalidOperationException

      Source: System.Xml

      Target Site: System.Object Read_string()

      The following is a stack trace that identifies the location where the exception occured

       

         at System.Xml.Serialization.XmlSerializationPrimitiveReader.Read_string()

         at System.Xml.Serialization.XmlSerializer.DeserializePrimitive(XmlReader xmlReader, XmlDeserializationEvents events)

         at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

    • #23676

      Hi…did you manage to get to the problemof this issue?

      Regards

      Biztalker1

      • #23678

        We changed our architecture away from a Biztalk implementation and this has been a long time ago.  However, I recall reading that Biztalk’s WCF adapter has some limitations in regard to multi-part messages..

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.