You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Spiros Vazaloukas <sp...@nec-is.com> on 2007/02/23 16:00:33 UTC

Axis2 : Unexpected subelement ........

Hello,

 

My Axis2 client runs in an applet and I hit the following error:

 

org.apache.axis2.AxisFault: java.lang.RuntimeException: Unexpected
subelement userId

            at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:271)

            at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:202)

            at
ordermng.clients.OrderMngServiceStub.getModelsData(OrderMngServiceStub.j
ava:255)

            at
com.necis.aisin.stockagingmng.client.OrderMngClientApplet.getRemoteData(
OrderMngClientApplet.java:537)

            at
com.necis.aisin.stockagingmng.client.OrderMngClientApplet.<init>(OrderMn
gClientApplet.java:63)

            at
com.necis.aisin.stockagingmng.client.OrderMngClientApplet.main(OrderMngC
lientApplet.java:631)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)

            at java.lang.reflect.Method.invoke(Unknown Source)

            at com.sun.javaws.Launcher.executeApplication(Unknown
Source)

            at com.sun.javaws.Launcher.executeMainClass(Unknown Source)

            at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)

            at com.sun.javaws.Launcher.run(Unknown Source)

            at java.lang.Thread.run(Unknown Source)

 

Any idea what could be wrong? 

 

Here is the client code that fails:

 

try{

                        String host =
"http://192.168.1.51:8080/axis2/services/StockAgingService";

                        

                        System.out.println("Host: " + host);

                        OrderMngServiceStub stub = new
OrderMngServiceStub(host);

                        

                        OrderMngServiceStub.GetModelsData req = new
OrderMngServiceStub.GetModelsData();

                        req.setUserId(userId);  // this is 'int'

                        

                        

                        OrderMngServiceStub.GetModelsDataResponse res =
stub.getModelsData(req); <------ THAT FAILS

                        

                        Object msg[]  = res.getReturnData();

                        System.out.println("Reply (axis2): " + msg);

                        

                        return msg;

                        

            } catch(Exception e){

                        e.printStackTrace();

                        System.err.println("\n\n\n");

            }

 

Runs on Tomcat 5 / JDK 1.6 

 

 

Regards,

Spiros

 


Re: Axis2 : Unexpected subelement ........

Posted by Amila Suriarachchi <am...@gmail.com>.
this is a common question every one asks.
please follow this mailing thread
http://marc.theaimsgroup.com/?l=axis-user&m=117209253914286&w=2
here ajith have clearly explained how to debug and the problem for the
issue. I think this is your case as well.
if not please send us your wsdl and the response message.

-- 
Amila Suriarachchi,
WSO2 Inc.