I have an application which expose WCF services from distance , here is an example of my services :
[OperationContract(Name = "AddClient")]
bool AddClient(Client c);
I tried to consume the WCF service from a Console Application , although the ConsoleAp. doesn’t have any defenition of “Client” class, I can make an instance of “Client” through my ConsoleAp, and it works perfectly fine.
My question is , is it possible to call this function from a php based application, and will it let me insert the “Client” object or defined it in an equivalent way as .NET?
I thought I might jump over my head here, and all i should do is send simple parameters, the thing is that “Client” has 10+ properties/fields, and it doesn’t seem clean/purify enough.
Thanks
It does. If you add a service reference, a proxy class is generated that contains the methods and classes defined by the service. You can see this in the file
Reference.csunder the service reference, where you’ll go if you click Go To Definition on a Client (or press F12).Or, if the Console Application contains an assembly reference to the WCF Service, the ConsoleApp can access the public classes of the WCF project, but that has nothing to do with either WSDL or WCF.
If you want to generate classes from a WSDL in PHP, you can take a look at wsdl2php or wsdl2php-interpreter (found here) or search for another library or tool that does this.