How to send class from PHP or Zend Framework to WCF service?

General discussion on PHP

How to send class from PHP or Zend Framework to WCF service?

Postby przemek_kompix on Fri Dec 21, 2012 3:46 pm

Hello

I wrote WCF service which be called directly from PHP or Zend Framework.

When operation contract wants simple argument like String everything works fine. For example:

[OperationContract]
ComplexClass Znajdz(String simpleArgument);

Then calling from
$client = new Zend_Soap_Client("http://URL/?wsdl");
$client ->setSoapVersion(SOAP_1_1);

$parameter = array(
'simpleArgument' => "myValue",
);
print_r( $client->Add($parameter ));

And ComplexClass is returned to PHP script.

But when I try to use function where ComplexClass is argument, function are calling with null argument.

What should I look for?

Regards
Przemysław Staniszewski
przemek_kompix
 
Posts: 2
Joined: Fri Dec 21, 2012 3:46 pm

Re: How to send class from PHP or Zend Framework to WCF serv

Postby rampog on Thu Dec 27, 2012 2:10 pm

actually php doesn't have any concern either it is WCF or not,
it concern that soap server are integrated through with wsdl or not.
so you have to be able map which call class mapping if parameter not simple like just a string,int
so you have build your own object base on complex type or stdclass to generate parameter
rampog
 
Posts: 56
Joined: Mon May 04, 2009 12:15 pm

Re: How to send class from PHP or Zend Framework to WCF serv

Postby przemek_kompix on Fri Jan 04, 2013 1:47 pm

Hi

I found and tested good solution

social [dot] msdn [dot] microsoft [dot] com/Forums/en-US/wcf/thread/884fe36c-a7a2-4cc7-b34a-b0fd3f464579

Best Regards
Przemysław Staniszewski
przemek_kompix
 
Posts: 2
Joined: Fri Dec 21, 2012 3:46 pm


Return to PHP

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests