Return-Path: Mailing-List: contact axis-user-help@xml.apache.org; run by ezmlm Delivered-To: mailing list axis-user@xml.apache.org Received: (qmail 27810 invoked from network); 11 May 2002 16:50:48 -0000 Received: from mailout08.sul.t-online.com (194.25.134.20) by daedalus.apache.org with SMTP; 11 May 2002 16:50:48 -0000 Received: from fwd02.sul.t-online.de by mailout08.sul.t-online.com with smtp id 176a1Q-0004KG-01; Sat, 11 May 2002 18:47:04 +0200 Received: from asgard (510058672481-0001@[217.82.108.74]) by fmrl02.sul.t-online.com with smtp id 176a19-2CRYaOC; Sat, 11 May 2002 18:46:47 +0200 Message-ID: <001301c1f90b$6d7f4ba0$0101a8c0@asgard> From: "Dennis Reil" To: References: <010e01c1f838$58996730$0101a8c0@asgard> Subject: Re: can't find deserializer problem Date: Sat, 11 May 2002 18:46:40 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0010_01C1F91C.303B7CD0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Sender: 510058672481-0001@t-dialin.net X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C1F91C.303B7CD0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Finally I found a way to get it work. You have to take the = service-object and create a call. Then just create a mapping for the custom data type. Then = do the method-calls as normal. I inserted the following lines after the = instantiation of the service-object: ---------------------------------------------------- Call call =3D (Call) service.createCall(); QName collectionqn =3D new QName(DLM_NS,"collection"); call.registerTypeMapping(Collection.class, collectionqn, new = BeanSerializerFactory(Collection.class, collectionqn), new = BeanDeserializerFactory(Collection.class,collectionqn)); ----------------------------------------------------- Regards Dennis Reil ----- Original Message -----=20 From: Jabali Putrevu=20 To: axis-user@xml.apache.org=20 Sent: Saturday, May 11, 2002 6:05 PM Subject: Re: can't find deserializer problem Could you resolve this problem? I'm getting the similar exception = when I run my cilent code. ----- Original Message -----=20 From: Dennis Reil=20 To: axis-user@xml.apache.org=20 Sent: Friday, May 10, 2002 8:35 AM Subject: Re: can't find deserializer problem Ok, I'll attach the wsdl, I used to create the proxy classes. ----- Original Message -----=20 From: Glen Daniels=20 To: 'axis-user@xml.apache.org'=20 Sent: Friday, May 10, 2002 3:33 PM Subject: RE: can't find deserializer problem Could you send along the WSDL? -----Original Message----- From: Dennis Reil [mailto:axis@reil-online.de] Sent: Friday, May 10, 2002 5:57 AM To: AXIS-User-List Subject: can't find deserializer problem I wrote a wsdl-document describing a service, which uses schemas = to describe custom data types.=20 I generated the stub, ... with the wsdl2java-tool. Then I = implemented and deployed the service.=20 The Client uses the WSLocator-Class. With tcpmon I can see, that = the requests and=20 responses are working fine, but the client throws an exception. = It says, it can't find a deserializer for the collection-type. Do I have to specify = additional parameters for the client to work correctly ? The service itself seems to have = no problem with the custom type. Any ideas ? The exception and the client code can be seen below. Regards Dennis Reil = -------------------------------------------------------------------------= ------------------------------------------------------ org.xml.sax.SAXException: Deserializing parameter 'collection': = could not find deserializer for type = http://eVerlageWS.dnsalias.com/schemas/DLM.xsd:collection at = org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:227) at = org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserial= izationContextImpl.java:831) at = org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:1= 99) at = org.apache.axis.message.MessageElement.publishToHandler(MessageElement.ja= va:589) at = org.apache.axis.message.RPCElement.deserialize(RPCElement.java:224) at = org.apache.axis.message.RPCElement.getParams(RPCElement.java:248) at org.apache.axis.client.Call.invoke(Call.java:1701) at org.apache.axis.client.Call.invoke(Call.java:1608) at org.apache.axis.client.Call.invoke(Call.java:1169) at = RechercheDienst.RechercheDienstBindingStub.searchByXPathQuery(RechercheDi= enstBindingStub.java:197) at RechercheDienst.Test.main(Test.java:29) ------------------------------------------------------------ Client-Code: package RechercheDienst; import com.dnsalias.eVerlageWS.Searchrequest; import eVerlage.ws.dlm.Collection; public class Test { public static void main(String[] args) { try{ RechercheDienstWS service =3D new = RechercheDienstWSLocator(); RechercheDienstInterface port =3D = service.getRechercheDienstPort(); port.searchByXPathQuery("Test","Test"); } catch (Exception e){ System.out.println("DEBUG: Fehler"); e.printStackTrace(System.err); } } = ------------------------------------------------------------------------ ------=_NextPart_000_0010_01C1F91C.303B7CD0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Finally I found a way to get it work. = You have to=20 take the service-object and
create a call. Then just create a = mapping for the=20 custom data type. Then do the
method-calls as normal. I inserted the = following=20 lines after the instantiation of the
service-object:
----------------------------------------------------
Call call =3D (Call)=20 service.createCall();
        =    =20 QName collectionqn =3D new=20 QName(DLM_NS,"collection");
       =     =20 call.registerTypeMapping(Collection.class, collectionqn, new=20 BeanSerializerFactory(Collection.class,=20 collectionqn),
         &= nbsp;     =20 new = BeanDeserializerFactory(Collection.class,collectionqn));
