I need to use wcf service in BizTalk. I have found multiple options to add service in BizTalk. Which are listed below
1. Consume WCF service using 'Add Generated Items...'
2. Add service using 'Add Service Reference...'
1. So which option should I use to add my service in BizTalk? Should I go with option1 or option2?
2. How should I decide which option to use to add service in the BizTalk?
Please help me to resolve the my confusion.
The BizTalk Adapter Framework provides a way to add adapter schemas and BizTalk types to BizTalk projects. The BizTalk WCF Service Consuming Wizard enables you to add WCF send adapters to a BizTalk project. For the WCF send adapters, you must select an existing metadata exchange (MEX) endpoint for send ports. Then you need to enter the information used to generate the schemas and types. When the wizard completes, the schemas and types necessary to consume WCF services are added to the BizTalk project. For reference see How to Use the BizTalk WCF Service Consuming Wizard to Consume a WCF Service.
When you use the Add Service Reference to add service references to BizTalk projects, BizTalk Server converts the schema types that are required to call each Web method to schemas. BizTalk Server adds these schemas to Reference.xsd. If your schemas contain element names that are C# keywords or the element name is not valid as a C# identifier, you may get a run-time error. To avoid run-time errors, ensure that the Web service you consume does not contain element names that are C# keywords or invalid C# identifiers.
For consuming services review Considerations When Consuming Web Services. Add service reference can be used when you know your endpoint (address) and need to import the WSDL. If you do have an WSDL as file somewhere on system than you can use the wizard. Another advantage of using the wizard is that it generates the bindings too based on service descriptions. When you add a service reference this will not happen.
MVP & MCTS BizTalk Server
If this answers your question please mark it accordingly
- Marked as answer by Andrew_ZhuModerator Thursday, December 09, 2010 8:06 AM