ZF-6049: Bug with 'literal' style not being importable from WSImport

Issue Type: Bug Created: 2009-03-17T11:43:29.000+0000 Last Updated: 2009-05-30T15:50:42.000+0000 Status: Resolved Fix version(s): Reporter: Benjamin Eberlei (beberlei) Assignee: Benjamin Eberlei (beberlei) Tags: - Zend_Soap_Wsdl

Related issues: - ZF-6349



The following issue came up on the mailing list:


I have been trying to generate a java client to a soap service that is built with zf. The wsdl file is generated with Zend_Soap_AutoDiscover but I am not able to create the java client. Attached is the a dummy service and the code that creates the wsdl file. Im trying to create my java client using wsimport from jaxws.….

Any other suggestions and or experiences on how to best create a java client for a zf soap service is welcome.

This is the error I get.

sh http://localhost/soap/?wsdl [ERROR] Invalid wsdl:operation "method1": its a document-literal operation, message part must refer to a schema element declaration line 2 of http://localhost/soap/?wsdl

I tried to patch the Zend_Soap_Wsdl to use literal according to this thread… but then of course I have to provide a schema for my operations. My patch is pretty stupid but available here if anyone interested,

When that patch applied I get the following error instead. Which seems to indicate that the wsdl file is correct if I am not mistaken.

$ sh http://localhost/soap/?wsdl [ERROR] Schema descriptor {http://localhost/soap/}method1Request in message part "inputParam" is not defined and could not be bound to Java. Perhaps the schema descriptor {http://localhost/soap/}method1Request is not defined in the schema imported/included in the WSDL. You can either add such imports/includes or run wsimport and provide the schema location using -b switch. line 2 of http://localhost/soap/?wsdl

My test code, also available here if it is broken below.

<pre class="highlight">
require_once "Zend/Loader.php";

class MyClass {
     * This method takes ...
     * @param integer $inputParam
     * @return string
    public function method1($inputParam) {
        return rand(1,10);

if(isset($_GET['wsdl'])) {
    $autodiscover = new Zend_Soap_AutoDiscover();
                    array('style' => 'document',
                          'transport' => '<a href=""></a>')
                  array('use' => 'literal')

} else if (isset($_GET['client'])) {
    $client = new Zend_Soap_Client("http://localhost/soap/?wsdl");
    echo $client->method1(10);
} else {
    $soap = new Zend_Soap_Server("http://localhost/soap/?wsdl");


Posted by Benjamin Eberlei (beberlei) on 2009-05-30T15:50:28.000+0000

This is a duplicate.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.