-----------------------------------------------------
 
Regards
    Dennis = Reil
 
----- Original Message -----
From:=20 Jabali=20 Putrevu
Sent: Saturday, May 11, 2002 = 6:05=20 PM
Subject: Re: can't find = deserializer=20 problem

Could you resolve this problem? =  I'm getting=20 the similar exception when I run my cilent code.
----- Original Message -----
From:=20 Dennis=20 Reil
Sent: Friday, May 10, 2002 = 8:35=20 AM
Subject: Re: can't find = deserializer=20 problem

Ok, I'll attach the wsdl, I used to = create the=20 proxy classes.
----- Original Message ----- =
From:=20 Glen Daniels
Sent: Friday, May 10, 2002 = 3:33=20 PM
Subject: RE: can't find = deserializer=20 problem

Could you send along the WSDL?
-----Original Message-----
From: Dennis Reil=20 [mailto:axis@reil-online.de]
Sent: Friday, May 10, = 2002 5:57=20 AM
To: AXIS-User-List
Subject: can't find=20 deserializer problem

I wrote a wsdl-document = describing a=20 service, which uses schemas to describe
custom data types. =
I generated the stub, ... with = the=20 wsdl2java-tool. Then I implemented and deployed
the service.
The Client uses the = WSLocator-Class. With=20 tcpmon I can see, that the requests and
responses are working fine, but = the client=20 throws an exception. It says, it can't find
a deserializer for the = collection-type. Do=20 I have to specify additional parameters for
the client to work correctly ? = The service=20 itself seems to have no problem with the
custom type.
Any ideas ? The exception and = the client=20 code can be seen below.
 
Regards
    Dennis = Reil
 
 
 
----------------------------------------------------------------= ---------------------------------------------------------------
org.xml.sax.SAXException: = Deserializing=20 parameter 'collection':  could not find deserializer for = type http:/= /eVerlageWS.dnsalias.com/schemas/DLM.xsd:collection
 at=20 = org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:227)
&= nbsp;at=20 = org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserial= izationContextImpl.java:831)
 at=20 = org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:1= 99)
 at=20 = org.apache.axis.message.MessageElement.publishToHandler(MessageElement.ja= va:589)
 at=20 = org.apache.axis.message.RPCElement.deserialize(RPCElement.java:224)
&n= bsp;at=20 = org.apache.axis.message.RPCElement.getParams(RPCElement.java:248)
&nbs= p;at=20 org.apache.axis.client.Call.invoke(Call.java:1701)
 at=20 org.apache.axis.client.Call.invoke(Call.java:1608)
 at=20 org.apache.axis.client.Call.invoke(Call.java:1169)
 at=20 = RechercheDienst.RechercheDienstBindingStub.searchByXPathQuery(RechercheDi= enstBindingStub.java:197)
 at=20 RechercheDienst.Test.main(Test.java:29)
 
------------------------------------------------------------
Client-Code:
 
package = RechercheDienst;
 
import=20 com.dnsalias.eVerlageWS.Searchrequest;
import=20 eVerlage.ws.dlm.Collection;

public class Test {
 
 public static void main(String[] args)=20 {
         =20 = try{
           = ;=20 RechercheDienstWS service =3D new=20 = RechercheDienstWSLocator();
       =     =20 RechercheDienstInterface port =3D=20 = service.getRechercheDienstPort();
      =      =20 = port.searchByXPathQuery("Test","Test");
     =     =20 }
          = catch=20 (Exception=20 = e){
           = =20 System.out.println("DEBUG:=20 = Fehler");
          =  =20 = e.printStackTrace(System.err);
      &nb= sp;  =20 }
}
=
--------------------------------------------------------------------= ----
------=_NextPart_000_0010_01C1F91C.303B7CD0--