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 "Mike Moran (JIRA)" <ax...@ws.apache.org> on 2005/04/15 15:46:17 UTC

[jira] Created: (AXIS-1930) Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]

Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]
------------------------------------------------------------

         Key: AXIS-1930
         URL: http://issues.apache.org/jira/browse/AXIS-1930
     Project: Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.2RC3    
 Environment: Running on Windows XP Professional
Using Java 1.5.0_02, JWSDP 1.4, Axis 1.2RC3
    Reporter: Mike Moran
 Attachments: UnsignedByteExample.zip

A section from my original email to axis-user (http://marc.theaimsgroup.com/?l=axis-user&m=111349169401343&w=2)
can be seen below. I will attach a full example once this bug is created.

Email:

"I am currently moving over from a Java client api generated from WSDL using JAX-RPC 1.4 to instead use Axis 1.2-RC3. I have existing code which uses the JAX-RPC generated API so I was hoping that the JAX-RPC binding 'standard' would make this fairly easy i.e I could regenerate and compile against the same interface but with a different underlying implementation.

However, I am finding that 'xsd:unsignedByte' is being bound to 'org.apache.axis.types.UnsignedByte' as opposed to 'short'. This then leads to the arrays of this type also being unusable.

I notice that JAXB defaults 'xsd:unsignedByte' to be mapped to 'short'. Is it possible to get Axis to do the same? Is this a bug in Axis or a misunderstanding of a spec, or just a decision left open in a spec? Can I override Axis's choice of what to map to?

[ ... ]

FYO, an example of the input WSDL is:

<complexType name="Array4OfunsignedByte">
   <complexContent>
    <restriction base="SOAP-ENC:Array">
     <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="xsd:unsignedByte[]"/>
    </restriction>
   </complexContent>
  </complexType>

This is using rpc/encoded btw, if that matters. 
"

-- 
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-1930) Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]

Posted by "Mike Moran (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1930?page=comments#action_63150 ]
     
Mike Moran commented on AXIS-1930:
----------------------------------

FYI: I tried the typemapping=1.3 switch with the example code I submitted, and it fixes the bug.

Should this bug be turned into another documentation fix bug?

> Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]
> ------------------------------------------------------------
>
>          Key: AXIS-1930
>          URL: http://issues.apache.org/jira/browse/AXIS-1930
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: Running on Windows XP Professional
> Using Java 1.5.0_02, JWSDP 1.4, Axis 1.2RC3
>     Reporter: Mike Moran
>  Attachments: UnsignedByteExample.zip
>
> A section from my original email to axis-user (http://marc.theaimsgroup.com/?l=axis-user&m=111349169401343&w=2)
> can be seen below. I will attach a full example once this bug is created.
> Email:
> "I am currently moving over from a Java client api generated from WSDL using JAX-RPC 1.4 to instead use Axis 1.2-RC3. I have existing code which uses the JAX-RPC generated API so I was hoping that the JAX-RPC binding 'standard' would make this fairly easy i.e I could regenerate and compile against the same interface but with a different underlying implementation.
> However, I am finding that 'xsd:unsignedByte' is being bound to 'org.apache.axis.types.UnsignedByte' as opposed to 'short'. This then leads to the arrays of this type also being unusable.
> I notice that JAXB defaults 'xsd:unsignedByte' to be mapped to 'short'. Is it possible to get Axis to do the same? Is this a bug in Axis or a misunderstanding of a spec, or just a decision left open in a spec? Can I override Axis's choice of what to map to?
> [ ... ]
> FYO, an example of the input WSDL is:
> <complexType name="Array4OfunsignedByte">
>    <complexContent>
>     <restriction base="SOAP-ENC:Array">
>      <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="xsd:unsignedByte[]"/>
>     </restriction>
>    </complexContent>
>   </complexType>
> This is using rpc/encoded btw, if that matters. 
> "

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1930) Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]

Posted by "Mike Moran (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1930?page=comments#action_62900 ]
     
Mike Moran commented on AXIS-1930:
----------------------------------

