|
Home > Archive > BizTalk Server Administration > April 2005 > Web Service Publishing Wizard
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 |
Web Service Publishing Wizard
|
|
|
| I have generated a very simple schema and orchestration with a single
one-way port in an assembly and deployed it. I then generated a web service
from a schema using the wizard. I noticed that the MessageType property was
not being promoted, and I changed the receive pipeline to XMLReceive. I
then got the following error:
There was a failure executing the receive pipeline:
"Microsoft.BizTalk.DefaultPipelines.XMLReceive" Source: "XML disassembler"
Receive Location: "/BizTalkWebService2/WebService1.asmx" Reason: Index was
outside the bounds of the array.
After many hours, I tried regenerating the web service from the
orchestration and the issue was gone. This led me to do some investigation
and I found, what appears to me, a bug in the generator. In the asmx
generated with the orchestration option I have the following line:
string bodyTypeAssemblyQualifiedName = "SimpleTest.Schema1+Request,
SimpleTest, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=2e3bec2c960cfb09";
In the file generated by the schema option I have this line:
string bodyTypeAssemblyQualifiedName = "SimpleTest.Schema1, SimpleTest,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=2e3bec2c960cfb09";
Notice that "+Request" is missing from the schema version. When I change
this and recompile the web service the error is gone. Is this a bug in the
generator or am I overlooking something? Should I not be using the
XMLReceive pipeline with a SOAP adapter? If not how does the MessageType
get promoted?
Thanks,
Brian
| |
| Saravana Kumar 2005-04-13, 5:53 pm |
| Hello Brian,
There is nothing wrong (no bugs) with the "Biztalk Web Services Publishing
Wizard". This wizard is basically used for two completely different
purposes.
1. To expose your orchestration as a web service, this allows a client
application to post a message(xml) directly to the orchestration. The client
could be .NET client (Created with the help of proxy classes generated by
web referencing the web service), or it could be a vbscript, posting
relevant SOAP message, or some Java client..whatever
2. To create a web service with Web methods that utilises the Schemas for
Request and Response parameters.
Now coming to your point:
You see "+Request" when using the wizard when you publish the orchestration
as a web service, this "+Request" (only Request, + is used for delimiting)
is nothing but your operation in the port (The one way port your created
inside the orchestration). You don't see this "+Request" when you try to
create a web service by "publishing the Schemas" because there is no
operations involved When you look at the context properties you will see a
property called "MethodName=Request", this is what concatenated in
"bodyTypeAssemblyQualifiedName". If you look at the subscriptions for the
orchestration, you can see 1st one will be to the MessageType and the 2nd
one will be to MethodName.
Regarding property promotion, it's valid point how PassThrough pipeline can
promote properties, Promoting properties inside the pipeline is not the only
option, you can also promote properties from adapters, SOAP ISA custom
adapter, so MessageType Property is promoted inside the adapter [This is
just my work out].
You can use XmlReceive pipeline as well the solution will still work.
HTH
--
Cheers
Saravana [MCP - Biztalk Server 2004]
http://saravanakumarmv.blogspot.com
<Brian> wrote in message news:OZWsfDHQFHA.2876@TK2MSFTNGP10.phx.gbl...
>I have generated a very simple schema and orchestration with a single
> one-way port in an assembly and deployed it. I then generated a web
> service
> from a schema using the wizard. I noticed that the MessageType property
> was
> not being promoted, and I changed the receive pipeline to XMLReceive. I
> then got the following error:
> There was a failure executing the receive pipeline:
> "Microsoft.BizTalk.DefaultPipelines.XMLReceive" Source: "XML disassembler"
> Receive Location: "/BizTalkWebService2/WebService1.asmx" Reason: Index was
> outside the bounds of the array.
>
> After many hours, I tried regenerating the web service from the
> orchestration and the issue was gone. This led me to do some
> investigation
> and I found, what appears to me, a bug in the generator. In the asmx
> generated with the orchestration option I have the following line:
>
> string bodyTypeAssemblyQualifiedName = "SimpleTest.Schema1+Request,
> SimpleTest, Version=1.0.0.0, Culture=neutral,
> PublicKeyToken=2e3bec2c960cfb09";
>
> In the file generated by the schema option I have this line:
>
> string bodyTypeAssemblyQualifiedName = "SimpleTest.Schema1, SimpleTest,
> Version=1.0.0.0, Culture=neutral, PublicKeyToken=2e3bec2c960cfb09";
>
> Notice that "+Request" is missing from the schema version. When I change
> this and recompile the web service the error is gone. Is this a bug in
> the
> generator or am I overlooking something? Should I not be using the
> XMLReceive pipeline with a SOAP adapter? If not how does the MessageType
> get promoted?
>
> Thanks,
>
> Brian
>
>
| |
|
| I did a bunch more testing this morning and this is what I found. When I
use a schema that has only one root element defined BizTalk uses only the
schemas type name to define the message type. But, if the schema defines
more then one root node BizTalk uses TypeName#RootElement to define the
message type.
In fact if you have a single-rooted schema defined and it is referenced by
an orchestration when you add a second root node to that schema you will get
an error such as the following next time you compile.
C:\Documents and Settings\Administrator\My Documents\Visual Studio
Projects\SimpleTest\SimpleOrchestration.odx(82,13): error X2233:
'SimpleTest.SimpleSchema': a multi-rooted schema may not define a message
part; reference the roots directly
This alone is very annoying. It would be nice to not have to change
everything if you add a new root node definition to an xsd, but that is a
separate issue.
Getting back to my issue, when I use the single-rooted schema both the
Schema and Orchestration option produce identical results and the Xml
Disassembler runs without an error:
string bodyTypeAssemblyQualifiedName = "SimpleTest.SimpleSchema, SimpleTest,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=2e3bec2c960cfb09";
But when using the multi-rooted schema the orchestration option appends the
root element name "+Request" and the schema option does not (as I showed
yesterday). Any web service generated using the schema option fails in the
Xml Disassembler.
Thanks,
Brian
<Brian> wrote in message news:OZWsfDHQFHA.2876@TK2MSFTNGP10.phx.gbl...
> I have generated a very simple schema and orchestration with a single
> one-way port in an assembly and deployed it. I then generated a web
service
> from a schema using the wizard. I noticed that the MessageType property
was
> not being promoted, and I changed the receive pipeline to XMLReceive. I
> then got the following error:
> There was a failure executing the receive pipeline:
> "Microsoft.BizTalk.DefaultPipelines.XMLReceive" Source: "XML disassembler"
> Receive Location: "/BizTalkWebService2/WebService1.asmx" Reason: Index was
> outside the bounds of the array.
>
> After many hours, I tried regenerating the web service from the
> orchestration and the issue was gone. This led me to do some
investigation
> and I found, what appears to me, a bug in the generator. In the asmx
> generated with the orchestration option I have the following line:
>
> string bodyTypeAssemblyQualifiedName = "SimpleTest.Schema1+Request,
> SimpleTest, Version=1.0.0.0, Culture=neutral,
> PublicKeyToken=2e3bec2c960cfb09";
>
> In the file generated by the schema option I have this line:
>
> string bodyTypeAssemblyQualifiedName = "SimpleTest.Schema1, SimpleTest,
> Version=1.0.0.0, Culture=neutral, PublicKeyToken=2e3bec2c960cfb09";
>
> Notice that "+Request" is missing from the schema version. When I change
> this and recompile the web service the error is gone. Is this a bug in
the
> generator or am I overlooking something? Should I not be using the
> XMLReceive pipeline with a SOAP adapter? If not how does the MessageType
> get promoted?
>
> Thanks,
>
> Brian
>
>
| |
|
| I am not sure you have understood my issue. the "+Request" is the root
element name not the port name. I have added more information to the
original request. Thanks for the help.
"Saravana Kumar" <saravana@hotmail.co.uk> wrote in message
news:OQTfVgHQFHA.580@TK2MSFTNGP15.phx.gbl...
> Hello Brian,
>
> There is nothing wrong (no bugs) with the "Biztalk Web Services
Publishing
> Wizard". This wizard is basically used for two completely different
> purposes.
>
> 1. To expose your orchestration as a web service, this allows a client
> application to post a message(xml) directly to the orchestration. The
client
> could be .NET client (Created with the help of proxy classes generated by
> web referencing the web service), or it could be a vbscript, posting
> relevant SOAP message, or some Java client..whatever
>
> 2. To create a web service with Web methods that utilises the Schemas for
> Request and Response parameters.
>
> Now coming to your point:
>
> You see "+Request" when using the wizard when you publish the
orchestration
> as a web service, this "+Request" (only Request, + is used for
delimiting)
> is nothing but your operation in the port (The one way port your created
> inside the orchestration). You don't see this "+Request" when you try to
> create a web service by "publishing the Schemas" because there is no
> operations involved When you look at the context properties you will see
a
> property called "MethodName=Request", this is what concatenated in
> "bodyTypeAssemblyQualifiedName". If you look at the subscriptions for the
> orchestration, you can see 1st one will be to the MessageType and the 2nd
> one will be to MethodName.
>
> Regarding property promotion, it's valid point how PassThrough pipeline
can
> promote properties, Promoting properties inside the pipeline is not the
only
> option, you can also promote properties from adapters, SOAP ISA custom
> adapter, so MessageType Property is promoted inside the adapter [This is
> just my work out].
>
> You can use XmlReceive pipeline as well the solution will still work.
>
> HTH
>
> --
> Cheers
> Saravana [MCP - Biztalk Server 2004]
> http://saravanakumarmv.blogspot.com
>
>
>
> <Brian> wrote in message news:OZWsfDHQFHA.2876@TK2MSFTNGP10.phx.gbl...
disassembler"[vbcol=seagreen]
was[vbcol=seagreen]
change[vbcol=seagreen]
MessageType[vbcol=seagreen]
>
>
|
|
|
|
|