You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by cxf_infant <av...@gmail.com> on 2010/06/05 21:17:49 UTC
Re: Marshalling Error
I have fixed this issue by making minOccurs="0" for ReturnDate
<complexType name="ResponseType">
<sequence>
<element maxOccurs="1" minOccurs="0"
ref="xyz:TrainStatusPositive">
</element>
<element maxOccurs="1" minOccurs="0"
ref="xyz:TrainStatusNegative">
</element>
<element maxOccurs="1" minOccurs="0" ref="xyz:ReturnDate"/>
</sequence>
<attributeGroup ref="xyz:CorporateGroup"/>
</complexType>
cxf_infant wrote:
>
> Hi,
>
> I have a question regarding CXF marshalling process. While sending a
> response, I am getting a missing either A or B, and it has been
> categorized as marshalling error.
>
> My question is, if I have a response defined as complex type below, and if
> I have only TrainStatusPositive data on the Java object, why would CXF
> during marshalling process error out, saying that it is expecting
> either TrainStatusNegative or ReturnDate? Perhaps, I am missing something
> and am ignorant about CXF marshalling process.
>
> Any direction is greatly appreciated. Thanks.
>
> A comment, the WSDL2Java tool dishes out the following propOrder for
> response type:
> @XmlType(name = "ResponseType", propOrder = {
> "TrainStatusPositive",
> "TrainStatusNegative",
> "ReturnDate"
> })
>
> My response complex type is:
> ---------------------------
> response complex type
> ---------------------------
> <complexType name="ResponseType">
> <sequence>
> <element maxOccurs="1" minOccurs="0"
> ref="xyz:TrainStatusPositive">
> </element>
> <element maxOccurs="1" minOccurs="0"
> ref="xyz:TrainStatusNegative">
> </element>
> <element ref="xyz:ReturnDate"/>
> </sequence>
> <attributeGroup ref="xyz:CorporateGroup"/>
> </complexType>
>
--
View this message in context: http://old.nabble.com/Marshalling-Error-tp28713014p28791321.html
Sent from the cxf-user mailing list archive at Nabble.com.