Could someone tell me what are the QName arguments to the 
BeanSerializerFactory and BeanDeserializerFactory constructors?

Do I instantiate QName with the name of my class:
    "disney.dis.session.PlayerSession"



I tried doing this

        QName qName = new QName("disney.dis.session.PlayerSession");
        BeanSerializerFactory bsf = 
             new BeanSerializerFactory(cl, qName);
        BeanDeserializerFactory bdf = 
             new BeanDeserializerFactory(cl, qName);

        call.registerTypeMapping(cl, qName, bsf, bdf);
                                 

before my "invoke" call.  I'm getting the same error. 

- Exception:
org.xml.sax.SAXException: Deserializing parameter 'getSessionReturn': 
could not find deserializer for type {disney.dis}PlayerSession
        at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
        at
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)



I don't know if I'm on the right track or not.  Any ideas anyone?

Many thanks. 

Vartan




--- Rhimbo <[EMAIL PROTECTED]> wrote:

> Hi Alick,
> 
> Thanks for the reply.  Below is the code I'm running.  
> 
> I am returning an instance of a class called PlayerSession from my
> web service.  How do I specify the return type?  Is this call 
> correct? 
>       call.setReturnType(new QName("PlayerSession"));
> 
> I'm getting the error when I run my DII client:
> 
> org.xml.sax.SAXException: Deserializing parameter 'getSessionReturn': 
> could not find deserializer for type {disney.dis}PlayerSession
>         at
> org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
>         at
>
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
> 
> 
> 
> Here is the "whole" code:
> 
>       ServiceFactory serviceFactory = ServiceFactory.newInstance();
>       Service service = new org.apache.axis.client.Service();
> 
>       Call call = (Call) service.createCall();
>       call.setTargetEndpointAddress(new java.net.URL(sessionEndpoint));
> 
>       call.addParameter(new QName("uid"),
>                         new QName("int"),
>                         ParameterMode.IN);
>       call.addParameter(new QName("productId"), 
>                         new QName("string"),
>                         ParameterMode.IN);
>       call.addParameter(new QName("sessionId"), 
>                         new QName("int"),
>                         ParameterMode.IN);
>       call.addParameter(new QName("context"), 
>                         new QName("string"),
>                         ParameterMode.IN);
>       call.setReturnType(new QName("PlayerSession"));
> 
>       Integer userID = new Integer(100);
>       String productID = new String("PP_TTO");
>       Integer sessionID = new Integer(98765);
>       String context = new String("Some string with text! ");
>       Object [] args = 
>         new Object [] {userID, productID, sessionID, context};
> 
>       QName opName = new QName("getSession"); 
>       call.invoke(opName, args);
> 
> 
> Many thanks,
> 
> Vartan
> 
> 
> 
> 
> 
> --- Alick Buckley <[EMAIL PROTECTED]> wrote:
> 
> > 
> > Hi Rhimbo,
> > 
> > I have been setting the return type on the OperationDesc using the
> > following
> > QNames.
> > 
> > In this example the "com.acme.service.soap.Employee" bean is being
> > returned.
> > 
> > new javax.xml.namespace.QName ( "http://soap.service.acme.com";,
> > "Employee" )
> > ) ;
> > 
> > For primitive types
> > 
> > new javax.xml.namespace.QName ( "http://www.w3.org/2001/XMLSchema";,
> > "int" )
> > ) ;
> > new javax.xml.namespace.QName ( "http://www.w3.org/2001/XMLSchema";,
> > "long" )
> > ) ;
> > new javax.xml.namespace.QName ( "http://www.w3.org/2001/XMLSchema";,
> > "float"
> > ) ) ;
> > new javax.xml.namespace.QName ( "http://www.w3.org/2001/XMLSchema";,
> > "double"
> > ) ) ;
> > new javax.xml.namespace.QName ( "http://www.w3.org/2001/XMLSchema";,
> > "boolean" ) ) ;
> > 
> > new javax.xml.namespace.QName ( "http://www.w3.org/2001/XMLSchema";,
> > "base64Binary" ) ) ;
> > new javax.xml.namespace.QName ( "http://www.w3.org/2001/XMLSchema";,
> > "string"
> > ) ) ;
> > 
> > 
> > -----Original Message-----
> > From: Rhimbo [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 14 April 2006 3:18 AM
> > To: Axis users
> > Subject: How to set return type with QName in DII client?
> > 
> > 
> > Can anyone point me to a _good_ explanation of QName?  Specifically,
> > I'm having trouble setting the return type for a call to a web
> > service client that returns a Java Bean. 
> > 
> > A web service end point returns an instance of "Session", which is 
> > an interface I defined.  Actually it returns an instance of 
> > "PlayerSession", which is a Java Bean that implements the "Session" 
> > interface.
> > 
> > I'm trying this: 
> > 
> >     String myEndpoint = "http://localhost:8080/axis/services/.....";
> > 
> >     Service service = new Service();
> >     Call call = (Call) service.createCall();
> >     call.setTargetEndpointAddress(new java.net.URL(myEndpoint));
> >     call.setOperationName("getSession");
> > 
> >     call.addParameter(new QName("uid"),
> >                   new QName("int"),
> >                       ParameterMode.IN);
> >     Integer i1 = new Integer(100);
> >     call.setReturnType(new QName("Session"));         <--------
> > 
> >     call.invoke(new QName("getSession"), new Object [] {i1});
> > 
> > The line at "<---" is giving me trouble.  What do I enter here?
> > 
> > The org.apache.axis.client.Call Javadoc for 
> >     setReturnType(QName type) 
> > says 
> >     type - QName of the return value type.
> > 
> > (not terribly useful).
> > 
> > The Javadoc for 
> >     setReturnType(QName xmlType,
> >                   java.lang.Class javaType)
> > says
> >     xmlType - - QName of the data type of the return value
> >     javaType - - Java class of the return value
> > 
> > Hmm.  What is the QName?  What is the "local part" and what is
> > the namespace URI?  
> > 
> > When I execute my client, I get the following exception:
> > 
> > ; nested exception is:
> >         org.xml.sax.SAXParseException: Premature end of file.
> > 
> > 
> > Can anyone point me to some good documentation, something other 
> > than the W3C "Namespaces in XML" document? 
> >    
> > 
> > Thanks,
> > 
> > V
> > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around 
> > http://mail.yahoo.com 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to