I could need some help with SOAP/JAX-WS. I want to send a map-like structure. I wrote a XmlAdapter that converts it to a simple array. Java7 uses <entry/> for each element of the array. Java 6 uses <item/>. The elements of the array are of a class I wrote myself.
Using @XmlType(name = "xxx") on it does not change anything. It's still item/entry.
I also tried @XmlRootElement(name = "xxx") with no luck. Is there any other annotation to name array-elements? and where do I have to put it?! Or is this a setting of JAX-WS? if so: How can I change JAX-WS settings (client and server)?!
Is there some other thing I could use instead of array? I tried Lists and Maps with no luck.
Does anyone know a SOAP-Tutorial to connect to clients with old JRE?
I'm really lost here.
Server is JDK 1.7 u10, Clients use JRE 6/7.
How can I fix this? Why did this even change?!
PS: The Server creates a XSD that says to use <entry>. The XSD looks fine to me. If I only could change entry to item it would probably work for all versions.
<xs:complexType name="XXXXXXXXXXXXX" final="extension restriction">
<xs:element name="*entry*" minOccurs="0" maxOccurs="unbounded">
<xs:element name="key" minOccurs="0" type="xs:string"/>
<xs:element name="value" minOccurs="0" type="xs:anyType"/>
<xs:element name="size" type="xs:int"/>
Be aware that it is not really directly related to the JDK - it is related to the JAX-WS API and implementation being used. By default the JDK comes bundled with Metro (or at least the important bits of it), which is the reference implementation of JAX-WS. Java 7 will naturally have a newer version of the reference implementation (to match the new JAX-WS 2.2 API), so the difference will originate there.
My point there is that the project has some decent documentation you can check:
java.net projects are also tied to a jira issue tracker where you could register a new issue if you think you've found one. If you really can't find a solution or workaround you could try bundling an older JAX-WS 2.1 API and implementation with your application to see if that resolves the compatibility issue you're experiencing.