In reply to Guillaume Sauthier:

[Btw, I presume you mean xsd:unsignedByte as well as xsd:unsignedShort? ]

I'll give this a try. Btw, the WSDL2Java command-line help does not mention '1.3' anywhere:

"
Usage:  java org.apache.axis.wsdl.WSDL2Java [options] WSDL-URI
Options:

[ ... ]
	-T, --typeMappingVersion <argument>
		indicate 1.1 or 1.2.  The default is 1.1 (SOAP 1.1 JAX-RPC c
		ompliant.  1.2 indicates SOAP 1.1 encoded.)
"

> Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]
> ------------------------------------------------------------
>
>          Key: AXIS-1930
>          URL: http://issues.apache.org/jira/browse/AXIS-1930
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: Running on Windows XP Professional
> Using Java 1.5.0_02, JWSDP 1.4, Axis 1.2RC3
>     Reporter: Mike Moran
>  Attachments: UnsignedByteExample.zip
>
> A section from my original email to axis-user (http://marc.theaimsgroup.com/?l=axis-user&m=111349169401343&w=2)
> can be seen below. I will attach a full example once this bug is created.
> Email:
> "I am currently moving over from a Java client api generated from WSDL using JAX-RPC 1.4 to instead use Axis 1.2-RC3. I have existing code which uses the JAX-RPC generated API so I was hoping that the JAX-RPC binding 'standard' would make this fairly easy i.e I could regenerate and compile against the same interface but with a different underlying implementation.
> However, I am finding that 'xsd:unsignedByte' is being bound to 'org.apache.axis.types.UnsignedByte' as opposed to 'short'. This then leads to the arrays of this type also being unusable.
> I notice that JAXB defaults 'xsd:unsignedByte' to be mapped to 'short'. Is it possible to get Axis to do the same? Is this a bug in Axis or a misunderstanding of a spec, or just a decision left open in a spec? Can I override Axis's choice of what to map to?
> [ ... ]
> FYO, an example of the input WSDL is:
> <complexType name="Array4OfunsignedByte">
>    <complexContent>
>     <restriction base="SOAP-ENC:Array">
>      <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="xsd:unsignedByte[]"/>
>     </restriction>
>    </complexContent>
>   </complexType>
> This is using rpc/encoded btw, if that matters. 
> "

-- 
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-1930) Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]

Posted by "Mike Moran (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1930?page=history ]

Mike Moran updated AXIS-1930:
-----------------------------

    Attachment: UnsignedByteExample.zip

This gives a minimal example comparing what JSWDP(JAX-RPC) generates against the Axis output. See
REAME.txt in the zip for more details. 

> Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]
> ------------------------------------------------------------
>
>          Key: AXIS-1930
>          URL: http://issues.apache.org/jira/browse/AXIS-1930
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: Running on Windows XP Professional
> Using Java 1.5.0_02, JWSDP 1.4, Axis 1.2RC3
>     Reporter: Mike Moran
>  Attachments: UnsignedByteExample.zip
>
> A section from my original email to axis-user (http://marc.theaimsgroup.com/?l=axis-user&m=111349169401343&w=2)
> can be seen below. I will attach a full example once this bug is created.
> Email:
> "I am currently moving over from a Java client api generated from WSDL using JAX-RPC 1.4 to instead use Axis 1.2-RC3. I have existing code which uses the JAX-RPC generated API so I was hoping that the JAX-RPC binding 'standard' would make this fairly easy i.e I could regenerate and compile against the same interface but with a different underlying implementation.
> However, I am finding that 'xsd:unsignedByte' is being bound to 'org.apache.axis.types.UnsignedByte' as opposed to 'short'. This then leads to the arrays of this type also being unusable.
> I notice that JAXB defaults 'xsd:unsignedByte' to be mapped to 'short'. Is it possible to get Axis to do the same? Is this a bug in Axis or a misunderstanding of a spec, or just a decision left open in a spec? Can I override Axis's choice of what to map to?
> [ ... ]
> FYO, an example of the input WSDL is:
> <complexType name="Array4OfunsignedByte">
>    <complexContent>
>     <restriction base="SOAP-ENC:Array">
>      <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="xsd:unsignedByte[]"/>
>     </restriction>
>    </complexContent>
>   </complexType>
> This is using rpc/encoded btw, if that matters. 
> "

-- 
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


Re: [jira] Resolved: (AXIS-1930) Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]

