ZF-5072: Java cannot handle <part name="getStaticStringReturn" type="xsd:string" />


I created a soap service with Zend_Soap_Server and Zend_Soap_AutoDiscover to provide my functionality to non-php-applications. We couldn´t get it working for Java so we searched for the problem and created the same service in java and created a wsdl definition from this java service. We compared both wsdl definitions and changed all differences in wsdl definition created by Zend_Soap_AutoDiscover until we found the problem.

Java seems to cannot handle this:

So we changed it to: 

After we´ve changed it we could consume my soap service without any problems. Don´t know why java has problems with "getStaticStringReturn". We found many different name-attribute values and no definition that it must be "return". We also tested the modified wsdl definition with Zend_Soap_Client and it works fine.


Added diff to solve problem.

What do you mean by "java seems to cannot handle this". Which particular WSDL to Java Generators did you test?

We created java classes with wsimport (…) from our wsdl definition what was created by Zend_Soap_AutoDiscover. After we could not consume data with the created java classes (we were clueless why at this moment), we setup the same soap service in java and created a wsdl definition by jax-ws. After that we compared both wsdl definitions and the main difference between these both definitions was the change I mentioned above.

Implemented a new function setResponseMessageReturnNameCompability, which calls all return message parts "return" when set to true.

This "hackish" implementation is needed for backwards compability reasons, since we cannot prove that it still works for all other cases. This is madness sadly, but steems from the problematic AutoDiscover implementation in the first place.

Implemented a simpler bugfix that acknoweldges that "return" is the SOAP/WSDL Standard, whereas other naming schemas are to be handled as "bug".