c# - Calling ASP .NET web service from php client -


I have a simple ASP .NET Web service and I want to call it a php client. I am using a nusoap soap client

The following is the client-side php code:

  & lt ;? Php require_once ('lib / nusoap.php'); $ Wsdl = "? Http: // localhost: 64,226 / Service1.asmx wsdl"; $ Client = new soapbox ($ wsdl, 'wsdl'); $ Param = array ('number1' => 2 ',' 2 '=> 3'); Counterpart $ client- & gt; Call ('add', $ param); ? & Gt;  

I created web methods in web service as follows:

  Namespace WebService3 /// & lt; Summary & gt; Summary descriptions for /// service details & lt; / Summary & gt; [WebServices (namespace = "http://tempuri.org/")] [WebServiceBing (Confafoto = WSIProfiles.BasicProfile1_1)] [Toolboxtitle (False)] Public Service Service 1: System. Web. Services. Web service [[WebAmid] Public string hello () {return "Hello world"; } [WebMethod] adding public string (int x, int y) {int z = x + y; Return z.ToString (); }}}  

However, when I run the php code above, it does not return the combined value of passed parameters. Instead, it previews the word 'Arrase'

I do not have experience in PHP programming. Am I doing something wrong in the above code? To resolve this, need a quick solution and open the web service from php.

Thank you in advance!

option of this row

  copy $ client-> Call ('add', $ param);  

this one

  $ client-> __ SOAP CALL ('ADD', $ PAR); See also  

.


Comments