I JUST had this happen to me 2 days ago.

It turned out that in my case, the namespace for the unexpected
element was the problem.

I ended up running the service in a debugger and IIRC, I found it in
the fromOM method of the service's MessageReceiverInOut class. It was
calling something like this:

parse(param.getXMLStreamReaderWithoutCaching())

Once I found the mismatched namespaces, I was able to fix my wsdl so
they matched - unfortunately it was really late at night and I don't
remember more details than that. Sorry. :(

Larry


On Thu, Jul 23, 2009 at 4:44 AM, Nora Serinek<nseri...@berlin-sws.de> wrote:
> Hi,
>
> I am getting mad.
>
> We have a method like this in our webservice class MCSLoginService:
>
> public class MCSLoginService {
>     public ErrorCode login(String username, String password, String
> language) {..}
> }
>
> In the services.xml the service is defined as following:
>
> <service name="MCSLoginService" scope="transportsession"
> useOriginalwsdl="false" targetNamespace="http://mcs.ws.ibet.com";>
>   <description>MCSLoginService</description>
>   <parameter
> name="ServiceClass">com.ibet.ws.mcs.server.axis2.MCSLoginService</parameter>
>   <schema namespace="http://mcs.ws.ibet.com";>
>     <mapping namespace="http://server.mcs.ws.ibet.com";
> package="com.ibet.ws.mcs.server.axis2"/>
>     <mapping namespace="http://share.b2b.ws.ibet.com";
> package="com.ibet.ws.b2b.share"/>
>   </schema>
>   <messageReceivers>
>     <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out";
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>   </messageReceivers>
> </service>
>
> If setting the parameter useOriginalwsdl="false" the attached WSDL is
> generated.
>
> This works fine and results in the following SOAP for the login-method:
>
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
>   <soapenv:Body>
>     <ns2:login xmlns:ns2="http://axis2.server.mcs.ws.ibet.com";>
>       <ns2:username>admin</ns2:username>
>       <ns2:password>111</ns2:password>
>       <ns2:language>de</ns2:language>
>     </ns2:login>
>   </soapenv:Body>
> </soapenv:Envelope>
>
>
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
>   <soapenv:Body>
>     <ns:loginResponse xmlns:ns="http://axis2.server.mcs.ws.ibet.com";>
>       <ns:return xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:nil="true" />
>     </ns:loginResponse>
>   </soapenv:Body>
> </soapenv:Envelope>
>
> Because we are planning to modify the WSDL, we downloaded that WSDL and
> switched useOriginalwsdl to "true" and then something is going completely
> wrong although we didn't change anything in the WSDL.
>
> The login-method obviuosly doesn't get the values for the input parameters
> and therefore sends back an error code which in turn cannot be read by the
> client we generated from the WSDL.
> The client shows the following error message:
>
> ADBException: Unexpected subelement displayable
>
> Good old acquaintance, right?
>
> Here is the SOAP that is generated in that case:
>
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
>   <soapenv:Body>
>     <ns2:login xmlns:ns2="http://axis2.server.mcs.ws.ibet.com";>
>       <ns2:username>admin</ns2:username>
>       <ns2:password>111</ns2:password>
>       <ns2:language>de</ns2:language>
>     </ns2:login>
>   </soapenv:Body>
> </soapenv:Envelope>
>
>
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
>   <soapenv:Body>
>     <ns:loginResponse xmlns:ns="http://axis2.server.mcs.ws.ibet.com";>
>       <ns:return>
>         <ns:displayable>false</ns:displayable>
>         <ns:errorCode>MCS-6</ns:errorCode>
>         <ns:language>en</ns:language>
>         <ns:message>Language null is not supported</ns:message>
>       </ns:return>
>     </ns:loginResponse>
>   </soapenv:Body>
> </soapenv:Envelope>
>
> We are desperate, all other threads for ADBException: Unexpected subelement
> didn't help.
>
> Regards,
> Nora
>
>
> ###########################################
> This e-mail and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this e-mail in error please notify
> the system manager.
>

Reply via email to