Folks:
I am having a tough time figuring this problem i came across with castor.
The following is the XSD input for SourceGenerator
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="Header.xsd"/>
<xs:include schemaLocation="TransactionResponse.xsd"/>
<xs:include schemaLocation="Status.xsd"/>
<xs:include schemaLocation="CustomerRAInfo.xsd"/>
<xs:complexType name="RiskAssessmentResponse">
<xs:sequence>
<xs:element name="partnerHeader" type="Header"/>
<xs:element name="responseHeader" type="TransactionResponse"/>
<xs:element name="raResponse" type="CustomerRAInfo" minOccurs="0"/>
<xs:element name="raEventStatus" type="Status"> <xs:annotation>
<xs
ocumentation>Event level status or errors including level ONE and TWO validation errors</xs
ocumentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="riskAssessmentResponse" type="RiskAssessmentResponse"/>
</xs:schema>
The problem is with RiskAssessmentResponse/raEventStatus element highlighted in bold in XSD. Although its a Status type object the castor is generating following code in
java class
public class RiskAssessmentResponse implements java.io.Serializable {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Field _partnerHeader
*/
private com.xxx.core.Header _partnerHeader;
/**
* Field _responseHeader
*/
private com.xxx.TransactionResponse _responseHeader;
/**
* Field _raResponse
*/
private com.xxx.core.CustomerRAInfo _raResponse;
/**
* Event level status or errors including level ONE and TWO
* validation errors
*/
private com.xxx.RaEventStatus _raEventStatus; Any pinters would be appreciated.
Thanks,
Sachin