• Post Reply Bookmark Topic Watch Topic
  • New Topic

Polymorphism and SOAP Unmarshaling problem  RSS feed

 
Etienne Labuschagne
Greenhorn
Posts: 7
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class DoubleValue that inherits from BaseValue. I have a class Parameter that contains, amongst others, an attribute parameterValue of type BaseValue.

When I send a SOAP message containing a Parameter, and I put a DoubleValue into the parameterValue attribute, I get a SOAP snipped at the server side like this:


According to me, the xsi:type should be enough to notify the server side that this is indeed a "DoubleValue" and should be marshaled to DoubleValue and NOT the base class, BaseValue. Unfortunately, I get a BaseValue on the other side and not a DoubleValue.

I also get this problem the other way around, if the server sends me a DoubleValue.

Any pointers/ideas on what I might be doing wrong?

I have little control over the marshaller on the server side and am hoping to fix this, if at all possible using annotations and configuration only. My other choice is to get the SOAP XML message as it is, and unmarshal the whole thing myself (which I'm really loathe to do!).

Just as a further note, I annotated the BaseValue class as follows in order to "notify" it of it's child classes:


The definition of DoubleValue looks like follows in the xsd:


Note that DoubleValue inherits from NumberValue that inherits from BaseValue. It does not seem to make a difference if DoubleValue inherits directly from BaseValue fwiw.




 
Etienne Labuschagne
Greenhorn
Posts: 7
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A bit more info:

The endpoint I'm having a problem with is an ArcGIS Server Object Extension. The endpoint artifacts are created by the ArcGIS tooling provided for Eclipse. Re-creating a mock endpoint with the same signature and deploying in JBoss, I don't get the same problem. I am still using the same client wrappers in my JBoss test, so the problem seems not to be the client wrapper code, but maybe with the differing WSDL exposed by the ArcGIS endpoint.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!