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 Hugo Silva <hu...@paradigmaxis.pt> on 2003/05/09 11:57:57 UTC

[Axis] WSDL2Java and Arrays

Hi,

I am new to axis and i'm developing a service using the WSDL2Java tool. I want my service to recibe JPEG image files so i added a ByteArray type in the WSDL, witch goes like this:

<xsd:complexType name="ByteArray">
    <xsd:complexContent>
        <xsd:restriction base="soapenc:Array">
            <xsd:attribute ref="soapenc:arrayType" arrayType="xsd:byte"/>
        </xsd:restriction>
    </xsd:complexContent>
</xsd:complexType>

So the tool created me a ByteArray class... my problem is i don't understand how am i suppose to use it... either in the sent or recibe case!

I'm sending the ByteArray.java as an attachement, I hope some one can help me...



Thanks for your attencion,
Best regards,

Hugo Silva

Re: [Axis] WSDL2Java and Arrays

Posted by Olivier Gauwin <ga...@atl.dtrd.de>.
Hi Hugo,

There's a bug in WSDL2Java about the generated class for Arrays using 
<complexContent> and <restriction>. I reported it here :
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16842

The class it generates is unusable. You should comment these tags to 
avoid this bug.

Hope this helps,

Olivier Gauwin


Hugo Silva wrote:

> Hi,
>  
> I am new to axis and i'm developing a service using the WSDL2Java 
> tool. I want my service to recibe JPEG image files so i added a 
> ByteArray type in the WSDL, witch goes like this:
>  
> <xsd:complexType name="ByteArray">
>     <xsd:complexContent>
>         <xsd:restriction base="soapenc:Array">
>             <xsd:attribute ref="soapenc:arrayType" arrayType="xsd:byte"/>
>         </xsd:restriction>
>     </xsd:complexContent>
> </xsd:complexType>
>  
> So the tool created me a ByteArray class... my problem is i don't 
> understand how am i suppose to use it... either in the sent or recibe 
> case!
>  
> I'm sending the ByteArray.java as an attachement, I hope some one can 
> help me...
>  
>  
>  
> Thanks for your attencion,
> Best regards,
>  
> Hugo Silva




RE: [Axis] WSDL2Java and Arrays

Posted by Oikonomopoulos Spyros <ik...@aegean.gr>.
Is it the only class the tool created? Probably not.. There should be a
folder-package (probably named: localhost) with a class ending in "Locator";
Instantiate this (empty parameter constr) and call getXXX where XXX is the
name of your service

Then call methods as you would in the original class, just replace refs to
the ByteArray with the new class

Hope it works

-----Original Message-----
From: Hugo Silva [mailto:hugo.silva@paradigmaxis.pt]
Sent: Friday, May 09, 2003 12:58 PM
To: axis-user@ws.apache.org
Subject: [Axis] WSDL2Java and Arrays


Hi,

I am new to axis and i'm developing a service using the WSDL2Java tool. I
want my service to recibe JPEG image files so i added a ByteArray type in
the WSDL, witch goes like this:

<xsd:complexType name="ByteArray">
    <xsd:complexContent>
        <xsd:restriction base="soapenc:Array">
            <xsd:attribute ref="soapenc:arrayType" arrayType="xsd:byte"/>
        </xsd:restriction>
    </xsd:complexContent>
</xsd:complexType>

So the tool created me a ByteArray class... my problem is i don't understand
how am i suppose to use it... either in the sent or recibe case!

I'm sending the ByteArray.java as an attachement, I hope some one can help
me...



Thanks for your attencion,
Best regards,

Hugo Silva