You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by BR...@LILLY.COM on 2002/06/11 21:38:31 UTC

Bad Type with Beans problem

I'm having a problem with the setup for an application to send a bean to a 
web service.  I'm getting this error :

org.xml.sax.SAXException: Bad types (null -> class 
com.lilly.javaatg.catd.vo.canDE.PatientVOBean)

I would think it is a classpath error but the PatientBean is in the 
program and in the classpath for the app server.

My server-config for the service looks like this...

<service name="dataLoad" provider="java:RPC">
  <parameter name="allowedMethods" value="isUserValid loadPatient"/>
  <parameter name="scope" value="Application"/>
  <parameter name="className" 
value="com.lilly.javaatg.catd.cande.DataLoadImpl"/>
  <beanMapping 
languageSpecificType="java:com.lilly.javaatg.catd.vo.canDE.PatientVOBean" 
qname="Patient"/>
 </service>

The code I'm using to call the service looks like this:

Service  service = new Service();
      QName    qn      = new QName( "urn:cande", "PatientVOBean" ); 

      Boolean res = new Boolean(false);
      for (int i=0; i<count; i++) {
          Call     call    = (Call) service.createCall();
 
          call.registerTypeMapping(PatientVOBean.class, qn,
                      new 
org.apache.axis.encoding.ser.BeanSerializerFactory(PatientVOBean.class, 
qn), 
                      new 
org.apache.axis.encoding.ser.BeanDeserializerFactory(PatientVOBean.class, 
qn));
          call.setTargetEndpointAddress( url );
          call.setOperationName( new QName("dataLoad", "loadPatient") );
          call.addParameter( "userID", XMLType.XSD_STRING, 
ParameterMode.IN );
          call.addParameter( "password", XMLType.XSD_STRING, 
ParameterMode.IN );
          call.addParameter( "Patient", qn, ParameterMode.IN );
          call.setReturnType( XMLType.XSD_BOOLEAN );

Anyone see what I'm doing wrong or can give me a hand on where to look?

Thanks

Jonathan Bricker
Lilly Research Labs
Java ATG