Wednesday, October 16, 2013

The WSDL is not semantically valid: The element or type specified for part'payload' in message cannot be found in any schemas referenced by this wsdl - Oracle OSB

The WSDL is not semantically valid: The element or type specified for part'payload' in message cannot be found in any schemas referenced by this wsdl - Oracle OSB

While creating the WSDL resource in OSB with inline schema refereed to create the message types we may receive the following exception even though the wsdl is valid

An error occurred creating the resource:
The WSDL is not semantically valid: The element or type specified for part'payload' in message '{http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement}PositionEntitlementRequestMessage' cannot be found in any schemas referenced by this wsdl.

WSDL File:


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="SAPOM_PositionEntitlement"
                  targetNamespace="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:client="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
 <wsdl:types>
  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <xsd:element name="MT_EntitlementStatus" type="client:DT_EntitlementStatus"/>
   <xsd:complexType name="DT_EntitlementStatus">
    <xsd:annotation>
     <xsd:documentation xml:lang="EN">Schema for Entitlement Message</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
     <xsd:element name="Record">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element name="header">
         <xsd:complexType>
          <xsd:sequence>
           <xsd:element name="applicationId" type="xsd:string"/>
           <xsd:element name="transactionId" type="xsd:string"/>
           <xsd:element name="messageId" type="xsd:string"/>
           <xsd:element name="messageHistory" type="xsd:string"/>
           <xsd:element name="tracingId" type="xsd:string"/>
          </xsd:sequence>
         </xsd:complexType>
        </xsd:element>
        
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
    </xsd:sequence>
   </xsd:complexType>
  </xsd:schema>
 </wsdl:types>
 <wsdl:message name="PositionEntitlementRequestMessage">
  <wsdl:part name="payload" element="client:MT_EntitlementStatus"/>
 </wsdl:message>
 <wsdl:portType name="PositionEntitlement">
  <wsdl:operation name="process">
   <wsdl:input message="client:PositionEntitlementRequestMessage"/>
  </wsdl:operation>
 </wsdl:portType>

</wsdl:definitions>

The issue is the namespace prefix client is not able to access the element MT_EntitlementStatus.

To resolve this issue add the the targetNamespace attribute in schema definition as shown below

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="SAPOM_PositionEntitlement"
                  targetNamespace="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:client="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
 <wsdl:types>
  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"  targetNamespace="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement">
   <xsd:element name="MT_EntitlementStatus" type="client:DT_EntitlementStatus"/>


No comments:

Post a Comment