Zend_Soap issue, being forced to use xsd:anyType

General discussion forum for the Zend Server

Zend_Soap issue, being forced to use xsd:anyType

Postby asimsid on Mon Jan 28, 2013 9:51 am


I'm using Zend Server CE's Zend_SOAP features.

I have a question, why does my Zend Autodiscovery always map by input variable as xsd:anyType and return as xsd:string?

To give you guys some sample of my coding (dataServe.php):

Code: Select all
        public function getCompany($P_KEY)
         $db = Zend_Db::Factory('Pdo_Oci', array(
            'host'       => '',
            'username'   => 'user',
            'password'   => 'pass',
            'dbname'     => 'ssss'

         $query = "select company_name cname from companies where ckey = '" . $P_KEY . "'";

         $res = $db->fetchAll($query);
         $v_comp = $res[0]['CNAME'];
         //return 10;
         return "There is a TezExch Company called: " . $v_comp;

I tried setting the return as 10 just to see if the ?wsdl will return something else.

This is what the /service.php?wsdl returns for this function:

Code: Select all
<message name="getCompanyIn">
<part name="P_KEY" type="xsd:anyType"/>
<message name="getCompanyOut">
[b]<part name="return" type="xsd:string"/>[/b]

if you notice its anyType and String. This is my precise problem - how can I control that? For example if I want integer input, then? Date input, then? Similarly for output...

in my service.php this is the simple code:

Code: Select all

    if ($_SERVER['QUERY_STRING'] == 'wsdl') {

        $auto = new Zend_Soap_AutoDiscover();
    else {

        $wsdl = sprintf(

        $soapServer = new Zend_Soap_Server($wsdl);

It all works, btw, its returning data. I'm just now thinking along the lines of tightening up what my client CAN or cannot send. I'm not a WSDL expert and rely on autodiscovery features instead of creating my own... However I would like some control over such things.

Any documentaion/examples you guys can share would be a great help.
Posts: 8
Joined: Mon Jan 28, 2013 9:37 am

Return to Zend Server

Who is online

Users browsing this forum: No registered users and 3 guests