aspose file tools*
The moose likes Web Services and the fly likes Unexpected subelement, Axis ADB Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Unexpected subelement, Axis ADB Error" Watch "Unexpected subelement, Axis ADB Error" New topic
Author

Unexpected subelement, Axis ADB Error

Chris Stabler
Greenhorn

Joined: Oct 22, 2009
Posts: 13
I have a problem with Axis 2 that I have been unable to resolve.

I am using Eclipse Galileo, Apache/Tomcat 6.0, Mac OSX 10.6.2, and deploying the web service as Axis 2.

Basically I have a java file with a simple set of functions that i want to make a web service out of.

I create a dynamic web project in eclipse, create a java package, then create the java class file. then i do Web Service->Create Web Service and select bottom down web service. Then i export the project out as a .WAR file.

I then move the WAR file into my webapps folder in my apache/tomcat directory and start up the server. I can access the wsdl in a brower(and i am able to look at the wsdl in XML format which is expected).

As a side note, when i try to run the non-web service functionality as a standalone everything works fine.

Anyway, i create a Web Service Client now based on the wsdl that is in the WAR file which creates for me a Server Stub. Then i create a java main class file.

//generic piece of code that i perform in main class.



all my types are complex types that i want to return, Arrays, etc etc.

anyway i get the following error:

Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement description
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at com.server.DssServerStub.fromOM(DssServerStub.java:46150)
at com.server.DssServerStub.getScenariosForEngine(DssServerStub.java:1843)
at com.client.Dss5Client.main(Dss5Client.java:75)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement description
at com.server.DssServerStub$InputParameter$Factory.parse(DssServerStub.java:36754)
at com.server.DssServerStub$ScenarioInfo$Factory.parse(DssServerStub.java:25014)
at com.server.DssServerStub$GetScenariosForEngineResponse$Factory.parse(DssServerStub.java:33687)
at com.server.DssServerStub.fromOM(DssServerStub.java:46039)
... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement description
at com.server.DssServerStub$InputParameter$Factory.parse(DssServerStub.java:36748)
... 5 more



I can post the WSDL XML output i suppose but wanted to get any idea of what causes this error. How can i not get any compile errors or run time errors and then somehow it doesnt know what an element is when i deploy the service? Is there something going on with Axis2 and ADB with Eclipse? I read people suggesting to use XMLBeans but i am unfamiliar with it. Let me know your thoughts and any help is appreciated. THANKS!
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
The request envelope which you are creating at run time is having some sub element which doesn't match with the wsdl schema. Post your wsdl and you request envelope for further help.


SCJP 1.5(97%) My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unexpected subelement, Axis ADB Error