0

i have problem with calling a Web service in php, the Web service written in c # language. i have sample code in c# that work correctly, this code use System.ServiceModel.ClientBase.

ServiceReference2.ExternalClient t = new ServiceReference2.ExternalClient ();
            t.Endpoint.Binding.CloseTimeout = new TimeSpan(500, 0, 0);
            t.Endpoint.Binding.SendTimeout = new TimeSpan(500, 0, 0);
            t.Endpoint.Binding.ReceiveTimeout = new TimeSpan(500, 50, 0);
            t.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;
            t.ClientCredentials.UserName.UserName = txtUserName.Text;
            t.ClientCredentials.UserName.Password = txtPassword.Text;
            string ds = t.GetTransfer(txtDate.Text);

i test nusoap and soapclient but i get error messages (bad request or Error Fetching http headers ).

my problem is same as WSSE PHP SOAP Client Header function call and my WSDL like WSDL

Community
  • 1
  • 1
Masood S
  • 13
  • 6
  • What's your PHP code like? – GordonM Mar 06 '13 at 14:14
  • This is a C# proxy, you have to write your own PHP proxy mate – Sleiman Jneidi Mar 06 '13 at 14:17
  • php Code : $soapclient = new nusoap_client( 'http://ip:port/ExternalServices/?wsdl]' ); $soapclient->setCredentials( 'user' , 'pass' ); $soapclient->soap_defencoding = 'UTF-8'; $response = $soapclient->call( 'GetTransfer' , array('2013/02/01') ); – Masood S Mar 06 '13 at 14:23
  • 1
    A service client is sometimes called a proxy. If the PHP client is giving errors, put the PHP code in your question. To debug this: use Fiddler and comparison PHP and WCF's messages. – CodeCaster Mar 06 '13 at 17:23
  • i have use Fiddler and see that c# request encrypted. in dotnet request encrypted with certificate key. i find [wse-php code](http://code.google.com/p/wse-php/source/browse/soap-wsse.php) and will test it. – Masood S Mar 06 '13 at 17:44

0 Answers0