I have partially resolved the problem:
Server side (web service):
import java.util.HashSet;
import java.util.Set;
public class ProvaSet {
public Set<String> provaSet()
{
Set<String> s = new HashSet<String>();
s.add("Pippo");
s.add("Pluto");
s.add("Paperino");
s.add("Topolino");
return s;
}
}
Client invocation:
RPCServiceClient serviceClient;
try {
serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
EndpointReference targetEPR = new
EndpointReference(webServiceURI);
options.setTo(targetEPR);
QName opProvaSet = new QName("http://proveLuciana",
"provaSet");
Object[] opProvaSetArgs = new Object[] { };
Class[] returnTypes = new Class[] { Set.class };
Object[] response = serviceClient.invokeBlocking(opProvaSet,
opProvaSetArgs, returnTypes);
Collection result = (Collection) response[0];
System.out.println("\nTipo dell'oggetto result: " +
result.getClass());
Iterator iter = (Iterator) result.iterator();
while (iter.hasNext())
{
OMText s = (OMTextImpl) iter.next();
}
} catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Now the problem is that returns only the first element of Set Collection
(that is element "Pippo").
I'm working on this.
Hope this helps.
Regards,
Luciana
--
View this message in context:
http://www.nabble.com/-axis2-java-client--ArrayList-cannot-be-cast-to-Set-tp16726826p16743976.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]