axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rhimbo <>
Subject How to set return type with QName in DII client?
Date Thu, 13 Apr 2006 17:17:34 GMT
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" 

I'm trying this: 

    String myEndpoint = "http://localhost:8080/axis/services/....."

    Service service = new Service();
    Call call = (Call) service.createCall();

    call.addParameter(new QName("uid"),
	              new QName("int"),
    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) 
    type - QName of the return value type.

(not terribly useful).

The Javadoc for 
    setReturnType(QName xmlType,
                  java.lang.Class javaType)
    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? 



Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

View raw message