|
Home > Archive > BizTalk Server General > June 2004 > Create a message of a .NET Class Type..
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 |
Create a message of a .NET Class Type..
|
|
| Gary Chamberlain 2004-06-20, 11:07 pm |
| Per the examples in MSDN, I created a class using the following code. I compiled it, and then added a reference to it in my BizTalk project.
Now I am trying to create a message of type FastTrackObjects.ExcelResults. However, the "Select Artifact Type" dialog does not show this class for me to select it. The namespace is there but it has no classes.
Do I need to set some attribute on the class to make it show up? Or am I missing another step?
Thanks,
Gary
using System;
using Microsoft.XLANGs.BaseTypes;
namespace FastTrackObjects {
[Serializable]
public class ExcelResults {
public ExcelResults(int requestId, string error) {
RequestId = requestId;
Error = error;
}
[DistinguishedFieldAttribute()]
public int RequestId;
[DistinguishedFieldAttribute()]
public string Error;
}
}
| |
| Gilles [MSFT] 2004-06-20, 11:07 pm |
| Hello Gary,
>Per the examples in MSDN, I created a class using the following code. I compiled it, and then added a reference to it in my BizTalk project.
I assume you are referring to the following page:
http://msdn.microsoft.com/library/e....asp?frame=true
>Now I am trying to create a message of type FastTrackObjects.ExcelResults. However, the "Select Artifact Type" dialog does not show this
>class for me to select it. The namespace is there but it has no classes.
Here is one way of doing this:
1) Ensure your assembly for ExcelResults is strongly named (it is referenced by the orchestration so you'll have to GAC it eventually)
2) In your orchestartion project, add a reference to the the assembly for ExcelResults
3) Insert a "Construct Message" shape at the adequate place
4) Open the "Orchestartion view" by clicking View->Other Windows->Ortchestration View"
5) At the top of the Orchestration view, there will be a folder named "Messages".
6) Right click this folder and Select "New Message"
7) Right click the new message (it will be called "Message_1") and select "Properties"
8) In the properties window, click on the "..." on the right of message type.
9) There will be a drop down inside which you will find a ".NET classes" item.
10) Expand it and select "<select from references assembly ...>"
11) Select the right class in the window that opens and click OK
12) Go back to the Construct Message shape. Your assembly will show up in the drop down.
Thanks.
-Gilles.
| |
| Gary Chamberlain 2004-06-20, 11:07 pm |
| Hi Gilles.
Thanks for the message. However, these are steps that I had done before.
See the comments that I interjected below.
"Gilles [MSFT]" <Gilles@online.microsoft.com> wrote in message
news:aXbI5e2UEHA.3484@cpmsftngxa10.phx.gbl...
> 1) Ensure your assembly for ExcelResults is strongly named (it is
referenced by the orchestration so you'll have to GAC it eventually)
I added the following to the AssemblyInfo.cs file
[assembly:
AssemblyKeyFile(@"D:\Projects\ATC-BizTalk\FastTrackObjects\FastTrack.snk")]
> 2) In your orchestartion project, add a reference to the the assembly for
ExcelResults
> 3) Insert a "Construct Message" shape at the adequate place
> 4) Open the "Orchestartion view" by clicking View->Other
Windows->Ortchestration View"
> 5) At the top of the Orchestration view, there will be a folder named
"Messages".
> 6) Right click this folder and Select "New Message"
> 7) Right click the new message (it will be called "Message_1") and select
"Properties"
> 8) In the properties window, click on the "..." on the right of message
type.
> 9) There will be a drop down inside which you will find a ".NET classes"
item.
> 10) Expand it and select "<select from references assembly ...>"
> 11) Select the right class in the window that opens and click OK
This is the "Select Artifact Type" dialog box that I spoke of in my original
post. I can see the namespace "FastTrackObjects" which means the reference
is fine but when I select it there are no items in the item pane. I
followed the NetClass example in MSDN. ...but why doesn't it show up as an
artifact?
> 12) Go back to the Construct Message shape. Your assembly will show up in
the drop down.
>
It doesn't because I cannot select it.
Here is my class...
using System;
using Microsoft.XLANGs.BaseTypes;
namespace FastTrackObjects {
[Serializable]
public class ExcelResults {
public ExcelResults(int requestId, string error) {
RequestId = requestId;
Error = error;
}
[DistinguishedFieldAttribute()]
public int RequestId;
[DistinguishedFieldAttribute()]
public string Error;
}
}
|
|
|
|
|