Friday, March 6, 2015

Error: Message part element undefined in wsdl

Error: Message part element undefined in wsdl

java.lang.Exception: Message part element undefined in wsdl part name = payload type = ClaimResponse


Resolution: Check the wsdl file's input or output element's part. Part shuld be undefined. If you use JDeveloper, then in design view explanatory symbol will be displayed in part section of input which indicate that part is undefined. Fix the schema to fix this issue

Creating XML Scema with List of complex type (List of Employees or List of Records)



Creating XML Scema with List of complex type (List of Employes or List of Records)


Below XML is the schema for sample list of claims. Check the video below for more detail

<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://www.example.org"
            targetNamespace="http://www.example.org"
            elementFormDefault="qualified">
  <xsd:complexType name="ClaimRequestType">
    <xsd:sequence maxOccurs="unbounded">
      <xsd:element name="Claim" type="ClaimType"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="ClaimType">
    <xsd:sequence>
      <xsd:element name="id"/>
      <xsd:element name="claimId"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="claimRequest" type="ClaimRequestType"/>
  <xsd:complexType name="ClaimResponseType">
    <xsd:sequence>
      <xsd:element name="ClaimResponse" type="ClaimResponseType"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="ClaimResponse">
    <xsd:sequence>
      <xsd:element name="id"/>
      <xsd:element name="status"/>
      <xsd:element name="amount"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>