|
Home > Archive > BizTalk Server Orchestration > March 2005 > How to call a BTS orchestration-based web service?
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 BTS orchestration-based web service?
|
|
| HL7 Guy 2005-03-02, 6:02 pm |
| I have tried to deploy a BTS2K4 orchestration as a web service but it
apparently follows different rules from a conventional web service (as all
BTS orchs seem to).
The intent is simple - to send a single integer to the web service/orch, and
have it receive the integer into a schema and simply write it out to a local
file, as XML.
What is the correct way to call the web service?
Here is the SOAP Request/Response generated by the deployment:
POST
/SupplyOrderWS_Proxy/ SupplyOrderWS_AcceptSupplyOrder_portSupp
lyOrderReceive.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction:
"http://HCHBSupplyOrder.org/ SupplyOrderWS_AcceptSupplyOrder_portSupp
lyOrderReceive/TransmitSupplyOrder"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<TransmitSupplyOrder xmlns="http://HCHBSupplyOrder.org/">
<TransmitSupplyOrder xmlns="http://SupplyOrderWS.SupplyOrderReq">
<SupplyOrderID xmlns="">int</SupplyOrderID>
</TransmitSupplyOrder>
</TransmitSupplyOrder>
</soap:Body>
</soap:Envelope>
| |
| Ben Cuttriss 2005-03-07, 5:49 pm |
| The easiest way to inspect what happens on a web service call is to use the
following sequence.
1. Deploy the orchestration using the web services deployment wizard.
(Create the receive locations and allow anonymous access)
2. use the WebService Studio from 'GotDotNet'. Navigate to the URL created
in step 1.
3. Enter the data in the relevant place.
4. Go to the Request/Response tab in WebService studio to see exactly what
needs and is passed to the web service.
Any questions, post back and I'll investigate further.
Regards
Ben Cuttriss
| |
| HL7 Guy 2005-03-07, 5:49 pm |
| BC,
This is an excellent suggestion, the WebServiceStudio tool is a handy
quick-and-dirty utility. I loaded the WSDL for my deployed orchestration and
invoked the method, filled in a random integer value for the SupplyOrderID
and Invoked.
The utility executed and gave me Request/Response. The XML for the SOAP
request was perfect, the integer loaded correctly.
The response, however, included the message "The resource could not be
found," along with a FileNotFoundException for my asmx file - but when I
checked, the asmx file was exactly where it was supposed to be, and exactly
where the error message said it was not.
Why is this so? What else is there I can check?
"Ben Cuttriss" wrote:
> The easiest way to inspect what happens on a web service call is to use the
> following sequence.
>
> 1. Deploy the orchestration using the web services deployment wizard.
> (Create the receive locations and allow anonymous access)
> 2. use the WebService Studio from 'GotDotNet'. Navigate to the URL created
> in step 1.
> 3. Enter the data in the relevant place.
> 4. Go to the Request/Response tab in WebService studio to see exactly what
> needs and is passed to the web service.
>
> Any questions, post back and I'll investigate further.
>
> Regards
> Ben Cuttriss
| |
| Ben Cuttriss 2005-03-07, 5:49 pm |
| HL7,
Can you post the exact response as reported by WebService Studio please.
I'll look at that and look into it.
Seems that maybe your orchestration is throwing an exception. Did you debug
it in HAT and make sure it completed correctly.
Just paste the error below and we'll have a look.
Ben Cuttriss
| |
| HL7 Guy 2005-03-08, 5:49 pm |
| Ben,
It may come down to what the BTS orchestration expects in the Port
Configuration wizard. When creating the SOAP receive port in the
orchestration, I can enter
/NameOfTheService.asmx in the URL of the SOAP specification,
but if I enter
http://localhost/NameOfTheService.asmx in the URL, then the project won't
deploy - it will generate an error on the receive location, even though the
URL is literally correct.
It seems that the error is caused by this URL, the basis of the NotFound
response that WebServiceStudio shows in its Response window (below):
Date:Tue, 08 Mar 2005 20:30:38 GMT
Server:Microsoft-IIS/6.0
X-Powered-By:ASP.NET
MicrosoftSharePointTeamServices:6.0.2.5530
X-AspNet-Version:1.1.4322
Cache-Control:private
Content-Type:text/html; charset=utf-8
Content-Length:3208
<html>
<head>
<title>The resource cannot be found.</title>
<style>
</style>
</head>
<body bgcolor="white">
<span><H1>Server Error in '/SupplyOrderWS_Proxy' Application.</H1>
<h2><i>The resource cannot be found.</i></h2></span>
<b> Description: </b>HTTP 404. The resource you are looking for (or
one of its dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure that
it is spelled correctly.
<br><br>
<b> Requested Url:
</b>/SupplyOrderWS_Proxy/ SupplyOrderWS_AcceptSupplyOrder_SupplyOr
derSOAPport.asmx<br>
</body>
</html>
"Ben Cuttriss" wrote:
> HL7,
>
> Can you post the exact response as reported by WebService Studio please.
> I'll look at that and look into it.
>
> Seems that maybe your orchestration is throwing an exception. Did you debug
> it in HAT and make sure it completed correctly.
>
> Just paste the error below and we'll have a look.
>
> Ben Cuttriss
"Ben Cuttriss" wrote:
> HL7,
>
> Can you post the exact response as reported by WebService Studio please.
> I'll look at that and look into it.
>
> Seems that maybe your orchestration is throwing an exception. Did you debug
> it in HAT and make sure it completed correctly.
>
> Just paste the error below and we'll have a look.
>
> Ben Cuttriss
| |
| Ben Cuttriss 2005-03-10, 2:47 am |
| I think I understand what the problem is here.
Try the following:-
Create the receive port as a "Public - No Limit", "Specify Later" - Port
Binding.
When you then run the Web Services Publishing wizard, select "Create BizTalk
Receive Locations" and "Anonymous Access".
Now when the orchestration is deployed, bind the receive port to the receive
location and it will work. The Web Services Publishing Wizard will create
all the asmx files and it will work.
Let me know how you get on.
Ben Cuttriss
| |
| HL7 Guy 2005-03-10, 5:54 pm |
| Ben, this worked perfectly!
When defining a port per the Port Configuration Wizard in the orchestration
itself, all the details of a SOAP port can be entered and so this is how I
had created that port. BizTalk gives no warning or indication that there is
any reason not to. However, the result was the problems detailed above.
Creating distinct physical and logical ports as you suggested, then binding
the physical port to the orchestration later, did the trick.
Thanks very much!
"Ben Cuttriss" wrote:
> I think I understand what the problem is here.
>
> Try the following:-
>
> Create the receive port as a "Public - No Limit", "Specify Later" - Port
> Binding.
>
> When you then run the Web Services Publishing wizard, select "Create BizTalk
> Receive Locations" and "Anonymous Access".
>
> Now when the orchestration is deployed, bind the receive port to the receive
> location and it will work. The Web Services Publishing Wizard will create
> all the asmx files and it will work.
> Let me know how you get on.
> Ben Cuttriss
|
|
|
|
|