Actually i'm returning an array. The method in webservice is something like
this:
public Alert[] getAlerts(){
...
}
And I'm using the NetBeans plugin for axis2 webservice, so, the WSDL is
automatically generated...
When the webservice returns a Alert[], how can I "take" this array on my
J2ME application?
mgainty wrote:
>
>
> complex return types such as Vector would need to be defined in the WSDL
> e.g.
> <schema targetNamespace="http://xml.apache.org/xml-soap"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <import namespace="http://DefaultNamespace"/>
> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> <complexType name="Vector">
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" name="item"
> type="xsd:anyType"/>
> </sequence>
> </complexType>
> </schema>
>
>
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
> copie de ceci est interdite. Ce message sert à l'information seulement et
> n'aura pas n'importe quel effet légalement obligatoire. Étant donné que
> les email peuvent facilement être sujets à la manipulation, nous ne
> pouvons accepter aucune responsabilité pour le contenu fourni.
>
>
>
>
>> Date: Wed, 29 Jul 2009 06:07:32 -0700
>> From: [email protected]
>> To: [email protected]
>> Subject: Re: Help with Deserialization of complex object with Java
>> Webservice
>>
>>
>> Thank you!
>>
>> But, in J2ME, What I need to do? Same?
>>
>> In my client I have this:
>>
>> public void testWebService() throws Exception {
>>
>> SoapSerializationEnvelope envelope = new
>> SoapSerializationEnvelope(SoapEnvelope.VER11);
>>
>> SoapObject soapObject = new SoapObject(url,"getAlerts");
>>
>> envelope.addMapping(url, "Alert", new Alert().getClass());
>>
>> envelope.setOutputSoapObject(soapObject);
>>
>> HttpTransport transport = new HttpTransport(url);
>>
>> transport.call("getAlerts",envelope);
>>
>> //HERE IS THE PROBLEM...
>> Vector ret = (Vector)envelope.getResponse();
>>
>> }
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Help-with-Deserialization-of-complex-object-with-Java-Webservice-tp24709922p24718858.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>
> _________________________________________________________________
> Bing™ brings you maps, menus, and reviews organized in one place. Try it
> now.
> http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TXT_MLOGEN_Local_Local_Restaurants_1x1
>
--
View this message in context:
http://www.nabble.com/Help-with-Deserialization-of-complex-object-with-Java-Webservice-tp24709922p24720614.html
Sent from the Axis - User mailing list archive at Nabble.com.