Error : Is your endpoint annotated with @Endpoint


Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?

While playing with webservice stuff, getting error while calling webservice, everything in place but, due to XSD definition and declaration style for JAXB

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 properly. Please find below an example to resolve this problem.

For example if your input request element is 'InsertRequest' so need to define like

Correct and supported
<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 it was defined, as mention below: - while generating JAXB beans, two classes are created for single elements, name as InsertRequest and InsertRequestType, and our implemented endpoint is not able to resolve this element during marshalling.
 
Correct but not supported.
<xs:element name="InsertRequest" type="tns:InsertRequestType">
      <xs:complexType name="InsertRequestType">
           <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> 

Comments

Post a Comment

Popular Posts