Are your Marshalled input and output object classes mapped with @XmlType, won't work without that. Just being able to marshal (using @XmlRootElement) isn't enough.
Printable View
Are your Marshalled input and output object classes mapped with @XmlType, won't work without that. Just being able to marshal (using @XmlRootElement) isn't enough.
You need to make sure that the request parameters are correct. Also, if you are writng JUnit, then the response type should match with the variable type to which it will be assigned. Also, make sure that the any beans have been correctly instantiated.
It is XSD related issue, you need to correct your XSD. Generally when you are playing with JAXB, this problem will occur , you must need to define request and response correctly.
This issue is resolved. For example if your input request element is 'InsertRequest' so need to define like
<xs:element name="InsertRequest">
<xs:annotation>
<xs:documentation>Root element for Record Insert Request</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="GeneralDetails" type="tns:GenralDetailsType"></xs:element>
<xs:element name="FullDetails" type="tns:FullDetailsType"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
---------------
Previously i was defined this as mention below:- so when i am creating JAXB beans it always create two elements for this, which element (InsertRequest or InsertRequestType) need to refer in endpoint, this was the issue.
<element name="InsertRequest" type="tns:InsertRequestType"></element>
<complexType name="InsertRequestType">
<sequence>
<element name="GeneralDetails" type="tns:GenralDetailsType"></element>
<element name="FullDetails" type="tns:FullDetailsType"></element>
</sequence>
</complexType>
Now i got an answer thanks for sharing.....