0

i have a web service written in php, i added it as web reference to my asp.net web site (asp,c#) i knew how to call web service's method from c#.net client, but the problem i still have: i want to send a soap header with web service call (from c#.net client to php server)

i did this but in php client, by using $client->setHeaders, and parsed the sending header in $server, but how to do it in c#.net client,

note: i don't have a header class in server.php , ant it works fine with php

please help

2 Answers2

0

Use WCF custom headers to fill in extra information to pass along to php. http://cisforcoder.wordpress.com/2010/12/01/how-to-implement-basic-http-authentication-in-wcf-on-windows-phone-7/

This example in the link passes along the header for Authorization

If you make a web reference to the php service, then I can point to the person who already asked it before here on the forum.

Adding SOAP headers to ASMX service requests

Community
  • 1
  • 1
Schwarzie2478
  • 2,186
  • 26
  • 30
  • Thanks in advance for your answer, but is there other way to do it without use WCF.Iam not familiar with it, and i already have an asp website application that call web services at php server but without soapheaer,i read at forums how to use soap header with php client and php server and use it, i also read about using soapheader in c#.net client but with asp server and web methods written in c#.net,but the main problem is how to do this between c#.net client and php server.... – user1351063 Jun 05 '12 at 10:45
0

If you are using nuSoap, you can go the library, you'll find the code where packet response is been generated. There you can add your own attributes and headers as per your requirement.

combinatorial
  • 9,132
  • 4
  • 40
  • 58