AnsweredAssumed Answered

Boomi generates wsdl with duplicate types when the schemas should not could happen. It is causing issues with a customer pulling the wsdl for use through java to run into duplcate type issues when trying to generate stubs either Axis wsdl2java. Thoughts?

Question asked by ahh1 on May 25, 2014
Latest reply on May 27, 2014 by dennis
I have numerous schemas built for use in building profiles for a webservice with three operations.  I am using the webservice server connector.  The xsd's validate correctly, they work when calling the url from SOAPUI and Coldfusion (which uses Axis to generate stubs).  I have rewritten the xsd's numerous times.  The original schema which was used through the Oracle SOA Suite platform generated the wsdl ok.  I have tried to use that schema, then broke the schema into three schemas one for each operation with different namespaces.  I made sure to name any simple or complextypes and reference those using the type attribute on the element tags.  I have tried having those complex types defined outside any element to make them multiuse and also inside their calling elements.  No mater what I do the generated wsdl still generates both an element with an appropriate name but a complex type of that name also.  I am not sure but believe Boomi uses JAXB or JAX-WS to generate the WSDL? I have seen other references on the web regarding this same issue outside of Boomi. I am not sure if I am doing something wrong or Boomi is generating these duplicates and maybe have not heard from anyone trying to pull wsdl and use java libraries like Axis to generate the necessry stubs to call the webservice from Java.  They can manually change the wsdl but they should not have to do this.  

For the example below.  I have tried the schema with the complextype pulled from the enclosing element and named the complesxtype and used the type attribute on the element to refer to that complextypes name and still have the same issue.

Portion of the wsdl fand it's schema:

     <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"          
                                    xmlns:tns="http://www.boomi.com/connector/wss" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="WebServiceProvider"
                                    targetNamespace="http://www.boomi.com/connector/wss">
        <wsdl:types>
          <xs:schema xmlns:tns="http://xmlns.cornell.edu/facilities/search" elementFormDefault="qualified"    
                                 targetNamespace="http://xmlns.cornell.edu/facilities/search" version="1.0">
               <xs:element name="FacilitiesSearchParametersContainer" type="tns:FacilitiesSearchParameters"/>
                <xs:complexType name="FacilitiesSearchParameters">
                    <xs:sequence>
                        <xs:element maxOccurs="1" minOccurs="1" name="facilKywd" type="xs:string"/>
                        <xs:element maxOccurs="1" minOccurs="1" name="searchRange" type="xs:string"/>
                     </xs:sequence>
                  </xs:complexType>
                  <xs:complexType name="FacilitiesSearchParametersContainer">
                     <xs:sequence>
                        <xs:element maxOccurs="1" minOccurs="1" name="facilKywd" type="xs:string"/>
                        <xs:element maxOccurs="1" minOccurs="1" name="searchRange" type="xs:string"/>
                     </xs:sequence>
                     </xs:complexType>
                         <xs:element name="FacilitiesSearchListContainer" type="tns:FacilitiesSearchList"/>
                          <xs:complexType name="FacilitiesSearchList">
                              <xs:sequence>
                                   <xs:element maxOccurs="1" minOccurs="1" name="rc" type="xs:string"/>
                                   <xs:element maxOccurs="1" minOccurs="1" name="rc_message" type="xs:string"/>
                                   <xs:element maxOccurs="1" minOccurs="1" name="facilityCount" type="xs:string"/>
                                   <xs:element maxOccurs="unbounded" minOccurs="0" name="Facility" type="tns:FacilitySearchResults"/>
                              </xs:sequence>
                          </xs:complexType>
                          <xs:complexType name="FacilitySearchResults">
                              <xs:sequence>
                                  <xs:element maxOccurs="1" minOccurs="1" name="facilityCode" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="facilityName" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="facilityShortName" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="facilityAbbrev" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="facilityType" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="facilityLoc" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="cuDirectoryName" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="streetNumber" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="streetName" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="county" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="state" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="zipCode" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="municipality" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="ambulanceJurisdiction" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="policeJurisdiction" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="fireDistrict" type="xs:string"/>
                              </xs:sequence>
                          </xs:complexType>
                          <xs:complexType name="FacilitiesSearchListContainer">
                              <xs:sequence>
                                  <xs:element maxOccurs="1" minOccurs="1" name="rc" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="rc_message" type="xs:string"/>
                                  <xs:element maxOccurs="1" minOccurs="1" name="facilityCount" type="xs:string"/>
                                  <xs:element maxOccurs="unbounded" minOccurs="0" name="Facility" type="tns:FacilitySearchResults"/>
                              </xs:sequence>
                          </xs:complexType>
                      </xs:schema>


     XSD:

          <?xml version="1.0" encoding="windows-1252" ?>
          <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                      xmlns:s="http://xmlns.cornell.edu/facilities/search"
                      targetNamespace="http://xmlns.cornell.edu/facilities/search"
                      elementFormDefault="qualified">
            <xsd:simpleType name="searchTypeValues">
              <xsd:restriction base="xsd:string">
                <xsd:enumeration value="STARTSWITH"/>
                <xsd:enumeration value="ENDSWITH"/>
                <xsd:enumeration value="EQUALS"/>
                <xsd:enumeration value="CONTAINS"/>
              </xsd:restriction>
            </xsd:simpleType>
            <xsd:element name="FacilitiesSearchParametersContainer">
              <xsd:complexType>
                <xsd:sequence>
                  <xsd:element name="facilKywd" type="xsd:string"/>
                  <xsd:element name="searchRange" type="s:searchTypeValues"/>
                </xsd:sequence>
              </xsd:complexType>
            </xsd:element>
            <xsd:element name="FacilitiesSearchResultsContainer"> 
              <complexType>
                <xsd:sequence>
                  <xsd:element name="rc" type="xsd:string">
                    <xsd:annotation>
                      <xsd:documentation>
                         Return code: 0=OK, -1=Auth. issue, -2=Error, -3=Data
                      </xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element name="rc_message" type="xsd:string"/>
                  <xsd:element name="facilityCount" type="xsd:string"/>
                  <xsd:element name="Facility" maxOccurs="unbounded" minOccurs="0">
                    <xsd:complexType>
                      <xsd:sequence>
                        <xsd:element name="facilityCode" nillable="true" type="xsd:string"/>
                        <xsd:element name="facilityName" nillable="true" type="xsd:string"/>
                        <xsd:element name="facilityShortName" nillable="true" type="xsd:string"/>
                        <xsd:element name="facilityAbbrev" nillable="true" type="xsd:string"/>
                        <xsd:element name="facilityType" nillable="true" type="xsd:string"/>
                        <xsd:element name="facilityLoc" nillable="true" type="xsd:string"/>
                        <xsd:element name="cuDirectoryName" nillable="true" type="xsd:string"/>
                        <xsd:element name="streetNumber" nillable="true" type="xsd:string"/>
                        <xsd:element name="streetName" nillable="true" type="xsd:string"/>
                        <xsd:element name="county" nillable="true" type="xsd:string"/>
                        <xsd:element name="state" nillable="true" type="xsd:string"/>
                        <xsd:element name="zipCode" nillable="true" type="xsd:string"/>
                        <xsd:element name="municipality" nillable="true" type="xsd:string"/>
                        <xsd:element name="ambulanceJurisdiction" nillable="true" type="xsd:string"/>
                        <xsd:element name="policeJurisdiction" nillable="true" type="xsd:string"/>
                        <xsd:element name="fireDistrict" nillable="true" type="xsd:string"/>
                      </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                </xsd:sequence>
              </complexType>
            </xsd:element>
          </xsd:schema>
           

Outcomes