Re: DII client programming...

From: Tevoi Andrea <tevoi_at_CAD.IT>
Date: Fri, 06 Sep 2002 10:16:37 +0200

So, Why " No serializer found for class in registry org.apache.axis.encoding.TypeMappingImpl_at_55d93d" ?
What should I do to pass a DOCUMENT object to invoke method?

It seems that DII works only with simple types like string, integer...

But, if I have to pass an instance of a class of my own (like DOCUMENT)?

Andrea Tevoi

-----Original Message-----
From: Phil Goodwin [mailto:phil.goodwin_at_SFBAY.SUN.COM]
Sent: gioved? 5 settembre 2002 22.03
Subject: Re: DII client programming...

DII is not required to construct client side artifacts or to register
serializers for them on your behalf. If DII client code wishes to take
advantage of generated artifacts then those artifacts should be
available on the classpath and the serializers for them should be
properly registered with the TypeMappingRegistry in the Service object.

Tevoi Andrea wrote:

>I'm trying to invoke a web service using DII:
>String wsdlUrl = "http://tevoi:8000/XasWebService/work/A2GWGI1_01_Net.wsdl";
>String wsdlNamespace = "";
>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:
> faultCode: {}Server.userException
> faultString: No serializer found for class in registry org.apache.axis.encoding.TypeMappingImpl_at_55d93d
> faultActor: null
> faultDetail:
> stackTrace: No serializer found for class in registry org.apache.axis.encoding.TypeMappingImpl_at_55d93d
> at org.apache.axis.encoding.SerializationContextImpl.serializeActual(
> at org.apache.axis.encoding.SerializationContextImpl.serialize(
> at org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(
> at org.apache.axis.message.SOAPBody.outputImpl(
> at org.apache.axis.message.SOAPEnvelope.outputImpl(
> at org.apache.axis.message.MessageElement.output(
> at org.apache.axis.SOAPPart.getAsString(
> at org.apache.axis.SOAPPart.getAsBytes(
> at org.apache.axis.Message.getContentType(
> at org.apache.axis.transport.http.HTTPSender.writeToSocket(
> at org.apache.axis.transport.http.HTTPSender.invoke(
> ...
>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

Phil Goodwin, Java Software, Sun Microsystems, 408.276.7090, or x17090
For a bowl of water give a goodly meal;
For a kindly greeting bow thou down with zeal;
For a simple penny pay thou back with gold;
If thy life be rescued, life do not withhold.
Thus the words and actions of the wise regard;
Every little service tenfold they reward.
But the truly noble know all men as one,
And return with gladness good for evil done.