Decouple Types From Interface

Refactoring the WSDL types into their own, decoupled, definition files allows the developer to reuse these types more easily within WID.

  1. Goto Business Integration view and expand CuramWebServices > Interfaces
  2. Right click CreateEvidenceWS and select Refactor > Extract WSDL Components, checking the Extaract Business Objects and Use folder structure derived from the Business Object namespace(s) check boxes. Do not select the Separate Port Type (Interface) from other WSDL elements checkbox.
  3. If you get a warning about type name collisions, just rename one of the files in the preview box.
  4. Create a schema called CreateEvidenceRootType.xsd to define a root node that can contain either the top level request element or the top level response element. Make sure your include statements have the correct path to the xsd files you just extracted:
                  <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:ce="http://ws.curam/EvidenceCreateWS"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      attributeFormDefault="unqualified" 
      elementFormDefault="qualified"
      targetNamespace="http://ws.curam/EvidenceCreateWS" 
      xmlns=""
    >
      <xs:include 
        schemaLocation=
     "
                   curam\ws\EvidenceCreateWS\EvidenceCreateEvidenceType.xsd 
                  " />
      <xs:include 
        schemaLocation=
        "
                   curam\ws\EvidenceCreateWS\EvidenceCreateResponse.xsd 
                  " />
      <xs:complexType name="CreateEvidenceRootType">
          <xs:sequence>
            <xs:element name="evidence"
              type="ce:EvidenceCreateEvidenceType" minOccurs="0"/>
            <xs:element name="response"
              type="ce:EvidenceCreateResponse" minOccurs="0"/>
          </xs:sequence>
      </xs:complexType>
      </xs:schema>
  5. Refresh the CuramWebService library to see CreateEvidenceRootType.xsd