users@jax-rpc.java.net

DII client programming...

From: Tevoi Andrea <tevoi_at_CAD.IT>
Date: Thu, 05 Sep 2002 18:41:41 +0200

Hi,

I'm trying to invoke a web service using DII:

String wsdlUrl = "http://tevoi:8000/XasWebService/work/A2GWGI1_01_Net.wsdl";
String wsdlNamespace = "http://www.cadit.it/city/servizi/wsdl/AF/A2GWGI1_01";
String wsdlServiceName = "A2GWGI1_01Service";
String wsdlPortName = "A2GWGI1_01ServiceSoap";
String wsdlOperationName = "ServiceOperation";
QName serviceName = new QName(wsdlNamespace, wsdlServiceName);
QName portName = new QName(wsdlNamespace, wsdlPortName);
QName operationName = new QName(wsdlNamespace, wsdlOperationName);
ServiceFactory sF = ServiceFactory.newInstance();
Service service = sF.createService(new URL(wsdlUrl), serviceName);
Call call = service.createCall(portName, operationName);
DOCUMENT request = new DOCUMENT();
DOCUMENT response = (DOCUMENT) call.invoke(new Object[] {request});



I use Axis implementation. I have this exception:

AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.userException
 faultString: java.io.IOException: No serializer found for class com.cadit.ws.xas.city.servizi.DOCUMENT in registry org.apache.axis.encoding.TypeMappingImpl_at_55d93d
 faultActor: null
 faultDetail:
        stackTrace: java.io.IOException: No serializer found for class com.cadit.ws.xas.city.servizi.DOCUMENT in registry org.apache.axis.encoding.TypeMappingImpl_at_55d93d
        at org.apache.axis.encoding.SerializationContextImpl.serializeActual(SerializationContextImpl.java:1191)
        at org.apache.axis.encoding.SerializationContextImpl.serialize(SerializationContextImpl.java:744)
        at org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(SerializationContextImpl.java:812)
        at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:147)
        at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:401)
        at org.apache.axis.message.MessageElement.output(MessageElement.java:726)
        at org.apache.axis.SOAPPart.getAsString(SOAPPart.java:408)
        at org.apache.axis.SOAPPart.getAsBytes(SOAPPart.java:336)
        at org.apache.axis.Message.getContentType(Message.java:381)
        at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:125)
        ...


It says that it can't find serializer for class DOCUMENT (this class was generated from WSDL with Wsdl2Java tool).
I think DII doesn't need specification for serializer, because it retrieves this information frow WSDL at runtime, isn't this?

I mean: I'm trying to invoke a Web Service with DII getting WSDL informations dynamically at runtime without any client side artifacts, is it possible?

thanks in advance,

Andrea Tevoi