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 bohldan bohldan <gl...@hotmail.com> on 2005/03/14 10:26:13 UTC
Vector with right objectcount but nothing in it...?
Client..
This will give me:
Size: 38 (which is correct)
and then null (38 times)
What am i doing wrong ?
--------
public class Client {
public static void main(String[] args) {
try{
String username = "xjobbare";
String endpointURL = "http://localhost:8080/axis/services/GlazeService";
Service service = new Service();
Call call = (Call) service.createCall();
QName qn = new QName( "urn:GlazeService.Service", "User" );
call.setOperationName("ldap_GetAllUsernames");
call.setTargetEndpointAddress( new java.net.URL(endpointURL) );
call.registerTypeMapping( User.class,
qn,
org.apache.axis.encoding.ser.BeanSerializerFactory.class,
org.apache.axis.encoding.ser.BeanDeserializerFactory.class );
call.setReturnType(XMLType.SOAP_VECTOR);
Vector tomte = (Vector)call.invoke(new Object [] {});
System.out.println("Size: " + tomte.size());
for(int i = 0; i < tomte.size(); i++){
System.out.println(((User)(tomte.get(i))).GetGecos());
}
}catch(Exception e){
System.out.println("Something is really fucked up: " + e.toString());
}
}
}
----------
WSDD file:
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="GlazeService" provider="java:RPC">
<parameter name="className" value="GlazeService.Service"/>
<parameter name="allowedMethods" value="*"/>
<beanMapping qname="NS:User" xmlns:NS="urn:GlazeService.Service"
type="java:GlazeService.User"/>
</service>
</deployment>
_________________________________________________________________
Auktioner: Tjäna en hacka på gamla prylar http://tradera.msn.se