Heya,
I've been experimenting with Axis using Castor, and I can't seem to get
my example working when the style of Java class mapping is "type." I've been
changing the org.exolab.castor.builder.javaclassmapping property to examine the
different results. My co-worker managed to capture the raw xml response using
XMLSpy, but neither a .NET or a java client can produce class objects (Note:
the .NET client will work if we manually remove the property setting the
element to unqualified). I get the following error information on the Java
client:
Unable to marshall between XML and Castor Objects :
unable to find FieldDescriptor for 'holding' in ClassDescriptor
of QuarterlyUpdatesVO
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:590)
I've included the XSD, the ant task definition, and the two sets of XML
produced. I noticed that the only difference seems to be the placement of the
xmlns="" in various tags. Does anyone have any hints on why this is
happening? It confuses me because Castor is working on the server side, but
not on the client.
Thanks,
Anna
XSD
===
?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://sungard.com/services/quarterlyupdates/wsdl/types"
xmlns="http://sungard.com/services/quarterlyupdates/wsdl/types">
<xsd:element name="QuarterlyUpdatesVO">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="productID"
type="xsd:integer"/>
<xsd:element name="holding" type="HoldingVO"
minOccurs="0" maxOccurs="10"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="HoldingVO">
<xsd:sequence>
<xsd:element name="securityName" type="xsd:string"/>
<xsd:element name="holdingPercentage"
type="xsd:double"/>
</xsd:sequence>
</xsd:complexType>
<!-- Methods signatures -->
<xsd:element name="getProduct">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ticker" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getProductResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="QuarterlyUpdatesVO"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
ANT TASK(fragment)
========
<castor-sourcegen file="${xsd}/QuarterlyUpdates.xsd" todir="${src}"
package="com.sungard.valueobject" warnings="false" verbose="true"
nomarshall="true"/>
XML ("element" version)
=================
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getProductResponse
xmlns="http://sungard.com/services/quarterlyupdates/wsdl/types">
<QuarterlyUpdatesVO>
<productID xmlns="">14</productID>
<holding xmlns="">
<securityName>Security A</securityName>
<holdingPercentage>0.1</holdingPercentage>
</holding>
<holding xmlns="">
<securityName>Security B</securityName>
<holdingPercentage>0.22</holdingPercentage>
</holding>
<holding xmlns="">
<securityName>Security C</securityName>
<holdingPercentage>0.34</holdingPercentage>
</holding>
</QuarterlyUpdatesVO>
</getProductResponse>
</soapenv:Body>
</soapenv:Envelope>
XML("type" version)
===============
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getProductResponse
xmlns="http://sungard.com/services/quarterlyupdates/wsdl/types">
<QuarterlyUpdatesVO>
<productID xmlns="">14</productID>
<holding>
<securityName xmlns="">Security
A</securityName>
<holdingPercentage
xmlns="">0.1</holdingPercentage>
</holding>
<holding>
<securityName xmlns="">Security
B</securityName>
<holdingPercentage
xmlns="">0.22</holdingPercentage>
</holding>
<holding>
<securityName xmlns="">Security
C</securityName>
<holdingPercentage
xmlns="">0.34</holdingPercentage>
</holding>
</QuarterlyUpdatesVO>
</getProductResponse>
</soapenv:Body>
</soapenv:Envelope>
Anna Veirauchs *Software Engineer * SunGard * Wealth Management Services * 2399
Gateway Oaks Drive, Suite 200, Sacramento, CA 95833
Tel 916-288-6431 * Toll Free 888-526-6300 * Fax 916-288-6500 *
<http://www.sungard.com/products_and_services/swms/managed_account_solutions/default.htm>
CONFIDENTIALITY: This email (including any attachments) may contain
confidential, proprietary and privileged information, and unauthorized
disclosure or use is prohibited. If you received this email in error, please
notify the sender and delete this email from your system. Thank you.
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------