For those using Castor and Axis, I have a better solution... I have had to
only write a custom serializer/deseralizer to handle the SimpleType Enum
classes and have used the standard BeanSerializer/Deserializer to do the
rest. I am successfully running in production a full blown castor based
solution that doesn't use the DOM-based serialization that IBM's article
suggests or the CastorSerializer classes use. It uses the standard SAX-based
parsing of the BeanSerializers for all objects except for Enum classes. I
generate my Castor classes using the SourceGenerator from schema and it
works seemlessly. You don't need to use the CastorSerializer class!!

Contact me if you have further questions or need proof...

Thanks,
Ozzie Gurkan
Manheim

-----Original Message-----
From: Craig Duncan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 11, 2003 8:24 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: 1.2 alpha and castor serialization


Castor 0952

Axis 1.1 - I downloaded the zip file containing the source and then built it
with ant.

Unfortunately most of the things I have done have been complex.  I started
down the path of castor + axis because of the following link:
http://www-106.ibm.com/developerworks/library/ws-castor/


The article above does not mention having to make the change to the
CastorSerializer but the example they use is fairly simple.

Craig


-----Original Message-----
From: Keith Bohnenberger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 12:03 PM
To: [EMAIL PROTECTED]
Subject: RE: 1.2 alpha and castor serialization

Craig,

What version of Castor are you using?
What version of Axis are you using?
Can you send a simple example that works with built in castor serialization?

Keith

-----Original Message-----
From: Craig Duncan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 9:25 AM
To: [EMAIL PROTECTED]
Subject: RE: 1.2 alpha and castor serialization

Did you make the change to the CastorSerializer class as noted in this
link:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg15150.html

I had issues until I made this change.

Craig


-----Original Message-----
From: Keith Bohnenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 3:53 PM
To: [EMAIL PROTECTED]
Subject: RE: 1.2 alpha and castor serialization

I am trying to get a modified version of the stock example to work with
built in castor serialization.

I am using the alpha1.2 release from
http://www.apache.org/dist/ws/axis/1_2alpha
However, since it did not include the ...encoding.ser.castor.* classes I
built a new axis.jar from the CVS repository. I then replaced the axis.jar
file from the 1_2alpha download with the new axis.jar file.

Given this configuration I can get the server side built and deployed
however when I run my client I get the following error on the client side.
I do have the TradePriceRequestDescriptor class that castor generated in my
classpath so I am not sure what it is talking about.

remoteException: org.xml.sax.SAXException: Unable to marshall between XML
and Castor Objects :unable to find FieldDescriptor for 'TradePriceRequest'
in ClassDescriptor of TradePriceRequest

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXException: Unable to marshall between XML and
Castor Objects :unable to find FieldDescriptor for 'TradePriceRequest' in
ClassDescriptor of TradePriceRequest
 faultActor: 
 faultNode: 
 faultDetail: 
        {http://xml.apache.org/axis/}stackTrace:AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXException: Unable to marshall between XML and
Castor Objects :unable to find FieldDescriptor for 'TradePriceRequest' in
ClassDescriptor of TradePriceRequest
 faultActor: 
 faultNode: 
 faultDetail: 

org.xml.sax.SAXException: Unable to marshall between XML and Castor Objects
:unable to find FieldDescriptor for 'TradePriceRequest' in ClassDescriptor
of TradePriceRequest
        at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.ja
va:262)
        at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.jav
a:169)
        at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deseriali
zationContextImpl.java:1092)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at
org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializatio
nContextImpl.java:257)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:582)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:447)
        at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java
:687)
        at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:134)
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:157)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:122)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:183)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2682)
        at org.apache.axis.client.Call.invoke(Call.java:2665)
        at org.apache.axis.client.Call.invoke(Call.java:2355)
        at org.apache.axis.client.Call.invoke(Call.java:2278)
        at org.apache.axis.client.Call.invoke(Call.java:1772)
        at
com.mbi.axis.test.server.J2WStockServiceSoapBindingStub.getLastTradePric
e(J2WStockServiceSoapBindingStub.java:151)
        at
com.mbi.axis.test.server.StaticClient.main(StaticClient.java:30)



Reply via email to