Typically, in an orchestration scenario, a web service is consumed by adding a web reference to the project (of course we can do it without to as well) and linking send and receive shapes to the operation port (web method) it means, a proxy class is being generated for us allowing to consume the WS.
BUT, Sometimes we want to consume a web service without the need to do it in an orchestration scenario (performance requirement, to simplify scenarios, …)
#1# A receive port will pick up the xml file (needed by the web service as input parameters)
#2# a Solicit Response port is subscribed to this receive port and will send everything coming from here to the desired web service.
#3# The final send port will send everything coming form the solicit-response subscribed port.
The tricky thing resides in how to create a proxy without the need to add a web reference. Well it is a really straightforward : Just by calling the wsdl.exe tool included in visual studio will works:
(run it on the Visual Studio command prompt)
wsdl.exe /out:WS_Proxy.cs http://localhost/TestWebService_Proxy/TestWebService_OrcTestWebService_Port_1.asmx?WSDL
Running the wsdl command will generate the cs file based on what is detailed in the wsdl file.
I Will assume you are ready for creating the rest of the ports so i will focus on the request-response port.
You will have something like this:
You now must create the receive port, create the filter subscriptions on the solicit-response port and on the final send port and you will done!
Be aware is possible to transform the first receive message to the format the web service is expecting just using mapping at port level . The same applies to the last send folder.
For the last send port, you need to create a filter subscription like this:
BTS.YourCustomPromotedProperty = “ValueYouKnow'”
where “YourCustomPromotedProperty” is a promoted property on the response message returned from the WS.
Great illustration Agustin.
How about expanding the example to include the WCF adapter? :)
Great Idea. I will woork on it. Hope to be finished by the end of the week.
Recieve Ports are not mentioned and i configured everything as mentioned above but output is not getting as expected.