Troubleshooting
Problem
When you use Java™ Architecture for XML Binding (JAXB) customization to customize a collection property such as the following:
[]
]
JAXB generates JavaBeans that satisfy the JAXB specification requirements for indexed properties. The JavaBeans contain getter and setter methods that return an internal implementation of an indexed array list. The following example demonstrates what a JAXB generated JavaBeans would look like when customized to an indexed array:
[]
public Items[] getReturn()
public void setReturn(Items[] values)
public Items setReturn(int idx, Items value)
public Items getReturn(int idx)
public int getReturnLength()
[
]
However, the collection property within the JavaBeans remains of the type java.lang.List. protected List]
public Items[] createAccount(
[
]
Instead, wsimport always generates a List, like in this example:
[]
public List
]
Cause
The problem is caused by the JAXB specification design for indexed properties.
Resolving The Problem
As long as the schema and the WSDL are the same on both the client and server, the XML types can be mapped to different Java objects on each side.
It is therefore safe if your pre-existing JavaBeans or SEIs contain an indexed array type on the server through the use of wsgen, and a java.lang.List type on the client side through the use of wsimport.
Related Information
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21264009