File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes org.xml.sax.SAXException: Unregistered type:  class java.lang.Object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "org.xml.sax.SAXException: Unregistered type:  class java.lang.Object" Watch "org.xml.sax.SAXException: Unregistered type:  class java.lang.Object" New topic
Author

org.xml.sax.SAXException: Unregistered type: class java.lang.Object

Nikes Shah
Ranch Hand

Joined: Jul 18, 2007
Posts: 133
Dear all,

I am have generated java classes from wsdl file and using stub classes to consume web services (Alfresco ECM system)

Java classes are generated using Eclipse IDE (Apache Axis).

I am able to consume some services but some services throws following exception:




Is there any issue with java stub classes generation using eclipse?

Which tool generates the most perfect client side java classes from wsdl file?

Thanks for any help.
Nikes Shah
Ranch Hand

Joined: Jul 18, 2007
Posts: 133
Please guide. I have searched a lot on internet but did not get any resolution.

Can some one tell whether I am missing in generating stubs or any deserialization needed?

Matt Middleton
Greenhorn

Joined: Feb 23, 2010
Posts: 7
It looks like you are using RPC instead of JAXB to convert from java objects to xml and back, are you just using a web service plugin for eclipse? You may have to update how you are generating the classes. In any event what's going on is that java and xml both have types and when you convert between java objects and xml (which it has to for these services) it has certain classes that map to certain xml types, and visa versa. It looks like whatever method you are using doesn't have a mapping for the Object class. I've never used the Eclipse plugin for generating the classes, but there are plenty of command line tools that you can use if you can't get the plugin figured out, I use wsconsume for the most part. Hope this helped!
Nikes Shah
Ranch Hand

Joined: Jul 18, 2007
Posts: 133
Thanks Matt.

I am using Eclipse Galileo version which comes with inbuilt Axis plugin "org.apache.axis_1.4.0.v200905122109".

I was looking at the stub generated classes from wsdl and it looks like that BeanDeserializer mapping is not generated.

In my client code I added BeanDeserializer mapping manually and I am getting the proper response.

So now I have to look for latest version of Axis plugin or I will go with Axis2 client so that stub calsses can take care of
serialization/deserialization.
Kevin Eddy
Ranch Hand

Joined: Feb 24, 2010
Posts: 74
Nikes Shah wrote:Thanks Matt.

I am using Eclipse Galileo version which comes with inbuilt Axis plugin "org.apache.axis_1.4.0.v200905122109".

I was looking at the stub generated classes from wsdl and it looks like that BeanDeserializer mapping is not generated.

In my client code I added BeanDeserializer mapping manually and I am getting the proper response.

So now I have to look for latest version of Axis plugin or I will go with Axis2 client so that stub calsses can take care of
serialization/deserialization.


I have a book, Developing Web Services with Apache Axis2, and on page 30 it says that v1.4 of the Code Generator Wizard plugin contains a critical bug and to use v1.3 instead.

I just switched to net beans once I read that. I used eclipse for a long time and liked it very much however.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.xml.sax.SAXException: Unregistered type: class java.lang.Object