Posted by Davanum Srinivas <da...@gmail.com>.
please open another bug explicitly for doco.

thanks,
dims

On 4/30/05, Mike Moran <mi...@mac.com> wrote:
> 
> On 30 Apr 2005, at 05:34, Davanum Srinivas (JIRA) wrote:
> 
> >      [ http://issues.apache.org/jira/browse/AXIS-1930?page=all ]
> >
> > Davanum Srinivas resolved AXIS-1930:
> > ------------------------------------
> >
> >     Resolution: Invalid
> >
> > --typeMappingVersion 1.3 works.
> 
> Hi. I'm fine with this being closed, but should I open another to fix
> the documentation? Or, has the documentation been fixed?
> 
> --
> Mike http://www.houseofmoran.com/blog/
> 
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

Re: [jira] Resolved: (AXIS-1930) Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]

Posted by Mike Moran <mi...@mac.com>.
On 30 Apr 2005, at 05:34, Davanum Srinivas (JIRA) wrote:

>      [ http://issues.apache.org/jira/browse/AXIS-1930?page=all ]
>
> Davanum Srinivas resolved AXIS-1930:
> ------------------------------------
>
>     Resolution: Invalid
>
> --typeMappingVersion 1.3 works.

Hi. I'm fine with this being closed, but should I open another to fix 
the documentation? Or, has the documentation been fixed?

-- 
Mike http://www.houseofmoran.com/blog/


[jira] Resolved: (AXIS-1930) Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1930?page=all ]
     
Davanum Srinivas resolved AXIS-1930:
------------------------------------

    Resolution: Invalid

--typeMappingVersion 1.3 works.

> Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]
> ------------------------------------------------------------
>
>          Key: AXIS-1930
>          URL: http://issues.apache.org/jira/browse/AXIS-1930
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: Running on Windows XP Professional
> Using Java 1.5.0_02, JWSDP 1.4, Axis 1.2RC3
>     Reporter: Mike Moran
>  Attachments: UnsignedByteExample.zip
>
> A section from my original email to axis-user (http://marc.theaimsgroup.com/?l=axis-user&m=111349169401343&w=2)
> can be seen below. I will attach a full example once this bug is created.
> Email:
> "I am currently moving over from a Java client api generated from WSDL using JAX-RPC 1.4 to instead use Axis 1.2-RC3. I have existing code which uses the JAX-RPC generated API so I was hoping that the JAX-RPC binding 'standard' would make this fairly easy i.e I could regenerate and compile against the same interface but with a different underlying implementation.
> However, I am finding that 'xsd:unsignedByte' is being bound to 'org.apache.axis.types.UnsignedByte' as opposed to 'short'. This then leads to the arrays of this type also being unusable.
> I notice that JAXB defaults 'xsd:unsignedByte' to be mapped to 'short'. Is it possible to get Axis to do the same? Is this a bug in Axis or a misunderstanding of a spec, or just a decision left open in a spec? Can I override Axis's choice of what to map to?
> [ ... ]
> FYO, an example of the input WSDL is:
> <complexType name="Array4OfunsignedByte">
>    <complexContent>
>     <restriction base="SOAP-ENC:Array">
>      <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="xsd:unsignedByte[]"/>
>     </restriction>
>    </complexContent>
>   </complexType>
> This is using rpc/encoded btw, if that matters. 
> "

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1930) Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]

Posted by "Guillaume Sauthier (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1930?page=comments#action_62901 ]
     
Guillaume Sauthier commented on AXIS-1930:
------------------------------------------

Yes I mean unsignedByte :)

