How to initialize a message?
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 > How to initialize a message?




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

    How to initialize a message?  
Frank Schumacher


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


 
06-26-04 03:53 PM

Hi NG,

I thought it is a simple thing to create a message within biztalk and
send it through a sendport, but I was wrong.

I have a simple xsd and create a Message from this xsd.
All 4 fields are distinguished, because I want to set them manually.

Now I use a "Create Message" Shape to instanciate (so I thought) the
message. Within this shape, I want to assign the (constant) values to
the fields of my message. Doing this, BizTalk tells me, that I try to
use a message, that isn't initialized.

So I used a dirty workaround. I simply mapped a field of an existing
message to all the fields in my new message and put a Transform-Shape in
the Create Message-Shape, just preliminary to my Assign-Shape.
And THIS worked. It seems, that the transform shape is doing something
with the message, that the assign shape doesn't.

So, how can I create a new message, without using this workaround?

Thanks in advance,
Frank





[ Post a follow-up to this message ]



    Re: How to initialize a message?  
Frank Schumacher


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


 
06-26-04 03:53 PM

It's me again,

I found out, that I can instanciate a new message from an existing on e
in my assign shape like:

MyNewMessage = ExistingMessage;

if they have the same messagetype. But what do I do, if I have no
existing message yet?

Thanks in advance,
Frank

Frank Schumacher wrote:

> Hi NG,
>
> I thought it is a simple thing to create a message within biztalk and
> send it through a sendport, but I was wrong.
>
> I have a simple xsd and create a Message from this xsd.
> All 4 fields are distinguished, because I want to set them manually.
>
> Now I use a "Create Message" Shape to instanciate (so I thought) the
> message. Within this shape, I want to assign the (constant) values to
> the fields of my message. Doing this, BizTalk tells me, that I try to
> use a message, that isn't initialized.
>
> So I used a dirty workaround. I simply mapped a field of an existing
> message to all the fields in my new message and put a Transform-Shape in
> the Create Message-Shape, just preliminary to my Assign-Shape.
> And THIS worked. It seems, that the transform shape is doing something
> with the message, that the assign shape doesn't.
>
> So, how can I create a new message, without using this workaround?
>
> Thanks in advance,
> Frank





[ Post a follow-up to this message ]



    Re: How to initialize a message?  
Iuliu Rus


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


 
06-26-04 03:53 PM

You should be able to assign an XMLDocument to a message. Try this:
- add a variable of the type XmlDocument to your orchestration
- in message assignment, initialize the XmlDocument : document.LoadXml("<my
xml here/>") or document.Load("my file path");
- construct your message from the xml document: myMessage = document;

You can also call a .net class that returns a xml message: myMessage =
MyClass.MyStaticMethodThatReturnsXmlDocument();






[ Post a follow-up to this message ]



    Re: How to initialize a message?  
Frank Schumacher


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


 
06-26-04 03:53 PM

Thanks Iuliu,

although I don't understand why BizTalk can't create the file itself. I
will try your solution soon.

Ciao,
Frank

Iuliu Rus wrote:
> You should be able to assign an XMLDocument to a message. Try this:
> - add a variable of the type XmlDocument to your orchestration
> - in message assignment, initialize the XmlDocument : document.LoadXml("<m
y
> xml here/>") or document.Load("my file path");
> - construct your message from the xml document: myMessage = document;
>
> You can also call a .net class that returns a xml message: myMessage =
> MyClass.MyStaticMethodThatReturnsXmlDocument();
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:40 AM.      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