Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a web service which uses additional custom SOAP headers.
An ordinary WPF project (when adding service reference) generates corresponding parameters for the methods these headers are declared for, so they are passed as method's parameters on the client side.
But in the WP7 Silverlight project these headers are not used by the WebServiceSoapClient class.
Their classes are generated by VS2010, but they are not used in the code.

The code of the web-service looks like the following

[XmlRoot("MySoapHeader")]
public class MySoapHeader : SoapHeader
{ ... }

public class MyService
{
MySoapHeader m_mySoapVar;

[WebMethod]
[SoapHeader("m_mySoapVar", Direction = SoapHeaderDirection.InOut)]
public void MyMethod(string name)
{ ... }
}


The service client for WP7 is like this:

public class MySoapHeader {}

public class MyServiceSoapClient
{
   public void MyMethodAsync(string name) {}
}

Thats it. Nothing about using MySoapHeader.

Is there any way to send my headers from the client when calling MyServiceSoapClient.MyMethod() and to get IN headers after call is finished ?

I don't believe SOAP headers are not supported by WP7

Thanks,
Alex
Posted
Updated 14-Oct-10 21:33pm
v3
Comments
Dalek Dave 15-Oct-10 3:33am    
Edited for Code Blocks.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900