I'm using the existing calculator service implementations. I modified the .config files to be able to inspect the messages and headers.
The only thing I've done is to add a policy to the endpoint with the 2 versions of the AddIntegers method, where all other methods work as expected, but not the version 22.214.171.124 of AddIntegers. The one with the transformation added.
MessageHeader header1 =
I'm using the June CTP. All configuration has been done based on the walkthrough guide.
So have you created your own Calculator service implementation or attached a message inspector to the existing implementation? If you created your own, in the AddIntegers method you'd be looking at OperationContext.Current.IncommingMessageHeaders to find
your custom header.
" + header.Name);
//or do something else with the header
If you attached an IDispatchMessageInspector to the existing calculator service, you'd do the following to look at all the headers (in AfterReceiveRequest):
header in request.Headers)
" + header.Name); //or do something else with the header
We don't treat the message headers any differently between the two scenarios of calling AddIntgers, so I'm not sure why one would work for you and the other wouldn't. I assume you are using the June 2008 CTP release?
What bindings are you using for the calculator services?
Yes you described my scenario correctly. For me all operations except the 126.96.36.199 version are working as expected.
As I understand you want the custom headers to be sent to the service implementation (in this case one of the two calculator services).
Are you saying when you invoke the published 188.8.131.52 version of AddIntegers (which routes to the advanced calculator) the header is sent along, but when you send a message for the the Active but not published 184.108.40.206 version of AddIntegers the headers are not
sent to the Basic Calculator service?
I ran a test where I added a message inspector via policy on an endpoint that added a custom header. The header flowed through to the service implementation regardless of which version of AddIntegers was invoked. Note, that the reply does not include
the custom header for either invocation. It would be up to the message inspector to add the header back into the reply message if it is to be sent down to the original caller.
I have followed the Calculator Tutorial successfully. Then I added my own endpoint behavior implementation using XAML as a policy. My new behavior adds two new header items. All is fine when calling the advanced calculator operations. Then I call
the retired AddIntegers 220.127.116.11 version and the header items dissapear. Why is that?