Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 28
Registered: ‎04-08-2010
My Device: 9300
My Carrier: developer

Convert List<Object> to Vector<Object>

Hello, I have a Webservice done in c#, it returns a List<Object> and I am trying to convert it to Vector<Object>.

 

In java works fine if I return only the object, but I want to return a List<>.

 

 

public class RespuestaLogin
{
            public  bool _Correcto;
            public string _CodEmpresa;
            public string _CodUsuario;          
}

[WebMethod]
public List<RespuestaLogin> DoLogin(string hash, string email, string pass)
{
}
SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME);

PropertyInfo p1 = new PropertyInfo();  
p1.name="email";
p1.type=PropertyInfo.STRING_CLASS;
        
rpc.addProperty(p1, email);
	
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

envelope.bodyOut = rpc;
envelope.dotNet = true;
envelope.setOutputSoapObject(rpc);

HttpTransport ht = new HttpTransport(URL2);
		
ht.debug = true;
ht.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");

ht.call(SOAP_ACTION, envelope);
		
SoapObject result = (SoapObject) envelope.bodyIn;

SoapObject vector_result=(SoapObject)result.getProperty("DoLoginResult");
	        
DatosLogin log=new DatosLogin();	        
log._Correcto=vector_result.getProperty(0).toString();
log._CodEmpresa=vector_result.getProperty(1).toString();
log._CodUsuario=vector_result.getProperty(2).toString();

 

Developer
Posts: 246
Registered: ‎12-13-2010
My Device: Not Specified

Re: Convert List<Object> to Vector<Object>

Can you find a list class for blackberry?