axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Souther" <>
Subject Re: BeanSerializer
Date Tue, 13 Aug 2002 13:40:34 GMT

  ----- Original Message ----- 
  From: Ben Souther 
  Sent: Tuesday, August 13, 2002 9:38 AM
  Subject: BeanSerializer

  Can anyone point me to an example of a Java client that calls a webservice who's return
type is a JavaBean?
  I've looked at  samples/userguide/example5/ in the samples section of Axis.
This example demonstrates how to send a bean as an argument but doesn't show how to recieve
one as a returnType.

  Here is my attempt:
              String  endpoint = "http://localhost:8080/axis/services/EmployerService";
              Service service  = new Service();
              System.out.println("service Created");
              Call  call = (Call)service.createCall();
              System.out.println("Call Created");
              QName qn = new QName("EmployerService", "getEmployerData");
              System.out.println("ready to invoke call....");
              EmployerBean employerBean = (EmployerBean)call.invoke(new Object[]{"1"});
              System.out.println("Call invoked...");
              if(employerBean == null)
                  System.out.println("EmployerBean is null");
              String employerName = employerBean.getEmployerName();
              System.out.println("Name: " + employerName);
          }catch(Exception e){
              System.out.println("Error: " + e.toString());

  Here is the error that I am fighting with:

  - Exception:
  org.xml.sax.SAXException: Deserializing parameter 'getEmployerDataReturn':  could not find
deserializer for type {com.fwdco.shared}EmployerBean
          at org.apache.axis.message.RPCHandler.onStartChild(
          at org.apache.axis.encoding.DeserializationContextImpl.startElement(
          at org.apache.axis.message.SAX2EventRecorder.replay(
          at org.apache.axis.message.MessageElement.publishToHandler(
          at org.apache.axis.message.RPCElement.deserialize(
          at org.apache.axis.message.RPCElement.getParams(
          at org.apache.axis.client.Call.invoke(
          at org.apache.axis.client.Call.invoke(
          at org.apache.axis.client.Call.invoke(
          at ReadEmployer.main(
  Error: org.xml.sax.SAXException: Deserializing parameter 'getEmployerDataReturn':  could
not find deserializer for type {com.fwdco.shared}EmployerBean

  Here is my WSDD:

  <deployment xmlns=""

       <service name="EmployerService" provider="java:RPC">
        <parameter name="className"      value="EmployerService"/>
        <parameter name="allowedMethods" value="*"/>
        <beanMapping qname="ns1:EmployerBean" xmlns:ns1="com.fwdco.shared"
               languageSpecificType="java:com.fwdco.shared.EmployerBean" />


  I'm using Tomcat 4.0.3 

  Thank you.

View raw message