dynamically consume webservice in biztalk

Hi,

i need to consume web service in biztalk orchestration dynamically.

Whenever the orchestration starts we find the service url in xml node but how to implement this.

we are using BizTalk Server 2013.

Thanks


  • Edited by R... Raj Tuesday, December 24, 2013 5:30 AM
December 24th, 2013 8:22am

The only way I'm aware you will be able to achieve this to use a Dynamic Send Port and then use SOAP as the protocol, you will have to build the COMPLETE SOAP MESSAGE as an XMLDocument and similarly parse the SOAP Response as an XMLDocument.

If however what you imply is the same Web Service but different instances then by all means, generate the schemas through the usual consume MEX endpoints and then use the Dynamic Port to assign the destination URI and build the send request. You will still use SOAP but the message buildup will be against published schemas, actions will be already defined only the value will be defined at runtime.

You cannot expect to do dynamic proxy class generation based on the URL even if it is possible using CODEDOM. Remember this is runtime, how will the associated message schemas get into BizTalk and current process context, how will the message serialization/de-serialization happen between the message and the generated proxy classes?

Regards.

  • Marked as answer by R... Raj Friday, January 10, 2014 3:22 PM
Free Windows Admin Tool Kit Click here and download it now
January 9th, 2014 2:31pm

Hi shanky,

first sorry for this delay responce.

i was following the same approch that u specified.

those web services which we are getting in the incoming xml node are from different servers but they have exposed same web methods. Now we used

1. "MEX endpoints" to generate the xml

2. creating a port but used "existing port" created as "ServiceSoap" and specify port binding as DYNAMIC.

3. receive incoming XML and transform it into request message.

4. In expression:

DynamicSendPort(Microsoft.XLANGs.BaseTypes.Address)=MessageIn.URL;

DynamicSendPort(Microsoft.XLANGs.BaseTypes.TransportType)="WCF-BasicHttp";

NOTE :it is working fine for that service which has only 1 exposed web method.and getting error in case if the service has more than 1 web method.(coz of multiple operatons in the service)

to resolve this i used this

5. in message assignment shape:

MessageOut(WCF.BindingType)="basicHttpBinding";
MessageOut(WCF.Action)="http://tempuri.org/InsertOperation";

but now i m getting error that "use of unconstructed message 'MessageOut'" and

"'MessageOut.parameters': message part has not been initialized in construct statement"

but i have checked that in construct message property box "message constructed = 'MessageOut'"

now kindly show me some directions to proceed.........

thanks


  • Edited by R... Raj Friday, January 10, 2014 2:07 PM
  • Marked as answer by R... Raj Friday, January 10, 2014 3:22 PM
  • Unmarked as answer by R... Raj Friday, January 10, 2014 3:22 PM
January 10th, 2014 5:04pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics