You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Janne Rantala <ja...@gmail.com> on 2008/09/22 09:46:19 UTC

ArrayOf -problem

Hi,

I'm having trouble with ws-client which was originally created and used with
Axis1. Now I'm forced to upgrade to Axis2 but this has not gone as I have
hoped. I've tried creating stub classes with xmlbeans -option. One of the
methods is supposed to to transfer an array of Product-objects, but xmlbeans
option only creates object with name ArrayOfTns4Product classes.

How am I able to generate classes the way they were created with Axis1?

Best regards,

Janne

Re: ArrayOf -problem

Posted by Nan Null <nu...@gmail.com>.
I also experienced a problem with passing an array of strings into a
method as a parameter.
This happens with Axis1 and Axis2.  I would wrap the inside a class.
However, this code comes from WSDL, and if WSDL supports it, it should
work.
This bug needs fixed.  If further information is needed, I'll be glad
to provide it.

On Mon, Sep 29, 2008 at 4:01 AM, Janne Rantala <ja...@gmail.com> wrote:
> Hi Keith,
>
> And thanks for your reply. It doesn't matter which type I use, both adb and
> xmlbeans give me the same result. I'm sure there is a way to generate proper
> classes with both of these types but just can't find it.....
>
> Regards,
>
> Janne
>
> 2008/9/26 keith chapman <ke...@gmail.com>
>>
>> Hi Jaane,
>>
>> Is there any particular reason you tried to generate the code using
>> xmlbeans? ADB which is the default databinding in Axis2 gives you much
>> better performance than xmlbeans.
>>
>> Thanks,
>> Keith.
>>
>> On Mon, Sep 22, 2008 at 1:16 PM, Janne Rantala <ja...@gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> I'm having trouble with ws-client which was originally created and used
>>> with Axis1. Now I'm forced to upgrade to Axis2 but this has not gone as I
>>> have hoped. I've tried creating stub classes with xmlbeans -option. One of
>>> the methods is supposed to to transfer an array of Product-objects, but
>>> xmlbeans option only creates object with name ArrayOfTns4Product classes.
>>>
>>> How am I able to generate classes the way they were created with Axis1?
>>>
>>> Best regards,
>>>
>>> Janne
>>
>>
>>
>> --
>> Keith Chapman
>> Senior Software Engineer
>> WSO2 Inc.
>> Oxygenating the Web Service Platform.
>> http://wso2.org/
>>
>> blog: http://www.keith-chapman.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: ArrayOf -problem

Posted by Janne Rantala <ja...@gmail.com>.
Hi Keith,

And thanks for your reply. It doesn't matter which type I use, both adb and
xmlbeans give me the same result. I'm sure there is a way to generate proper
classes with both of these types but just can't find it.....

Regards,

Janne

2008/9/26 keith chapman <ke...@gmail.com>

> Hi Jaane,
>
> Is there any particular reason you tried to generate the code using
> xmlbeans? ADB which is the default databinding in Axis2 gives you much
> better performance than xmlbeans.
>
> Thanks,
> Keith.
>
>
> On Mon, Sep 22, 2008 at 1:16 PM, Janne Rantala <ja...@gmail.com>wrote:
>
>> Hi,
>>
>> I'm having trouble with ws-client which was originally created and used
>> with Axis1. Now I'm forced to upgrade to Axis2 but this has not gone as I
>> have hoped. I've tried creating stub classes with xmlbeans -option. One of
>> the methods is supposed to to transfer an array of Product-objects, but
>> xmlbeans option only creates object with name ArrayOfTns4Product classes.
>>
>> How am I able to generate classes the way they were created with Axis1?
>>
>> Best regards,
>>
>> Janne
>>
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>

Re: ArrayOf -problem

Posted by keith chapman <ke...@gmail.com>.
Hi Jaane,

Is there any particular reason you tried to generate the code using
xmlbeans? ADB which is the default databinding in Axis2 gives you much
better performance than xmlbeans.

Thanks,
Keith.

On Mon, Sep 22, 2008 at 1:16 PM, Janne Rantala <ja...@gmail.com>wrote:

> Hi,
>
> I'm having trouble with ws-client which was originally created and used
> with Axis1. Now I'm forced to upgrade to Axis2 but this has not gone as I
> have hoped. I've tried creating stub classes with xmlbeans -option. One of
> the methods is supposed to to transfer an array of Product-objects, but
> xmlbeans option only creates object with name ArrayOfTns4Product classes.
>
> How am I able to generate classes the way they were created with Axis1?
>
> Best regards,
>
> Janne
>



-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Re: ArrayOf -problem

Posted by Janne Rantala <ja...@gmail.com>.
Hi Keith,

That helps a lot, thanks. Do you think that it is possible just to change
soap encoding to something that Axis2 supports?

Regards,

Janne

2008/10/2 keith chapman <ke...@gmail.com>

> Oh Looks like you are using soap encoding. Axis2 does not support RPC
> encoded style. This could be the root cause of your issue.
>
> Thanks,
> Keith.
>
> On Tue, Sep 23, 2008 at 2:06 PM, Janne Rantala <ja...@gmail.com>wrote:
>
>> Hi,
>>
>> This part is the one which causes problems:
>>
>>  <complexType name="ArrayOf_tns4_Product">
>>  <complexContent>
>>  <restriction base="soapenc:Array">
>>   <attribute ref="soapenc:arrayType" wsdl:arrayType="tns4:Product[]" />
>>   </restriction>
>>   </complexContent>
>>   </complexType>
>>   </schema>
>>   </wsdl:types>
>>  <wsdl:message name="submitTopSellerProductsByCustomerRequest">
>>   <wsdl:part name="header" type="tns1:Header" />
>>   <wsdl:part name="customer" type="tns2:Customer" />
>>   <wsdl:part name="products" type="impl:ArrayOf_tns4_Product" />
>>   </wsdl:message>
>>
>> Axis2 creates stub class called ArrayOfTns4Product and method which only
>> accepts that object.
>>
>> Whole WSDL is also attached.
>>
>> Best Regards,
>>
>> Janne
>>
>>
>>
>> 2008/9/22 Martin Gainty <mg...@hotmail.com>
>>
>>  in your <xsd:schema>
>>> you can create a complexType element with maxOccurs attribute
>>> e.g.
>>> <xsd:complexType name="*AttachmentType*">
>>>  - <#11cbc239cf639fa6_11c8e5b002d6d709_11c8b0c07d704a82_> <xsd:sequence>
>>>    <xsd:element minOccurs="*0*" name="*fileName*" type="*xsd:string*" />
>>>    <xsd:element maxOccurs="*1*" minOccurs="*1*" name="*binaryData*"nillable
>>> ="*true*" type="*xmime:base64Binary*" xmime:expectedContentTypes="*
>>> application/octet-stream*" xmlns:xmime="*
>>> http://www.w3.org/2005/05/xmlmime*" />
>>>    </xsd:sequence>
>>>   </xsd:complexType>
>>>
>>> (for a more comprehensive example please provide wsdl)
>>>
>>> Martin
>>> ______________________________________________
>>> Disclaimer and confidentiality note
>>> Everything in this e-mail and any attachments relates to the official
>>> business of Sender. This transmission is of a confidential nature and Sender
>>> does not endorse distribution to any party other than intended recipient.
>>> Sender does not necessarily endorse content contained within this
>>> transmission.
>>>
>>>
>>> ------------------------------
>>> Date: Mon, 22 Sep 2008 10:46:19 +0300
>>> From: janne.rantala@gmail.com
>>> To: axis-user@ws.apache.org
>>> Subject: ArrayOf -problem
>>>
>>>
>>> Hi,
>>>
>>> I'm having trouble with ws-client which was originally created and used
>>> with Axis1. Now I'm forced to upgrade to Axis2 but this has not gone as I
>>> have hoped. I've tried creating stub classes with xmlbeans -option. One of
>>> the methods is supposed to to transfer an array of Product-objects, but
>>> xmlbeans option only creates object with name ArrayOfTns4Product classes.
>>>
>>> How am I able to generate classes the way they were created with Axis1?
>>>
>>> Best regards,
>>>
>>> Janne
>>>
>>> ------------------------------
>>> Stay up to date on your PC, the Web, and your mobile phone with Windows
>>> Live. See Now<http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>

Re: ArrayOf -problem

Posted by keith chapman <ke...@gmail.com>.
Oh Looks like you are using soap encoding. Axis2 does not support RPC
encoded style. This could be the root cause of your issue.

Thanks,
Keith.

On Tue, Sep 23, 2008 at 2:06 PM, Janne Rantala <ja...@gmail.com>wrote:

> Hi,
>
> This part is the one which causes problems:
>
>  <complexType name="ArrayOf_tns4_Product">
>  <complexContent>
>  <restriction base="soapenc:Array">
>   <attribute ref="soapenc:arrayType" wsdl:arrayType="tns4:Product[]" />
>   </restriction>
>   </complexContent>
>   </complexType>
>   </schema>
>   </wsdl:types>
>  <wsdl:message name="submitTopSellerProductsByCustomerRequest">
>   <wsdl:part name="header" type="tns1:Header" />
>   <wsdl:part name="customer" type="tns2:Customer" />
>   <wsdl:part name="products" type="impl:ArrayOf_tns4_Product" />
>   </wsdl:message>
>
> Axis2 creates stub class called ArrayOfTns4Product and method which only
> accepts that object.
>
> Whole WSDL is also attached.
>
> Best Regards,
>
> Janne
>
>
>
> 2008/9/22 Martin Gainty <mg...@hotmail.com>
>
>  in your <xsd:schema>
>> you can create a complexType element with maxOccurs attribute
>> e.g.
>> <xsd:complexType name="*AttachmentType*">
>>  - <#11c8e5b002d6d709_11c8b0c07d704a82_> <xsd:sequence>
>>    <xsd:element minOccurs="*0*" name="*fileName*" type="*xsd:string*" />
>>    <xsd:element maxOccurs="*1*" minOccurs="*1*" name="*binaryData*"nillable
>> ="*true*" type="*xmime:base64Binary*" xmime:expectedContentTypes="*
>> application/octet-stream*" xmlns:xmime="*
>> http://www.w3.org/2005/05/xmlmime*" />
>>    </xsd:sequence>
>>   </xsd:complexType>
>>
>> (for a more comprehensive example please provide wsdl)
>>
>> Martin
>> ______________________________________________
>> Disclaimer and confidentiality note
>> Everything in this e-mail and any attachments relates to the official
>> business of Sender. This transmission is of a confidential nature and Sender
>> does not endorse distribution to any party other than intended recipient.
>> Sender does not necessarily endorse content contained within this
>> transmission.
>>
>>
>> ------------------------------
>> Date: Mon, 22 Sep 2008 10:46:19 +0300
>> From: janne.rantala@gmail.com
>> To: axis-user@ws.apache.org
>> Subject: ArrayOf -problem
>>
>>
>> Hi,
>>
>> I'm having trouble with ws-client which was originally created and used
>> with Axis1. Now I'm forced to upgrade to Axis2 but this has not gone as I
>> have hoped. I've tried creating stub classes with xmlbeans -option. One of
>> the methods is supposed to to transfer an array of Product-objects, but
>> xmlbeans option only creates object with name ArrayOfTns4Product classes.
>>
>> How am I able to generate classes the way they were created with Axis1?
>>
>> Best regards,
>>
>> Janne
>>
>> ------------------------------
>> Stay up to date on your PC, the Web, and your mobile phone with Windows
>> Live. See Now<http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>



-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Re: ArrayOf -problem

Posted by Janne Rantala <ja...@gmail.com>.
Can anyone help me with this?

Janne

2008/9/23 Janne Rantala <ja...@gmail.com>

> Hi,
>
> This part is the one which causes problems:
>
>  <complexType name="ArrayOf_tns4_Product">
>  <complexContent>
>  <restriction base="soapenc:Array">
>   <attribute ref="soapenc:arrayType" wsdl:arrayType="tns4:Product[]" />
>   </restriction>
>   </complexContent>
>   </complexType>
>   </schema>
>   </wsdl:types>
>  <wsdl:message name="submitTopSellerProductsByCustomerRequest">
>   <wsdl:part name="header" type="tns1:Header" />
>   <wsdl:part name="customer" type="tns2:Customer" />
>   <wsdl:part name="products" type="impl:ArrayOf_tns4_Product" />
>   </wsdl:message>
>
> Axis2 creates stub class called ArrayOfTns4Product and method which only
> accepts that object.
>
> Whole WSDL is also attached.
>
> Best Regards,
>
> Janne
>
>
>
> 2008/9/22 Martin Gainty <mg...@hotmail.com>
>
>  in your <xsd:schema>
>> you can create a complexType element with maxOccurs attribute
>> e.g.
>> <xsd:complexType name="*AttachmentType*">
>>  - <#11c8e5a33bcad710_11c8b0c07d704a82_> <xsd:sequence>
>>    <xsd:element minOccurs="*0*" name="*fileName*" type="*xsd:string*" />
>>    <xsd:element maxOccurs="*1*" minOccurs="*1*" name="*binaryData*"nillable
>> ="*true*" type="*xmime:base64Binary*" xmime:expectedContentTypes="*
>> application/octet-stream*" xmlns:xmime="*
>> http://www.w3.org/2005/05/xmlmime*" />
>>    </xsd:sequence>
>>   </xsd:complexType>
>>
>> (for a more comprehensive example please provide wsdl)
>>
>> Martin
>> ______________________________________________
>> Disclaimer and confidentiality note
>> Everything in this e-mail and any attachments relates to the official
>> business of Sender. This transmission is of a confidential nature and Sender
>> does not endorse distribution to any party other than intended recipient.
>> Sender does not necessarily endorse content contained within this
>> transmission.
>>
>>
>> ------------------------------
>> Date: Mon, 22 Sep 2008 10:46:19 +0300
>> From: janne.rantala@gmail.com
>> To: axis-user@ws.apache.org
>> Subject: ArrayOf -problem
>>
>>
>> Hi,
>>
>> I'm having trouble with ws-client which was originally created and used
>> with Axis1. Now I'm forced to upgrade to Axis2 but this has not gone as I
>> have hoped. I've tried creating stub classes with xmlbeans -option. One of
>> the methods is supposed to to transfer an array of Product-objects, but
>> xmlbeans option only creates object with name ArrayOfTns4Product classes.
>>
>> How am I able to generate classes the way they were created with Axis1?
>>
>> Best regards,
>>
>> Janne
>>
>> ------------------------------
>> Stay up to date on your PC, the Web, and your mobile phone with Windows
>> Live. See Now<http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/>
>>
>
>

Re: ArrayOf -problem

Posted by Janne Rantala <ja...@gmail.com>.
Hi,

This part is the one which causes problems:

 <complexType name="ArrayOf_tns4_Product">
 <complexContent>
 <restriction base="soapenc:Array">
  <attribute ref="soapenc:arrayType" wsdl:arrayType="tns4:Product[]" />
  </restriction>
  </complexContent>
  </complexType>
  </schema>
  </wsdl:types>
 <wsdl:message name="submitTopSellerProductsByCustomerRequest">
  <wsdl:part name="header" type="tns1:Header" />
  <wsdl:part name="customer" type="tns2:Customer" />
  <wsdl:part name="products" type="impl:ArrayOf_tns4_Product" />
  </wsdl:message>

Axis2 creates stub class called ArrayOfTns4Product and method which only
accepts that object.

Whole WSDL is also attached.

Best Regards,

Janne



2008/9/22 Martin Gainty <mg...@hotmail.com>

>  in your <xsd:schema>
> you can create a complexType element with maxOccurs attribute
> e.g.
> <xsd:complexType name="*AttachmentType*">
>  - <#11c8b0c07d704a82_> <xsd:sequence>
>    <xsd:element minOccurs="*0*" name="*fileName*" type="*xsd:string*" />
>    <xsd:element maxOccurs="*1*" minOccurs="*1*" name="*binaryData*"nillable
> ="*true*" type="*xmime:base64Binary*" xmime:expectedContentTypes="*
> application/octet-stream*" xmlns:xmime="*http://www.w3.org/2005/05/xmlmime
> *" />
>   </xsd:sequence>
>   </xsd:complexType>
>
> (for a more comprehensive example please provide wsdl)
>
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
> ------------------------------
> Date: Mon, 22 Sep 2008 10:46:19 +0300
> From: janne.rantala@gmail.com
> To: axis-user@ws.apache.org
> Subject: ArrayOf -problem
>
>
> Hi,
>
> I'm having trouble with ws-client which was originally created and used
> with Axis1. Now I'm forced to upgrade to Axis2 but this has not gone as I
> have hoped. I've tried creating stub classes with xmlbeans -option. One of
> the methods is supposed to to transfer an array of Product-objects, but
> xmlbeans option only creates object with name ArrayOfTns4Product classes.
>
> How am I able to generate classes the way they were created with Axis1?
>
> Best regards,
>
> Janne
>
> ------------------------------
> Stay up to date on your PC, the Web, and your mobile phone with Windows
> Live. See Now<http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/>
>

RE: ArrayOf -problem

Posted by Martin Gainty <mg...@hotmail.com>.
in your <xsd:schema>
you can create a complexType element with maxOccurs attribute
e.g.

<xsd:complexType 
name="AttachmentType">


- <xsd:sequence>


  <xsd:element minOccurs="0" name="fileName" 
type="xsd:string" /> 

  <xsd:element maxOccurs="1" minOccurs="1" name="binaryData" 
nillable="true" type="xmime:base64Binary" xmime:expectedContentTypes="application/octet-stream" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" /> 
  </xsd:sequence>
  </xsd:complexType>
(for a more comprehensive example please provide wsdl)

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


Date: Mon, 22 Sep 2008 10:46:19 +0300
From: janne.rantala@gmail.com
To: axis-user@ws.apache.org
Subject: ArrayOf -problem

Hi,

I'm having trouble with ws-client which was originally created and used with Axis1. Now I'm forced to upgrade to Axis2 but this has not gone as I have hoped. I've tried creating stub classes with xmlbeans -option. One of the methods is supposed to to transfer an array of Product-objects, but xmlbeans option only creates object with name ArrayOfTns4Product classes. 



How am I able to generate classes the way they were created with Axis1? 

Best regards,

Janne


_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/