Book a Demo

Author Topic: include imported xsd inline in the generated wsdl  (Read 4915 times)

haydn parker

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
include imported xsd inline in the generated wsdl
« on: November 09, 2009, 07:06:56 pm »
When I import an xml schema from a file into the types of a wsdl package an XSDComplexType is created. When I generate the wsdl an import tag is created.
<wsdl:import namespace="http://www.exampleURI.com/WSDLRoles" location="d:\Documents and Settings\hparker\My Documents\EA\ArrayOfstring.xsd"/>
This causes problems. I want to get rid of the import tag and include the complextype ArrayOfstrings inline in the schema without having to manually edit the wsdl after each change. Any ideas?

haydn parker

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: include imported xsd inline in the generated w
« Reply #1 on: November 10, 2009, 03:31:22 am »
ok 1 step further. The inlining is no problem. When you import an xsd to the wsdl Types folder it creates a subfolder containing the complex type. If you drag the complex type object up into the types folder it will be generated inline. However, I now have the problem that that which is generated is not that which was imported.
IMPORTED
      <xs:complexType name="ArrayOfstring">
        <xs:complexContent>
          <xs:restriction base="soapenc:Array">
            <xs:sequence>
              <xs:element name="item" type="xs:string" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
            </xs:sequence>
            <xs:attribute ref="soapenc:arrayType" wsdl:arrayType="xs:string[]"/>
          </xs:restriction>
        </xs:complexContent>
      </xs:complexType>
GENERATED
  <xs:complexType name="ArrayOfstring">
    <xs:complexContent>
      <xs:extension base="soapenc:Array">
        <xs:sequence>
          <xs:element name="item" type="xs:string" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
        </xs:sequence>
        <xs:attribute name="ext_ref_1" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
and that generates a parse fault. I have tried both manipulating the imported object and creating it from scratch but with  no success.
This is just a simple example but either I'm missing something obvious or, as I begin to suspect, its just not possible.
Has anyone out there done something similar??