|
Home > Archive > BizTalk Server Orchestration > August 2004 > Best practice to return error messages
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 |
Best practice to return error messages
|
|
| Christoffer 2004-08-19, 7:47 am |
| Hello, I have a question...
I've set up an Orchestration as a Web Service. The Orchestration performs a
cd-key check to ensure that the calling client has an active cd-key. This is
done by using an Expression Shape and calling an assembly. The assembly
returns a boolean value indicating of the cd-key is active or not. The
Orchestration has a variable to which the value is assigned. The next step
is the Decide Shape where the value is checked for true or false. If it's
true, the Orchestration proceeds with a query and returns a xml document.
However, if the value is false, that is, the cd-key is not active, I would
like to return an error message or similar to the client calling the Web
Service.
What is the best practice of returning error messages from an Orchestration
to a client?
Thanks,
Chris
| |
| Christoffer 2004-08-19, 5:52 pm |
| Right, I figured out it was all about creating a New Fault Message on the
port. Said and done, and as for the message, I created a new schema called
SerialInvalid and a new message with SerialInvalid as its Message Type.
Now, after constructing the fault message and sending it to the Fault
Message Operation I receive a SoapException at the Web Service end. How do I
go about extracting the SerialInvalid message from the SoapException? I had
a look at the SoapException.Detail property but it doesn't seem to include
the message I sent back.
Thanks,
Chris
"Christoffer" <christoffer@nospam.com> skrev i meddelandet
news:ObDavAdhEHA.592@TK2MSFTNGP11.phx.gbl...
> Hello, I have a question...
>
> I've set up an Orchestration as a Web Service. The Orchestration performs
a
> cd-key check to ensure that the calling client has an active cd-key. This
is
> done by using an Expression Shape and calling an assembly. The assembly
> returns a boolean value indicating of the cd-key is active or not. The
> Orchestration has a variable to which the value is assigned. The next step
> is the Decide Shape where the value is checked for true or false. If it's
> true, the Orchestration proceeds with a query and returns a xml document.
> However, if the value is false, that is, the cd-key is not active, I would
> like to return an error message or similar to the client calling the Web
> Service.
>
> What is the best practice of returning error messages from an
Orchestration
> to a client?
>
> Thanks,
> Chris
>
>
| |
| abdulsait 2004-08-24, 6:58 pm |
| You can just create a new orchestration variable of type "string" and assign
the error message to the string. You dont really need another schema. You can
then send this string as the fault message and extract it using the
SoapException.Detail.
Abcool
"Christoffer" wrote:
> Right, I figured out it was all about creating a New Fault Message on the
> port. Said and done, and as for the message, I created a new schema called
> SerialInvalid and a new message with SerialInvalid as its Message Type.
>
> Now, after constructing the fault message and sending it to the Fault
> Message Operation I receive a SoapException at the Web Service end. How do I
> go about extracting the SerialInvalid message from the SoapException? I had
> a look at the SoapException.Detail property but it doesn't seem to include
> the message I sent back.
>
> Thanks,
> Chris
>
> "Christoffer" <christoffer@nospam.com> skrev i meddelandet
> news:ObDavAdhEHA.592@TK2MSFTNGP11.phx.gbl...
> a
> is
> Orchestration
>
>
>
|
|
|
|
|