Re: How to pass Custom data types in calling document/literal wsdl from PHP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am slightly confused by what exactly you are trying to pass into the batchOperation() call. For me, passing comples/custom types as parameters result in creating an associative array, but for cleaner code you can try something like the following:

Consider a function like this:

retrieveLibraryBook( BookTitleObject title )

and the BookTitleObject has a constructor like the following:

BookTitleObject( String Title )

You can call the original function with the following code (I am more familiar with PHP5's soap functions, so this should work, but has the possibility of not, if that is the case, create an associative array):

$argument->BookTitleObject->title = "Ender's Game";
$client->call( 'retrieveLibraryBook', $argument );


or with the PHP5 built in soap objects in non-WSDL mode (definitely should work):

$argument->BookTitleObject->title = "Ender's Game";
$client->retrieveLibraryBook( $argument );


sankar thatha wrote:
Hi,
     I'm calling coldfusion wsdl from php.I want to pass a complex/Custom typed data to the coldfusion wsdl. I have a method called batchOperation() in wsdl and it accepts custom type parameters. The paramater is some thing like this.

1) An element represents--> (key,value) pair

I want to have Array of type element --> element[]

2) elementcollection represents --> (key,element[])
I want to have Array of type elementcollection --> elementcollection[]

3) An attribute represents --> (key,elementcollection[])


I have to send $attribute param from wsdl client. I want to construct attribute param, which I don't know?

I'm using nusoap for the same.

Attached is the wsdl.

Any help is appreciated. I'm a newbie to PHP and using SOAP in PHP.
Thnx
Sankaram.


      From Chandigarh to Chennai - find friends all over India. Go to http://in.promos.yahoo.com/groups/citygroups/


--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux