You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Daniel David Schäfer (JIRA)" <ax...@ws.apache.org> on 2005/03/14 17:13:08 UTC
[jira] Created: (AXIS-1869) wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
------------------------------------------------------------------------------------
Key: AXIS-1869
URL: http://issues.apache.org/jira/browse/AXIS-1869
Project: Axis
Type: Bug
Components: WSDL processing
Versions: 1.2RC3
Environment: all environments
Reporter: Daniel David Schäfer
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)
{
System.out.println("we do not use " +
elemType.getRefType().getQName() + " we prefer " +
elemType.getQName());
break;
}
elemType = elemType.getRefType();
}
xmlType = elemType.getQName();
This helped me to prefer my own xml-types and not to use xsd:string.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1869) wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
Posted by "Daniel David Schäfer (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1869?page=comments#action_61111 ]
Daniel David Schäfer commented on AXIS-1869:
--------------------------------------------
Hi,
this example shows one datatype of my wsdl:
<simpleType name="ProductCode">
<restriction base="xsd:string">
<maxLength value="5"/>
</restriction>
</simpleType>
The old axis made a Class called ProductCode with one member "value" an it´s getter and setter.
My methods worked like this:
getProductDetails(new ProductCode("XVVE-10"));
The new version (1.2RC3) does not generate these classes.
WSDL2Java generates methods like:
getProductDetails("XVVE-10");
That´s ok. But what was´nt ok is that axis used xsd:string instead of myns:ProductCode.
Here is the little patch I have provided.
bye
Daniel
===================================================================
RCS file: /usr/local/cvsroot/dev_projects/axis12/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dev_projects/axis12/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java 2005/03/14 12:59:38 1.1
+++ dev_projects/axis12/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java 2005/03/14 13:00:11 1.2
@@ -338,7 +338,19 @@
// Otherwise, use the type at the end of the ref
// chain.
- while (elemType.getRefType() != null) {
+ 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)
+ {
+ System.out.println("INFO: Hier nutzen wir nicht " +
+ elemType.getRefType().getQName() + ", sondern " +
+ elemType.getQName());
+
+ break;
+ }
+
elemType = elemType.getRefType();
}
> wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
> ------------------------------------------------------------------------------------
>
> Key: AXIS-1869
> URL: http://issues.apache.org/jira/browse/AXIS-1869
> Project: Axis
> Type: Bug
> Components: WSDL processing
> Versions: 1.2RC3
> Environment: all environments
> Reporter: Daniel David Schäfer
>
> 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)
> {
> System.out.println("we do not use " +
> elemType.getRefType().getQName() + " we prefer " +
> elemType.getQName());
> break;
> }
>
> elemType = elemType.getRefType();
> }
> xmlType = elemType.getQName();
> This helped me to prefer my own xml-types and not to use xsd:string.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1869) wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1869?page=comments#action_60885 ]
Davanum Srinivas commented on AXIS-1869:
----------------------------------------
Can you please submit your WSDL to make it more clear? and would appreciate a "diff -u" against latest CVS or RC3.
thanks,
dims
> wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
> ------------------------------------------------------------------------------------
>
> Key: AXIS-1869
> URL: http://issues.apache.org/jira/browse/AXIS-1869
> Project: Axis
> Type: Bug
> Components: WSDL processing
> Versions: 1.2RC3
> Environment: all environments
> Reporter: Daniel David Schäfer
>
> 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)
> {
> System.out.println("we do not use " +
> elemType.getRefType().getQName() + " we prefer " +
> elemType.getQName());
> break;
> }
>
> elemType = elemType.getRefType();
> }
> xmlType = elemType.getQName();
> This helped me to prefer my own xml-types and not to use xsd:string.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Updated: (AXIS-1869) wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1869?page=history ]
Davanum Srinivas updated AXIS-1869:
-----------------------------------
Priority: Blocker (was: Major)
blocker??
> wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
> ------------------------------------------------------------------------------------
>
> Key: AXIS-1869
> URL: http://issues.apache.org/jira/browse/AXIS-1869
> Project: Axis
> Type: Bug
> Components: WSDL processing
> Versions: 1.2RC3
> Environment: all environments
> Reporter: Daniel David Schäfer
> Priority: Blocker
>
> 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)
> {
> System.out.println("we do not use " +
> elemType.getRefType().getQName() + " we prefer " +
> elemType.getQName());
> break;
> }
>
> elemType = elemType.getRefType();
> }
> xmlType = elemType.getQName();
> This helped me to prefer my own xml-types and not to use xsd:string.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Resolved: (AXIS-1869) wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
Posted by "Glen Daniels (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1869?page=history ]
Glen Daniels resolved AXIS-1869:
--------------------------------
Resolution: Fixed
Fix Version: 1.2
This should be fixed now, although it might be nice to have a test case as well.... (if you feel like submitting one please feel free!)
> wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
> ------------------------------------------------------------------------------------
>
> Key: AXIS-1869
> URL: http://issues.apache.org/jira/browse/AXIS-1869
> Project: Axis
> Type: Bug
> Components: WSDL processing
> Versions: 1.2RC3
> Environment: all environments
> Reporter: Daniel David Schäfer
> Priority: Blocker
> Fix For: 1.2
>
> 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)
> {
> System.out.println("we do not use " +
> elemType.getRefType().getQName() + " we prefer " +
> elemType.getQName());
> break;
> }
>
> elemType = elemType.getRefType();
> }
> xmlType = elemType.getQName();
> This helped me to prefer my own xml-types and not to use xsd:string.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1869) wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
Posted by "Daniel David Schäfer (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1869?page=comments#action_61122 ]
Daniel David Schäfer commented on AXIS-1869:
--------------------------------------------
oh, sorry, I´m a newbie to this frontend.
can I change the priority?
> wsdl2java emits code that uses the wrong xml-types in case of declared simpleTypes´s
> ------------------------------------------------------------------------------------
>
> Key: AXIS-1869
> URL: http://issues.apache.org/jira/browse/AXIS-1869
> Project: Axis
> Type: Bug
> Components: WSDL processing
> Versions: 1.2RC3
> Environment: all environments
> Reporter: Daniel David Schäfer
> Priority: Blocker
>
> 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)
> {
> System.out.println("we do not use " +
> elemType.getRefType().getQName() + " we prefer " +
> elemType.getQName());
> break;
> }
>
> elemType = elemType.getRefType();
> }
> xmlType = elemType.getQName();
> This helped me to prefer my own xml-types and not to use xsd:string.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira