BizTalk Server General - How to call a web service that takes no input

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > April 2006 > How to call a web service that takes no input





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 How to call a web service that takes no input
Prash

2006-04-27, 7:26 am

I have a web service that takes no input. How do I call it? Here is the SOAP
input that it requires.

<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:GetAllCustomers />
</soap:Body>

When I add it as a web reference in BizTalk, it appears as a Multi Part
Message type with nothing inside it. I defined a message WSRequest which
points to this.

So I have a few questions
1. In my orchestration, I have a Send shape whose message type is WSRequest.
But I don't know how to create an instance of that message. Do I even have
to create an instance?

2. How do I start the orchestration? I believe that an orchestration must
have a Receive shape with Active property set to true. But I have nothing to
send to this orchestration.

One way would be to create a dummy input and send to Receive shape. Is that
a good practice?

Thanks.

P


Greg Forsythe

2006-04-27, 7:26 am

In answer to your questions:
1. Add a Construct Message shape before you call the web service.
Specify the WSRequest message as the message created, but do not add any
other shapes to the ConstructMessage shape.

2. The orchestration will only start on receipt of a message. So you need to
determine when you wish this orchestration to start.
If it is in response to some event, then this event needs to generate a
message and send it to Biztalk.
If is to be scheduled then there are a number of ways of doing this:

ScheduledTask Adapter
http://www.gotdotnet.com/Community/...C9-84BF4E783728

Batch Execution Framework
http://www.gotdotnet.com/Community/...B9-8A775A1A7359

Use a Windows Scheduled Task to create a file in a file receive location.
Use the SQL Receive adaptor to poll a database for some fixed value.

Personally I would chose the first, but I may be biased.

Greg

"Prash" <Prash@msn.com> wrote in message
news:%23%23i2BYJaGHA.596@TK2MSFTNGP05.phx.gbl...
>I have a web service that takes no input. How do I call it? Here is the
>SOAP input that it requires.
>
> <soap:Body
> soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <tns:GetAllCustomers />
> </soap:Body>
>
> When I add it as a web reference in BizTalk, it appears as a Multi Part
> Message type with nothing inside it. I defined a message WSRequest which
> points to this.
>
> So I have a few questions
> 1. In my orchestration, I have a Send shape whose message type is
> WSRequest. But I don't know how to create an instance of that message. Do
> I even have to create an instance?
>
> 2. How do I start the orchestration? I believe that an orchestration must
> have a Receive shape with Active property set to true. But I have nothing
> to send to this orchestration.
>
> One way would be to create a dummy input and send to Receive shape. Is
> that a good practice?
>
> Thanks.
>
> P
>
>



Prash

2006-04-27, 7:26 am

Greg,

Thanks. It helps a lot with first point.

About starting a transaction ... I am using a dummy receive. I have a
receive with Activate set to True. It is connected to a port. I send a file
on that port. The message received by the file is not used in any way. But I
get an error message

The Messaging engine failed to process a message submitted by adapter:FILE
Source URL:C:\tutorial\Lessons\ABCGetAllCustome
rs\In\*.xml. Details:The
published message could not be routed because no subscribers were found.
This error occurs if the subscribing orchestration or send port has not been
enlisted, or if some of the message properties necessary for subscription
evaluation have not been promoted. Please use the Biztalk Administration
console to troubleshoot this failure.
=== End of message

The send port is enlisted, and I am not aware of any subscription
evaluation. Message goes straight through to the Receive shape.

P


"Greg Forsythe" <greg.forsythe@gmail.com> wrote in message
news:Oy8BzYQaGHA.5000@TK2MSFTNGP05.phx.gbl...
> In answer to your questions:
> 1. Add a Construct Message shape before you call the web service.
> Specify the WSRequest message as the message created, but do not add
> any other shapes to the ConstructMessage shape.
>
> 2. The orchestration will only start on receipt of a message. So you need
> to determine when you wish this orchestration to start.
> If it is in response to some event, then this event needs to generate a
> message and send it to Biztalk.
> If is to be scheduled then there are a number of ways of doing this:
>
> ScheduledTask Adapter
> http://www.gotdotnet.com/Community/...C9-84BF4E783728
>
> Batch Execution Framework
> http://www.gotdotnet.com/Community/...B9-8A775A1A7359
>
> Use a Windows Scheduled Task to create a file in a file receive location.
> Use the SQL Receive adaptor to poll a database for some fixed value.
>
> Personally I would chose the first, but I may be biased.
>
> Greg
>
> "Prash" <Prash@msn.com> wrote in message
> news:%23%23i2BYJaGHA.596@TK2MSFTNGP05.phx.gbl...
>
>



Prash

2006-04-27, 7:20 pm


"Prash" <Prash@msn.com> wrote in message
news:%23tr%23NUZaGHA.4060@TK2MSFTNGP02.phx.gbl...
> The Messaging engine failed to process a message submitted by adapter:FILE
> Source URL:C:\tutorial\Lessons\ABCGetAllCustome
rs\In\*.xml. Details:The
> published message could not be routed because no subscribers were found.
> This error occurs if the subscribing orchestration or send port has not
> been enlisted, or if some of the message properties necessary for
> subscription evaluation have not been promoted. Please use the Biztalk
> Administration console to troubleshoot this failure.
> === End of message


Solved this problem. The file that I was copying to the incoming dictionary
did not match the schema of the Receive shape's message. When I created an
instance that matched the Receive shape's message, the orchestration ran
successfully.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com