axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sudhir" <sud...@infolead.com>
Subject Deserializer exception
Date Thu, 06 Jun 2002 21:43:08 GMT

Sorry for re-posting this. I havent gotten any replies for this query. I would really appreciate
any help on this

I have written a client for a soap document based service. When I try this I am getting the
following exception
- Exception:
org.xml.sax.SAXException: Deserializing parameter 'GetQuoteResult':
 could not find deserializer for type http://ws.cdyne.com/:QuoteData

        at org.apache.axis.message.RPCHandler.onStartChild(RPCHandle
r.java:227)
        at org.apache.axis.encoding.DeserializationContextImpl.start
Element(DeserializationContextImpl.java:831)
        at org.apache.axis.message.SAX2EventRecorder.replay(SAX2Even
tRecorder.java:199)
        at org.apache.axis.message.MessageElement.publishToHandler(M
essageElement.java:589)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement
.java:224)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.j
ava:248)
        at org.apache.axis.client.Call.invoke(Call.java:1701)
        at org.apache.axis.client.Call.invoke(Call.java:1608)
        at org.apache.axis.client.Call.invoke(Call.java:1169)
        at GetQuote.invokeService(GetQuote.java:43)
        at GetQuote.main(GetQuote.java:50)
org.xml.sax.SAXException: Deserializing parameter 'GetQuoteResult':
 could not find deserializer for type http://ws.cdyne.com/:QuoteData

I have attached the wsdl file as well..

What could be wrong here?
I have the QuoteData class in the classpath.


import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.rpc.namespace.QName;
import javax.xml.rpc.ParameterMode;
import org.apache.axis.encoding.XMLType;
import com.infolead.servicetester.client.ClientInterface;
import java.math.*;
import java.util.*;

 public class GetQuote implements ClientInterface{
 private Call call=null;
 private Object response;

 public GetQuote(){
  try {
   String endPoint=null;
   Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
   Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
   Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
   Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
   Service  service = new Service();
   call = (Call) service.createCall();
   javax.xml.rpc.namespace.QName qName;
   qName = new javax.xml.rpc.namespace.QName("http://ws.cdyne.com/", "QuoteData");
   call.registerTypeMapping(QuoteData.class, qName, beansf, beandf, true);
   endPoint = "http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx";
   call.setUseSOAPAction(true);
   call.setTargetEndpointAddress( new java.net.URL(endPoint) );
   call.setOperationStyle("wrapped");
   call.setSOAPActionURI("http://ws.cdyne.com/GetQuote");
   call.setOperationName(new javax.xml.rpc.namespace.QName("http://ws.cdyne.com/", "GetQuote"));
   call.setEncodingStyle(null);
   java.lang.String LicenseKey;
   call.addParameter("LicenseKey", new QName("http://www.w3.org/2001/XMLSchema", "java.lang.String"),
java.lang.String.class, ParameterMode.IN);
   java.lang.String StockSymbol;
   call.addParameter("StockSymbol", new QName("http://www.w3.org/2001/XMLSchema", "java.lang.String"),
java.lang.String.class, ParameterMode.IN);
   call.setReturnType(new QName("http://ws.cdyne.com/", "QuoteData"), QuoteData.class);
  } catch (Exception ex) {
   ex.printStackTrace();
  }
 }
 public Object invokeService(Object[] args) throws Exception{
  Object returnValue = call.invoke(args);
  return returnValue;
 }

public static void main(String[] args){
 try{
  GetQuote sa = new GetQuote();
  QuoteData b = (QuoteData)sa.invokeService(new Object[] {"0", "SUNW"});
  System.out.println(b);
 }catch(Exception e){
  e.printStackTrace();
 }
}
}


The trouble with the world is that the stupid are cocksure and the intelligent are full of
doubt.
Integrity without knowledge is weak and useless, and knowledge without integrity is dangerous
and dreadful.

Mime
View raw message