axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Blair <hrh...@yahoo.com>
Subject Re: No serializer found for class
Date Fri, 20 Feb 2004 21:20:44 GMT
Parul,
 
I've notice two things:
 
1-Your WSDD does not have any information regarding the encoding, ser and deser. Perhaps you
may have to add them manually yourself. The absence of these information results in exceptions
such as Seriliazer or Desr not found.
 
2-In the client code the call.addParameter() requires an Object of type QName according as
the 2nd parameter according to the API docs, yet you are passing a XDS type.
 
Other than these two I don't see anything obvious that might cause the exception.
 
Regards,
Tony.

Parul.Joshi@Expeditors.com wrote:

The service is implemented in SmallTalk, and basically has a single main method "executeRequest"
which takes in a generic Object, and based on the type of Object it returns appropriate "View"
objects. 
The wsdd is below, its very different from what I've see, which is why I can't understand
a lot of it :-( 

I've attached a soft copy, but also cut and paste the relevant sections.. 

  <?xml version="1.0" ?> 
- <!--  edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) --> 
- <!--   Generated by VisualAge Smalltalk Web Services on 6/10/2003 at 1:08:16 PM  -->

- <vastwsd:deployment targetNamespace="urn:ExpoServiceInterface" 
xmlns:vast="Smalltalk" xmlns:vastwsd="urn:VASTWebServiceDeployment600" 
xmlns:esi="urn:ExpoServiceInterface" xmlns:n="urn:VASTWebServiceDeployment600" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:VASTWebServiceDeployment600">

- <services> 
                <service name="ExpoServiceInterface" namespace="http://www.ExpoServiceInterface.com/ExpoServiceInterface">

          <documentation xmlns:zmls="http://www.w3.org/2001/XMLSchema" /> 
          <serviceInterfaceClass>SstWSService</serviceInterfaceClass> 
- <provider type="SmalltalkProvider"> 
  <vast:provider className="ExpoServiceInterface" creationMethod="current" /> 
- <operations> 
  <operation name="about" qName="esi:about" /> 
  <operation name="status" qName="esi:status" /> 
  <operation name="executeRequest:" qName="esi:executeRequest" /> 
  <operation name="argsForRequestNamed:" qName="esi:argsForRequestNamed" /> 
  </operations> 
  </provider> 
<extensions /> 
  </service> 
  </services> 

This is the exectueRequest() from my client code 

private Object runExecuteRequest(Object request) throws RemoteException, AxisFault, SOAPException

   { 
        service = new Service(); 
        call    = (Call) service.createCall(); 
        call.setTargetEndpointAddress( new java.net.URL(endpoint) ); 
        call.setOperation(method2);       
        call.setOperationName(new QName("urn:ExpoServiceInterface", "executeRequest")); 
                
        setupQNames(); 
        call.addParameter( "outMsg", XMLType.XSD_ANYTYPE, ParameterMode.IN ); 
        call.setReturnClass(EIResponse.class);                         
        EIResponse obj = (EIResponse) call.invoke(new Object[] {request});               
 
        return obj; 
  } 

