Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
1.2RC3
-
None
-
all environments
Description
I got a wsdl that uses several special data-types that are
actually strings with a restriction of e.g. 50 charcters length.
In earlier versions of axis, wsdl2java generated holder-classes for
these types but now the signature has changed and I get code without
these holders. I appreciate this, because it makes much of the
generated code easier to understand.
However the generated stubs do not use the correct xml-types that
were defined in the wsdl.
I changed some code in
org.apache.axis.wsdl.toJava.JavaBeanHelperWriter
The loop below should stop before it gets to the element that
represents the wrong type:
// Otherwise, use the type at the end of the ref
// chain.
while(elemType.getRefType() != null)
{
if(!elemType.getQName().getNamespaceURI().equals(
"http://www.w3.org/2001/XMLSchema") &&
elemType.getRefType().getQName().getNamespaceURI().equals(
"http://www.w3.org/2001/XMLSchema") &&
elemType.getRefType().getRefType() == null)
elemType = elemType.getRefType();
}
xmlType = elemType.getQName();
This helped me to prefer my own xml-types and not to use xsd:string.