public class QuoteData implements Serializable {
public QuoteData(){ }
private java.lang.String
stockSymbol;
public java.lang.String
getStockSymbol(){
return
this.stockSymbol;
}
public void setStockSymbol(java.lang.String
stockSymbol){
this.stockSymbol =
stockSymbol;
}
private java.math.BigDecimal
lastTradeAmount;
public java.math.BigDecimal
getLastTradeAmount(){
return
this.lastTradeAmount;
}
public void
setLastTradeAmount(java.math.BigDecimal
lastTradeAmount){
this.lastTradeAmount =
lastTradeAmount;
}
private java.util.Calendar
lastTradeDateTime;
public java.util.Calendar
getLastTradeDateTime(){
return
this.lastTradeDateTime;
}
public void
setLastTradeDateTime(java.util.Calendar
lastTradeDateTime){
this.lastTradeDateTime =
lastTradeDateTime;
}
private java.math.BigDecimal
stockChange;
public java.math.BigDecimal
getStockChange(){
return
this.stockChange;
}
public void
setStockChange(java.math.BigDecimal
stockChange){
this.stockChange =
stockChange;
}
private java.math.BigDecimal
openAmount;
public java.math.BigDecimal
getOpenAmount(){
return this.openAmount;
}
public void
setOpenAmount(java.math.BigDecimal openAmount){
this.openAmount =
openAmount;
}
private java.math.BigDecimal
dayHigh;
public java.math.BigDecimal
getDayHigh(){
return this.dayHigh;
}
public void setDayHigh(java.math.BigDecimal
dayHigh){
this.dayHigh = dayHigh;
}
private java.math.BigDecimal
dayLow;
public java.math.BigDecimal getDayLow(){
return
this.dayLow;
}
public void setDayLow(java.math.BigDecimal
dayLow){
this.dayLow = dayLow;
}
private int stockVolume;
public int
getStockVolume(){
return
this.stockVolume;
}
public void setStockVolume(int
stockVolume){
this.stockVolume =
stockVolume;
}
private java.lang.String
mktCap;
public java.lang.String getMktCap(){
return
this.mktCap;
}
public void setMktCap(java.lang.String
mktCap){
this.mktCap = mktCap;
}
private java.math.BigDecimal
prevCls;
public java.math.BigDecimal
getPrevCls(){
return this.prevCls;
}
public void setPrevCls(java.math.BigDecimal
prevCls){
this.prevCls = prevCls;
}
private java.lang.String
changePercent;
public java.lang.String
getChangePercent(){
return
this.changePercent;
}
public void setChangePercent(java.lang.String
changePercent){
this.changePercent =
changePercent;
}
private java.lang.String
fiftyTwoWeekRange;
public java.lang.String
getFiftyTwoWeekRange(){
return
this.fiftyTwoWeekRange;
}
public void
setFiftyTwoWeekRange(java.lang.String
fiftyTwoWeekRange){
this.fiftyTwoWeekRange =
fiftyTwoWeekRange;
}
private java.math.BigDecimal
earnPerShare;
public java.math.BigDecimal
getEarnPerShare(){
return
this.earnPerShare;
}
public void
setEarnPerShare(java.math.BigDecimal
earnPerShare){
this.earnPerShare =
earnPerShare;
}
private java.math.BigDecimal
pE;
public java.math.BigDecimal getPE(){
return
this.pE;
}
public void setPE(java.math.BigDecimal
pE){
this.pE = pE;
}
private java.lang.String
companyName;
public java.lang.String
getCompanyName(){
return
this.companyName;
}
public void setCompanyName(java.lang.String
companyName){
this.companyName =
companyName;
}
private boolean quoteError;
public
boolean getQuoteError(){
return
this.quoteError;
}
public void setQuoteError(boolean
quoteError){
this.quoteError =
quoteError;
}
public QuoteData(java.lang.String
stockSymbol, java.math.BigDecimal lastTradeAmount, java.util.Calendar
lastTradeDateTime, java.math.BigDecimal stockChange, java.math.BigDecimal
openAmount, java.math.BigDecimal dayHigh, java.math.BigDecimal dayLow, int
stockVolume, java.lang.String mktCap, java.math.BigDecimal prevCls,
java.lang.String changePercent, java.lang.String fiftyTwoWeekRange,
java.math.BigDecimal earnPerShare, java.math.BigDecimal pE, java.lang.String
companyName, boolean quoteError
){
this.stockSymbol=stockSymbol;
this.lastTradeAmount=lastTradeAmount;
this.lastTradeDateTime=lastTradeDateTime;
this.stockChange=stockChange;
this.openAmount=openAmount;
this.dayHigh=dayHigh;
this.dayLow=dayLow;
this.stockVolume=stockVolume;
this.mktCap=mktCap;
this.prevCls=prevCls;
this.changePercent=changePercent;
this.fiftyTwoWeekRange=fiftyTwoWeekRange;
this.earnPerShare=earnPerShare;
this.pE=pE;
this.companyName=companyName;
this.quoteError=quoteError;
}
}
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.
----- Original Message -----
Sent: Thursday, June 06, 2002 3:24
PM
Subject: RE: Deserializer exception
You
might want to browse the QuoteData class to see what QName is it
expecting. Another thing you might want to check is whether you have the
correct (de)serializer associated with the QName.
Charles
Charles,
The QName looks that was cause I set the
return type as "call.setReturnType(new QName("http://ws.cdyne.com/",
"QuoteData"));"
I got this value from the wsdl file.
This is a publicly hosted service. I am trying
to write the client for that. So I dont have the control over the
service.
Moreover the client generated from the
wsdl2java also looks the same.
I am attaching the wsdl file
Thanks
Sudhir
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.
----- Original Message -----
Sent: Thursday, June 06, 2002 3:02
PM
Subject: RE: Deserializer
exception
I think you are mixing up WSDL and WSDD. The ".wsdd" file
describes the QName <--> Java type mappings. From the
error you have given, it looks like there is no Java type mapped for
the QName "http://ws.cdyne.com/:QuoteData".
That QName looks a bit odd. Did someone mix up the namespace prefix
and the namespace URI?
Rohit,
This is a publicly hosted service. I
have no control on that.
Thanks
Sudhir
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.
----- Original Message -----
Sent: Thursday, June 06, 2002
2:48 PM
Subject: RE: Deserializer
exception
Do you specify a type mapping for QuoteData in the Web Service
deployment descriptor?
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
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
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.
This message may contain privileged and/or
confidential information. If you have received this e-mail in error or are
not the intended recipient, you may not use, copy, disseminate or
distribute it; do not open any attachments, delete it immediately from
your system and notify the sender promptly by e-mail that you have done
so. Thank you.
This message may contain privileged and/or
confidential information. If you have received this e-mail in error or are not
the intended recipient, you may not use, copy, disseminate or distribute it;
do not open any attachments, delete it immediately from your system and notify
the sender promptly by e-mail that you have done so. Thank
you.