private void setupQNames() 
{ 
        java.lang.Class beanSF = BeanSerializerFactory.class; 
        java.lang.Class beanDF = BeanDeserializerFactory.class; 
        String nameSpace = "";//http://www.ExpoServiceInterface.com/ExpoServiceInterface-Interface";

                  
        QName qName = new javax.xml.namespace.QName("OC315SearchRequest", "OC315SearchRequest");
                
        call.registerTypeMapping(OC315SearchRequest.class, qName, beanSF, beanDF); 
                
        qName = new javax.xml.namespace.QName(nameSpace, "OC315SearchRequest");          
      
        call.registerTypeMapping(OC315SearchRequest.class, qName, beanSF, beanDF); 
                                
        qName = new javax.xml.namespace.QName(nameSpace, "OC315SearchView"); 
        call.registerTypeMapping(OC315SearchView.class, qName, beanSF, beanDF); 
                
        qName = new javax.xml.namespace.QName("EIResponse", "EIResponse"); 
        call.registerTypeMapping(EIResponse.class, qName, beanSF, beanDF); 
                
        qName = new javax.xml.namespace.QName(nameSpace, "outMsg"); 
        call.registerTypeMapping(EIResponse.class, qName, beanSF, beanDF); 
        
        qName = new javax.xml.namespace.QName(nameSpace, "EIAbstractHeader"); 
        call.registerTypeMapping(EIAbstractHeader.class, qName, beanSF, beanDF); 

        qName = new javax.xml.namespace.QName(nameSpace, "userErrors"); 
        call.registerTypeMapping(UserErrorResult.class, qName, beanSF, beanDF); 

        qName = new javax.xml.namespace.QName(nameSpace, "systemErrors"); 
        call.registerTypeMapping(SystemErrorResult.class, qName, beanSF, beanDF); 
                
        qName = new javax.xml.namespace.QName(nameSpace, "results"); 
        call.registerTypeMapping(Result.class, qName, beanSF, beanDF); 
                
        qName = new javax.xml.namespace.QName(nameSpace, "userErrors"); 
        call.registerTypeMapping(UserErrorResult.class, qName, beanSF, beanDF); 
                
        qName = new javax.xml.namespace.QName(nameSpace, "headers"); 
        call.registerTypeMapping(EIResponseHeader.class, qName, beanSF, beanDF); 
                
        qName = new javax.xml.namespace.QName(nameSpace, "errorResult"); 
        call.registerTypeMapping(ErrorResult.class, qName, beanSF, beanDF); 

        qName = new javax.xml.namespace.QName(nameSpace, "answer"); 
        call.registerTypeMapping(Answer.class, qName, beanSF, beanDF);                   
     
        qName = new javax.xml.namespace.QName(nameSpace, "systemErrors"); 
        call.registerTypeMapping(SystemErrorResult.class, qName, beanSF, beanDF); 
} 

Thanks a lot for trying to help...
Parul 


Tony Blair <hrh747@yahoo.com> 
02/20/2004 10:43 AM 
Please respond to axis-user 

        
        To:        axis-user@ws.apache.org 
        cc:        (bcc: Parul Joshi/IS/Expeditors) 
        Subject:        Re: No serializer found for class


Parul, 
  
Can you post your Client code and the your WSDD (NOT the WSDL) here? 
  
Regards, 
Tony.

Parul.Joshi@Expeditors.com wrote: 

Hi there, 
I am extremely new to Axis and SOAP, and am trying to solve this for the past 2 days, without
and luck. 

I am running into a problem when I am trying to deserialize incoming data. 
I get the following exception. 
SimpleDeserializer encountered a child element, which is NOT expected, in something it was
trying to deserialize. 
       at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.j


I read thru' many of the posts, and I have registered all my sub-classes with BeanSerializers
and De-serializer. I still get this exception. 
My return type is a complex type which has 2 other complex types in it. 
<outMsg> 
       <header> 
       <requests xsi:type="Array" arrayType="SearchRequest[1]"> 
               <SearchRequest> 
                       ...... 
                </SearchRequest> 
       </request> 
       <columnHeadings type="soap:Array"/> 
       </header> 
       <answer> 
               <userErrors> </userErrors> 
               <results xsi:type="Array" arrayType="SearchView[3]"> 
                       <SearchView> ....   </SearchView> 
               <systemErrors> </SystemErrors> 
       </answer> 
</outMsg> 

I have registered outMsg, header, answer, SearchView, SearchRequest, userErrors, systemErrors.
 Basically I have registered all the complex types that I expect in the return object. 
I am registering it like this. nameSpace is ="", since there isn't one defined in the wdss.

       qName = new javax.xml.namespace.QName(nameSpace, "outMsg"); 
       call.registerTypeMapping(EIResponse.class, qName, beanSF, beanDF); 

I don't know if I'm registering it incorrect, since I'm not sure what I should put in the
namespace, I tried several different things but none work. 

Any Help will be greatly appreciated. 


Thanks,
Parul 

---------------------------------
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want. 



> ATTACHMENT part 2 application/octet-stream name=ExpoServiceDeploymentDescriptor.wsdd.doc



---------------------------------
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
Mime
View raw message