• Post Reply Bookmark Topic Watch Topic
  • New Topic

No deserializer for {http://www.w3.org/2001/XMLSchema}anyType  RSS feed

 
Marek Czaplicki
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good morning all,
I have a problem with my SOAP service. First of all let me introduce some of the information.
Here is part of the schema used to validate incoming request:

Using IntelliJ IDEA (in detail I believe JAXB) I have created Java code for above schema.


And

I am sending valid XML request

And I am receiving back NullPointerException, which is an error of Axis library, because by debugging I have found that real error should be "No Deserializer for PassengerDetails".
I have started to debug every getDeserializer-like method in Axis and I have found that this part of code in library cannot find a deserializer between java List and xml Array:

So I have manually changed from List to Array in Java code:

to

Now it does seem to find a Deserializer (ArrayDeserializer), but now it throws this error:

Now I can send a request like this:

And the response is OK, but I think that inside there is something wrong, as array is empty, and I believe it should has one element with no fields in it.
I can either send a request like this and the situation is the same as above:

So my questions are:
1. Why JAXB is not creating at first an array? Maybe List was ok, and the problem is some where else.
2. How to get it working?

PS. The structure of insides of PassengerDetails are 100% valid.
 
Rob Spoor
Sheriff
Posts: 21050
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Marek Czaplicki wrote:I am sending valid XML request

Apart from a possible incompatibility issue with AGE_Type vs Integer, I see one other issue: the XML elements you use in your example use a different case from the elements defined in your schema and Java classes:
Marek Czaplicki wrote:

And

After all, both Java and XML are case sensitive, so the seatPosition in your XML does not match the SeatPosition in your schema or JAXB code.
 
Marek Czaplicki
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob Spoor,

Thanks for the answer. I have crosschecked what you said, changed in every possible place to lower-case names, but unfortunately the error is still the same.
BTW. This is not the only place where there are differences with case, almost every name in XmlType annotation and XmlElement annotation is different and it works for other fields.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!