axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniela CLARO" <>
Subject RE: Class as WS return parameter
Date Wed, 17 Nov 2004 10:42:00 GMT
Thank you Salvador, 

But there are somethings that I continue not understanding...I am a little
lost. I've read the user manual, however thanks again.

The error message that I receive right now says that did not find my service
Flight. I've created a java class Flight and this use ReturnFlight class as
a result. 

I put this two *.class files into WEB-INF/classes. I created a context for
my application called http://localhost:8080/travelws/ So, I've tried to
reference to my service like http://localhost:8080/travelws/Flight but it
doesn't work. Where I actually put my Flight.class. At the first time I have
transformed into Flight.jws, but I read that as I using a class return or a
bean to return, I can not use Flight.jws. Moreover, what I put in my
endpoint in my Client application? 

 String endpoint = "http://localhost:8088/travelws/Flight";

Thank you so much, but actually I am very lost!!!!

-----Message d'origine-----
De : Salvador Morant [] 
Envoyé : mercredi 17 novembre 2004 11:15
À :;
Objet : Re: Class as WS return parameter


you are using instant deployment and you need deployment descriptors.
In the deployment  descriptor it is possible to define the services and to
define also the classes of the response using <bean-mapping> tag.

<deployment xmlns=""
    <service name="WS_NAME" provider="java:RPC">
        <parameter name="className" value="package_name.class_name/>
        <parameter name="allowedMethods" value="*"/>
        <beanMapping qname="myNS:ReturnFlight "
languageSpecificType="java:package.ReturnFlight "/>


For deployment you need execute org.apache.axis.client.AdminClient.

It's a simple orientation, click this link for more information and search
WSDD/BeanMapping :

I hope to have been for you useful!

On Wed, 17 Nov 2004 09:22:57 +0100, Daniela CLARO <>
> Hi all,
> I am having a problem with my web service. I've created a web service 
> that it has a signature as below:
> public ReturnFlight findFlight(String fromCity, String toCity, String 
> dtDeparture, String dtArrival){
> Where ReturnFlight is a class that I defined earlier with two attibutes. 
> I am using AXIS 1.2 and I put this class (ReturnedFlight) into 
> WEB-INF/classes. My web service is published on 
> http://localhost:8080/Flight.jws. And the problem is that when I run 
> my simple Axis example to execute my web service, at first time it 
> gave me a message that I did not have serialized my class
>  I've tried to solve this problem putting the server-config.wsdd in my 
> WEB-INF directory, but when I do that I receive an error execution on 
> my http://localhost:8080/Flight.jws. The problem is actually occuring 
> when I try this code in AXIS:
>  call.setReturnType( XMLType.XSD_ANYTYPE );  ReturnFlight ret = new 
> ReturnFlight();
>        ret = (ReturnFlight) call.invoke( new Object [] { fromCity, 
> toCity,dtDeparture,dtArrival });
> I did not get any answer because I think it did not know how to work 
> with my ReturnFlight class.
> One more thing, if I am monitoring on the server side(Tomcat), I can 
> saw that my service has got actually the result that I want, but it 
> did not arrive to the client side.
> What do I must do to manage a class on returning parameters? 
> Here below, I put my server-config.wsdd, I do not know if it is 
> correctly or not...
> Help me, please!!! 
> <?xml version="1.0" encoding="UTF-8"?> <deployment 
> xmlns=""
> xmlns:java="">
> <service name= "Flight" provider= "java:RPC" style="rpc" use= 
> "encoded">
> <parameter name= "wsdlTargetNamespace" value= 
> "http://localhost:8080/travelws/Flight.jws"/>
> <parameter name= "wsdlServiceElement" value= "Flight"/> <parameter 
> name= "wsdlServicePort" value= "Flight"/> <parameter name= "className" 
> value= "ReturnFlight"/> <parameter name= "wsdlPortType " value= 
> "Flight"/>
> <operation name= "findFlight" qname= "operNS:findFlight" 
>     xmlns:operNS= "http://localhost:8080/travelws/Flight.jws" 
>         returnQName= "findFlightReturn" returnType= "rtns:ReturnFlight" 
>         xmlns:rtns= "http://DefaultNamespace"> </operation > 
> <parameter name= "allowedMethods " value= "findFlight"/>
> <typeMapping
> xmlns:ns= "http://DefaultNamespace" 
> qname= "ns:ReturnFlight" 
> type= "ReturnFlight" 
> serializer= "org.apache.axis.encoding.ser.BeanSerializerFactory " 
> deserializer= "org.apache.axis.encoding.ser.BeanDeserializerFactory " 
> encodingStyle= "" /> 
> </service > </deployment>
> Increasing my explanation, when I run without server-config.wsdd I 
> receive this error:
> No serializer found for class ReturnFlight in 
> registry
> org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl@15780d9 
>         org.apache.axis.AxisFault.makeFault( 
>         org.apache.axis.SOAPPart.writeTo( 
>         org.apache.axis.SOAPPart.getAsString( 
>         org.apache.axis.SOAPPart.getAsBytes( 
>         org.apache.axis.Message.getContentType(
> org.apache.axis.transport.http.AxisServlet.doPost( 
>         javax.servlet.http.HttpServlet.service(
> 339)
> Thank you so much,
> Daniela

View raw message