This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
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
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement description
... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement description
... 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!