BiztalkR2B2user

Hi,

I'm currently trying to consume WCF services from my orchestration. I'm using BizTalk 2006 R2 beta 2. The problem that I'm facing is that I'm unable to get any response from the WCF service. Neither am I able to catch any exception in my orchestration. Do I have to use the WCF fault ports to catch the exceptions I'm not able to connect the fault ports anywhere in the orchestration or any port. Can somebody please help me

The WCF works fine when invoked from a .NET component.



Re: BizTalk R2 Adapters and Adapter Pack Problems while calling WCF in Biztalk

Karahan Celikel - MSFT

Hi,

Do you see any errors in the event log, or any suspended messages in BizTalk

Can you give more information about your scnario Which adapter are you using on the send port Can you double check the action and address properties of the send port

Thanks.





Re: BizTalk R2 Adapters and Adapter Pack Problems while calling WCF in Biztalk

BiztalkR2B2user

Hi,

I'm using the WCF basic Http adapter. The address property is same as the url of the .svc. HAT shows that the send pipeline, the one that connects the orchestration to the WCF, has started. It then hangs after that.

Thanks





Re: BizTalk R2 Adapters and Adapter Pack Problems while calling WCF in Biztalk

Dwight Goins

Turn on tracing for the WCF Services, it might be a good idea to turn it on from the BizTalk perspective, and from the WCF Service perspective to troubleshoot.

To turn on tracing for BizTalk WCF adapter, use the BTSNTSVC.exe.config file located within your BizTalk Install directory. Use the WCF Configuration editor to turn tracing and message logging on, and set the diagnostics to log entire messages.

The majority of the problems stem from the fact that the Message types sent from BizTalk, to a service is not formatted correctly (From the WCF Service's point of view) it may be missing a namespace, or the root node is somewhat different from what the WCF service is expecting.

If your send pipeline is hanging, then it most likely means that your service never got called because it can't find the endpoint or the bindings don't match or a contract filter mismatch- (Usually this is noted inside your Event Logs.)

It's also possible that the Service received the message but it did not serialize correctly for the service to execute, in which case the service generates a Object Null exception, which also logs to the event log.

HTH

(P.S. more information about your errors would be nice here to really get to the bottom of the issue...)






Re: BizTalk R2 Adapters and Adapter Pack Problems while calling WCF in Biztalk

BiztalkR2B2user

Hi,

What should be the SOAP header action of the send port if I want to include SOAP headers





Re: BizTalk R2 Adapters and Adapter Pack Problems while calling WCF in Biztalk

Dwight Goins

I'm not quite sure what you mean by... "if I want to include Soap Headers..."

The Action should be whatever the WCF Service you are sending to expects. If you're using the default dispatching operation within WCF. This is found on your Operation Contract. If you didn't specify an action, it defaults to Namespace(of Service)/ServiceName/Operation(Method Name) such as

http://tempuri.org/MyService/GetDetails

What errors are you getting






Re: BizTalk R2 Adapters and Adapter Pack Problems while calling WCF in Biztalk

Karahan Celikel - MSFT

Action header is itself a header item, and you can set it in send port UI. If you want to add your custom headers, you can achieve his by setting the CustomOutboundHeaders message context property in an orchestaration or a custom send pipeline component.

Example (orchestration):

MyMessage(WCF.OutboundCustomHeaders) = "<headers><myheader1>value1</myheader1><myheader2>value2</myheader2></headers>";

If you want to route the headers of the incoming message to the outgoing message, you can do this by copying the headers from WCF.InboundHeaders property of the incoming BTS message to WCF.CustomOutboundHeaders property of the outgoing BTS message. We'll ship a custom pipeline component SDK sample doing that.





Re: BizTalk R2 Adapters and Adapter Pack Problems while calling WCF in Biztalk

BiztalkR2B2user

Thanks a lot guys for your help. My problem is solved. I am able to call a WCF service successfully from my orcjhestration now.

I am exposing my own orchestrtion also a WCF service where I'm sending my response to the response post and exception to a fault port. Could you also please advice me on how I can set my own fault code at the fault code

Thanks!!!