axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bohldan bohldan" <glazeboh...@hotmail.com>
Subject Array of objects
Date Tue, 15 Mar 2005 10:36:42 GMT
Hi I think ive tried everything and i searched for a while now on how i send 
an array of object. If someone has something that works can that someone be 
nice to give me an example of the client, wsdd file. This is how my code 
look like..


client
-----------


			String endpointURL = "http://localhost:8080/axis/services/GlazeService";
			Service service = new Service();
			Call call = (Call) service.createCall();
			QName qn = new QName( "urn:GlazeService", "User" );
			call.setOperationName("ldap_GetAllUsernames");
			call.setTargetEndpointAddress( new java.net.URL(endpointURL) );
			call.registerTypeMapping( User.class,
					qn,
					new org.apache.axis.encoding.ser.BeanSerializerFactory(User.class, qn),
					new 
org.apache.axis.encoding.ser.BeanDeserializerFactory(User.class,qn));
		    User[] tomte = (User[])call.invoke(new Object [] {});
		    System.out.println("Size: " + tomte.length);
		    for(int i = 0; i < tomte.length; i++){
		    	System.out.println(tomte[i].getGecos());
		    }



wsdd file
---------------
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
	xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
	xmlns:glaze="urn:GlazeService.Service">
	<service name="GlazeService" provider="java:RPC">
	<parameter name="className" value="GlazeService.Service"/>
	<parameter name="allowedMethods" value="*"/>
	<beanMapping languageSpecificType="java:GlazeService.Service"
               qname="ns1:User" xmlns:ns1="urn:GlazeService"/>
	<typeMapping qname="glaze:ArrayOfUser" type="java:GlazeService.User[]"
	serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
	deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
	encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:glaze="urn:GlazeService"/>
    </service>
</deployment>

_________________________________________________________________
Hitta rätt på nätet med MSN Sök http://search.msn.se/


Mime
View raw message