Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Biz Talk Orchestration > Execute Receive...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 4111 of 4219
Post > Topic >>

Execute Receive Pipeline with RawString Message

by =?Utf-8?B?QW5nZWxvIExhcmlz?= <AngeloLaris@[EMAIL PROTECTED] Apr 21, 2008 at 01:05 AM

Hello Everyone,

I have a problem with executing a receive pipeline which I hope you can
help.

I am getting the following exception.

Microsoft.XLANGs.Pipeline.XLANGPipelineManagerException: The pipeline 
manager could not prepare the message(s) for processing pipeline 
"Decillion.MAPS.SGX.Pipelines.RECEIVE_FlatFile_MT202_ATC_DP_DS_EPSDR_EPSFC_EPSCR_RTS".

Error Details: "System.IO.Stream" ---> System.InvalidCastException: 
System.IO.Stream

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

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

   at Microsoft.XLANGs.Pipeline.PipelineXPart.ToBaseMessagePart()

   at Microsoft.XLANGs.Pipeline.PipelineXMessage.ToBaseMessage()

   at 
Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecutePipeline(ReceivePipeline
p, XLANGMessage inMsg)

   --- End of inner exception stack trace ---

   at 
Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecutePipeline(ReceivePipeline
p, XLANGMessage inMsg)

   at 
Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(Type

receivePipelineType, XLANGMessage inMsg)

   at 
Decillion.MAPS.SGX.Orchestration.SGX_TO_SWIFT_MTXXX_ATC_DP_DS_EPSDR_EPSFC_EPSCR_RTS.segment3(StopConditions
stopOn)

   at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, 
StopConditions stopCond, Exception& exp)
Microsoft.XLANGs.Pipeline.XLANGPipelineManagerException
Scoped@[EMAIL PROTECTED]
 am using a Message of type RAWSTRING which is where I think the problem
is.

Here is the code below which I copied from the Microsoft Web Site.

Note it has a CustomFormatter called
[CustomFormatter(typeof(RawStringFormatter))]


--------------------------------------------------------------------------------


namespace Microsoft.Samples.BizTalk.XlangCustomFormatters
{
   public abstract class BaseFormatter : IFormatter
   {
      public virtual SerializationBinder Binder
      {
         get { throw new NotSup****tedException(); }
         set { throw new NotSup****tedException(); }
      }

      public virtual StreamingContext Context
      {
         get { throw new NotSup****tedException(); }
         set { throw new NotSup****tedException(); }
      }

      public virtual ISurrogateSelector SurrogateSelector
      {
         get { throw new NotSup****tedException(); }
         set { throw new NotSup****tedException(); }
      }

      public abstract void Serialize( Stream stm, object obj );
      public abstract object Deserialize( Stream stm );
   }

   public class RawStringFormatter : BaseFormatter
   {
      public override void Serialize(Stream s, object o)
      {
         RawString rs = (RawString)o;
         byte[] ba = rs.ToByteArray();
         s.Write( ba, 0, ba.Length );
      }

      public override object Deserialize(Stream stm)
      {
         StreamReader sr = new StreamReader( stm, true );
         string s = sr.ReadToEnd();
         return new RawString( s );
      }
   }

   [CustomFormatter(typeof(RawStringFormatter))]
   [Serializable]
   public class RawString
   {
      [XmlIgnore]
      string _val;

      public RawString(string s )
      {
         if (null==s) 
            throw new ArgumentNullException();
         _val = s;
      }

      public RawString()
      {
      }

      public byte[] ToByteArray()
      {
         return Encoding.UTF8.GetBytes( _val );
      }

      public override string ToString()
      {
         return _val;
      }
   }
}


--------------------------------------------------------------------------------

Can anyone please help it would be greatly appreciated.

Thanks

Angelo Laris
 




 5 Posts in Topic:
Execute Receive Pipeline with RawString Message
=?Utf-8?B?QW5nZWxvIExhcml  2008-04-21 01:05:04 
Re: Execute Receive Pipeline with RawString Message
Pinhask@[EMAIL PROTECTED]  2008-04-28 14:18:20 
Re: Execute Receive Pipeline with RawString Message
=?Utf-8?B?QW5nZWxvIExhcml  2008-04-28 19:00:00 
Re: Execute Receive Pipeline with RawString Message
Pinhas Kolsky <Pinhask  2008-04-29 12:53:52 
Re: Execute Receive Pipeline with RawString Message
=?Utf-8?B?QW5nZWxvIExhcml  2008-04-29 16:26:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 4:44:40 CST 2008.