1.3 TypeMapping version is quite new (1.2 RC3), it is possible that the doc miss this option.

> Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]
> ------------------------------------------------------------
>
>          Key: AXIS-1930
>          URL: http://issues.apache.org/jira/browse/AXIS-1930
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: Running on Windows XP Professional
> Using Java 1.5.0_02, JWSDP 1.4, Axis 1.2RC3
>     Reporter: Mike Moran
>  Attachments: UnsignedByteExample.zip
>
> A section from my original email to axis-user (http://marc.theaimsgroup.com/?l=axis-user&m=111349169401343&w=2)
> can be seen below. I will attach a full example once this bug is created.
> Email:
> "I am currently moving over from a Java client api generated from WSDL using JAX-RPC 1.4 to instead use Axis 1.2-RC3. I have existing code which uses the JAX-RPC generated API so I was hoping that the JAX-RPC binding 'standard' would make this fairly easy i.e I could regenerate and compile against the same interface but with a different underlying implementation.
> However, I am finding that 'xsd:unsignedByte' is being bound to 'org.apache.axis.types.UnsignedByte' as opposed to 'short'. This then leads to the arrays of this type also being unusable.
> I notice that JAXB defaults 'xsd:unsignedByte' to be mapped to 'short'. Is it possible to get Axis to do the same? Is this a bug in Axis or a misunderstanding of a spec, or just a decision left open in a spec? Can I override Axis's choice of what to map to?
> [ ... ]
> FYO, an example of the input WSDL is:
> <complexType name="Array4OfunsignedByte">
>    <complexContent>
>     <restriction base="SOAP-ENC:Array">
>      <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="xsd:unsignedByte[]"/>
>     </restriction>
>    </complexContent>
>   </complexType>
> This is using rpc/encoded btw, if that matters. 
> "

-- 
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-1930) Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]

Posted by "Guillaume Sauthier (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1930?page=comments#action_62898 ]
     
Guillaume Sauthier commented on AXIS-1930:
------------------------------------------

By default, Axis don't use the JAX-RPC Mapping, so xsd:unsignedShort are mapped to internal Axis types.

To avoid this, you have to specify to the generation tool that you want a special Type Mapping version :
for WSDL2Java command line add "-T 1.3"

> Wanting xsd:unsignedByte[] as short[] and not UnsignedByte[]
> ------------------------------------------------------------
>
>          Key: AXIS-1930
>          URL: http://issues.apache.org/jira/browse/AXIS-1930
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: Running on Windows XP Professional
> Using Java 1.5.0_02, JWSDP 1.4, Axis 1.2RC3
>     Reporter: Mike Moran
>  Attachments: UnsignedByteExample.zip
>
> A section from my original email to axis-user (http://marc.theaimsgroup.com/?l=axis-user&m=111349169401343&w=2)
> can be seen below. I will attach a full example once this bug is created.
> Email:
> "I am currently moving over from a Java client api generated from WSDL using JAX-RPC 1.4 to instead use Axis 1.2-RC3. I have existing code which uses the JAX-RPC generated API so I was hoping that the JAX-RPC binding 'standard' would make this fairly easy i.e I could regenerate and compile against the same interface but with a different underlying implementation.
> However, I am finding that 'xsd:unsignedByte' is being bound to 'org.apache.axis.types.UnsignedByte' as opposed to 'short'. This then leads to the arrays of this type also being unusable.
> I notice that JAXB defaults 'xsd:unsignedByte' to be mapped to 'short'. Is it possible to get Axis to do the same? Is this a bug in Axis or a misunderstanding of a spec, or just a decision left open in a spec? Can I override Axis's choice of what to map to?
> [ ... ]
> FYO, an example of the input WSDL is:
> <complexType name="Array4OfunsignedByte">
>    <complexContent>
>     <restriction base="SOAP-ENC:Array">
>      <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="xsd:unsignedByte[]"/>
>     </restriction>
>    </complexContent>
>   </complexType>
> This is using rpc/encoded btw, if that matters. 
> "

-- 
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