[
https://issues.apache.org/jira/browse/AXIS-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vesa Luomala updated AXIS-2669:
-------------------------------
Description:
I have noticed the following problem:
If I return the same Object both in array and as single value list, or if I
have same dataobject, then the method which returns an array does not work from
client side but throws:
java.lang.ArrayStoreException: xx.yy.types.ProgramCard
org.apache.axis.utils.JavaUtils.convert(JavaUtils.java:493)
org.apache.axis.client.Call.invoke(Call.java:2537)
org.apache.axis.client.Call.invoke(Call.java:2366)
org.apache.axis.client.Call.invoke(Call.java:1812)
If I remove the method that returns one ProgramCard, then the array function
works fine. It seems to me, that server side confuses arrayelements and single
objects, if they occur in same webservice interface.
The code:
<server-side>
@WebMethod
public ProgramCard getProgramCardByProgramCardNumber(String cardNumber,
Identification callParams) throws java.rmi.RemoteException, NotFoundException,
FunctionalException, TechnicalException {
.....
AND
@WebMethod
public ProgramCard[] getActiveProgramCardsByCustomerId(String[] ids,
Identification callerId) throws java.rmi.RemoteException, NotFoundException,
FunctionalException, TechnicalException {
.....
</server>
when this is converted to WSDL and after that for clienside stubs, then single
element and arrayelements are actually different objects:
<client side stub interface>
public xx.yy.jaws.ProgramCard[] getActiveProgramCardsByCustomerId(...
AND
public com.teliasonera.paytv.ws.types.ProgramCard
getProgramCardByProgramCardNumber(....
</client side stub interface>
was:
I have noticed the following problem:
If I return the same Object both in array and as single value list, or if I
have same dataobject, then the method which returns an array does not work from
client side but throws:
java.lang.ArrayStoreException: xx.yy.types.ProgramCard
org.apache.axis.utils.JavaUtils.convert(JavaUtils.java:493)
org.apache.axis.client.Call.invoke(Call.java:2537)
org.apache.axis.client.Call.invoke(Call.java:2366)
org.apache.axis.client.Call.invoke(Call.java:1812)
How the case is build
> java.lang.ArrayStoreException if you have methods that return same object
> type in array and single type
> -------------------------------------------------------------------------------------------------------
>
> Key: AXIS-2669
> URL: https://issues.apache.org/jira/browse/AXIS-2669
> Project: Axis
> Issue Type: Bug
> Components: Basic Architecture
> Affects Versions: 1.4
> Environment: JBoss 4.0.5, JDK 1.5.0.11, XP
> Reporter: Vesa Luomala
>
> I have noticed the following problem:
> If I return the same Object both in array and as single value list, or if I
> have same dataobject, then the method which returns an array does not work
> from client side but throws:
> java.lang.ArrayStoreException: xx.yy.types.ProgramCard
> org.apache.axis.utils.JavaUtils.convert(JavaUtils.java:493)
> org.apache.axis.client.Call.invoke(Call.java:2537)
> org.apache.axis.client.Call.invoke(Call.java:2366)
> org.apache.axis.client.Call.invoke(Call.java:1812)
> If I remove the method that returns one ProgramCard, then the array function
> works fine. It seems to me, that server side confuses arrayelements and
> single objects, if they occur in same webservice interface.
> The code:
> <server-side>
> @WebMethod
> public ProgramCard getProgramCardByProgramCardNumber(String cardNumber,
> Identification callParams) throws java.rmi.RemoteException,
> NotFoundException, FunctionalException, TechnicalException {
> .....
> AND
> @WebMethod
> public ProgramCard[] getActiveProgramCardsByCustomerId(String[] ids,
> Identification callerId) throws java.rmi.RemoteException, NotFoundException,
> FunctionalException, TechnicalException {
> .....
> </server>
> when this is converted to WSDL and after that for clienside stubs, then
> single element and arrayelements are actually different objects:
> <client side stub interface>
> public xx.yy.jaws.ProgramCard[] getActiveProgramCardsByCustomerId(...
> AND
> public com.teliasonera.paytv.ws.types.ProgramCard
> getProgramCardByProgramCardNumber(....
> </client side stub interface>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]