Book a Demo

Author Topic: WSDL generation with few schemas  (Read 3279 times)

darkled

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
WSDL generation with few schemas
« on: October 02, 2013, 10:07:27 pm »
Hi all,

Enterprise Architect is used to model WSDLnamespace and generate from it an actual wsdl file. There is a WSDLnamespace and the actual problem is to put all types from XSDschema into a separate file and import it according to the web-services specification like this:
Code: [Select]
<wsdl:types>
    <xs:schema targetNamespace="http://dummyNamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:tns="http://dummyNamespace">
        <xs:import namespace="http://dummyNamespace/ns" schemaLocation="./ns-schema.xsd" />
    </xs:schema>
</wsdl:types>

but the actual wsdl output is:
Code: [Select]
<wsdl:import namespace="http://dummyNamespace/ns" location="ns-schema.xsd"/>
<wsdl:types>...</wsdl:types>

Could someone give a hint me, please??

thanks in advance.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: WSDL generation with few schemas
« Reply #1 on: October 03, 2013, 01:55:45 am »
When I was working with WSDL some year ago the solution was to write our own exporter. With scripting this is quite easy and you are flexible in what you can do.

q.

darkled

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: WSDL generation with few schemas
« Reply #2 on: October 03, 2013, 07:33:40 pm »
Quote
With scripting this is quite easy and you are flexible in what you can do.
Hi qwerty,

thanks for your answer, could you, please, show me some direction where I could start the search in order to get some information how such exporter can work be implemented?

Thanks in advance.
« Last Edit: October 04, 2013, 01:35:37 am by darkled »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: WSDL generation with few schemas
« Reply #3 on: October 04, 2013, 06:37:19 am »
In principle it's like:
- find located element (in browser) e.g. by Repository.GetTreeSelectedObject
- Create one (or more) output file(s) depending on what you need to generate
- read the class information, tags, connectors
- write the XML simply as text (I never needed some XML parser object for that)

It took me less than a day to write such an exporter from scratch. Of course if you are a rookie with EA's API it will take longer ;)

q.
« Last Edit: October 04, 2013, 06:37:37 am by qwerty »