locked
Custom SOAP headers in WCF request using BDC RRS feed

  • Question

  • I have a successfully connected to a WCF service, using SharePoint Designer to setup the BDC model and then export it to a .bdcm file.

    I then imported this into VS2010 as I need to add some custom SOAP headers to the message in order for it to work correctly and it deploys quite happily from there. However, having followed the instructions here I see no sign of the headers:

    http://msdn.microsoft.com/en-us/library/bb802855.aspx

    Using wireshark there is no sign of any custom headers being added; is there something obvious that I am missing to switch this feature on somehow?

    The extract from my .bdcm file is as follows:

    <LobSystemInstances>

    <LobSystemInstance Name="TaskStream">

    <Properties>

    <Property Name="ShowInSearchUI" Type="System.String" />

    <Property Name="WcfAuthenticationMode" Type="System.String">PassThrough</Property>

    <!--<Property Name="WcfAuthenticationMode" Type="System.String">Credentials</Property>-->

    <Property Name="WcfEndpointAddress" Type="System.String">http://XXXXX/TaskstreamService/TaskServiceHandler.svc</Property>

    <Property Name="SecondarySsoApplicationId" Type="System.String">TaskStreamSecureStore</Property>

    <Property Name="SsoProviderImplementation" Type="System.String">

    Microsoft.Office.SecureStoreService.Server.SecureStoreProvider,

    Microsoft.Office.SecureStoreService, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

    </Property>

    <Property Name="SoapHeaderXml" Type="System.String">

    &lt;wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext"&gt;

    &lt;wsse:UsernameToken&gt;

    &lt;wsse:Username&gt;TaskStreamUsername&lt;/wsse:Username&gt;

    &lt;wsse:Password Type="wsse:PasswordText"&gt;TaskStreamPassword&lt;/wsse:Password&gt;

    &lt;/wsse:UsernameToken&gt;

    &lt;/wsse:Security&gt;

    </Property>

    <Property Name="SoapHeaderXmlUserNameToken" Type="System.String">TaskStreamUsername</Property>

    <Property Name="SoapHeaderXmlPasswordToken" Type="System.String">TaskStreamPassword</Property>

    </Properties>

    </LobSystemInstance>

    </LobSystemInstances>

    Any ideas would be great as I would like to avoid adding the headers programmatically if possible, since it looks like I should be able to define it all in the XML.

    Wednesday, December 29, 2010 11:08 AM

All replies

  • Hi,

    Can you cross-verify about the custom SOAP headers using Fiddler tool (http://www.fiddlertool.com)?


    AnjaliCH-MSFT
    Friday, January 7, 2011 8:23 PM
  • Hi Anjali,

    I don't have the logs to hand but I looked at the packets being sent from my test machine using Wireshark to confirm that the custom SOAP headers were not included. One peculiarity, as I recall, was that there was a header checksum error for the http message, but I am not sure if this is related. Thanks for the fiddlertool suggestion - I may give it a go to see if the result is different.

    In the end I used svcutil and wired up the BDC model manually with the service in Visual Studio, since it gave me some more flexibility in any case. 

    Will

    Monday, January 10, 2011 9:03 AM
  • Hi Will,

    Sorry about the delayed response, but I am glad that you have been able to move forward on this.  If you'd like this issue to be investigated, please let us know the exact action you take when you capture the packets in WireShark.

    Thanks,


    These postings are provided "AS IS" with no warranties, and confers no rights.
    Wednesday, March 2, 2011 10:01 AM