• Post Reply Bookmark Topic Watch Topic
  • New Topic

The class for the root element could not be found - using Castor/Axis  RSS feed

 
Chris Zeth
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Ok, here is the issue..

Basically when I call our SOAP web service, we get this message back (inside the SOAP fault envelope):



But all the mapping is actually correct as you can see on my setup below:

Castor mapping in the xml (Not Using Spring!)


Axis 1.x wsdd config xml


XSD Type Definitions




So, to summarize, basically I'm trying to user a Grandparent type (core request/response) to inherit a field to the Parent type (base request/response) which also inherits to the Child type (final request/response)

But Castor Deserializer is still unable to find it.

Any help/advice can be helpful.

Thanks and regards.
 
g tsuji
Ranch Hand
Posts: 697
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your mapping.xml is not shown in its complete form, so we cannot know what namespace(s) has been declared in the upper level. In any case, if I would guess that you should have just been carrying along the prefix "tns" from your schema or web service's target namespace; and that I would suspect it coincides with http://www.mycompany.com/MyService which in some other places "ac" is used as its prefix --- that is not a problem, you can do that if you really want to. If that is the case, you can do this, amid a bit clumsy : everywhere in your bind-xml with name="tns:xxx", you declare your tns with the mentioned uri or the exact namespace you have in mind. Like this.

Likewise for every other bind-xml with tns appeared in the name.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!