OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

trans-ws message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: First draft of WSDL






All,

attached is the first draft of the WSDL description of the Trans-WS web
service.  At present, I've only provided the querySupport operation.  In
reality, this is probably going to be the most difficult one to get right,
so if we can sort this, then the rest should be relatively straightforward.

Please ignore the namespaces (http://simship2.com) for the moment - this is
just for development purposes.  I'll provide a more OASIS-centric namespace
before too long - probably something along the lines of
"http://xmlsoap.org/ws/2003/12/transws/";.  Does anybody have any objection
to that?  Also, does anybody know are there restrictions around using
xmlsoap.org as the base URL?

As can be seen here, the schema is the largest part of the WSDL document.
This should probably be removed from the WSDL, and placed in its own
document, with its own namespace - possibly
"http://schemas.xmlsoap.org/ws/2003/12/transws/";.

The querySupport operation returns four types of data (as per the latest
version of Bill's document, written up after the face-to-face in May):
      languages
      services
      fileTypes
      domains

Of these, services and domains may have subservices and subdomains as
subordinate elements (I have included a sample conversation at the end).

Probably the most unsatisfactory aspect of this first draft is that all of
the base elements are of type xsd:string.  Ideally, we should be referring
to a specific XML schema that corresponds to the namespace of the RFC or
encoding scheme that we are using.  To illustrate what I mean here, look at
the domain element.  In a typical response from the web service, this might
be:

  <domains>
    <domain name="Arts and Humanities">
      <subdomain name="Architecture"/>
    </domain>
  </domains>

These are the first domain and subdomain provided in the ATA list that we
agreed on.  However, this could just as well be the following:

  <domains>
    <domain name="Fruit and Veg">
      <subdomain name="Cabbages"/>
    </domain>
  </domains>

This portion of the response is 100% compliant with the WSDL.  Obviously,
it's meaningless in the context of localisation/translation.  So, really,
we need a namespace with the allowable options enumerated.  Does anybody
know if such a thing exists for the ATA list.

The same basic problem is present for the languages and filetypes.
However, it's not so acute here, as at least we have a standard encoding
mechanism (RFC3066 & RFC1341 respectively).  Again, we need an XML
namespace corresponding to those RFCs to really control the response
properly.

With service types, we don't have an encoding mechanism, as its a list that
we have defined ourselves, but the same issue applies here as well.

A final point about the WSDL.  I have chosen the doc/literal type of
encoding, rather than RPC.  This appears to be the preferred approach at
the moment, as it allows the schema in the WSDL to be drawn directly from a
standard XML schema (which is exactly what I did in developing the WSDL
below).  For those interested, refer to:
http://www.rassoc.com/gregr/weblog/archive.aspx?post=465 for discussion on
the topic.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://simship2.com";
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
                  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
                  xmlns:intf="http://simship2.com";
                  xmlns:impl="http://simship2.com";
                  xmlns:apachesoap="http://xml.apache.org/xml-soap";
                  xmlns="http://schemas.xmlsoap.org/wsdl/";>
      <wsdl:types>
            <schema elementFormDefault="qualified"
                    targetNamespace="http://simship2.com";
                    xmlns="http://www.w3.org/2001/XMLSchema";>
                  <element name="querySupport">
                        <complexType>
                              <sequence />
                        </complexType>
                  </element>

                  <element name="domain">
                        <complexType>
                              <sequence>
                                    <element maxOccurs="unbounded"
minOccurs="0" ref="intf:subdomain" />
                              </sequence>
                              <attribute name="name" type="string" use=
"required" />
                        </complexType>
                  </element>
                  <element name="domains">
                        <complexType>
                              <sequence>
                                    <element maxOccurs="unbounded"
minOccurs="1" ref="intf:domain" />
                              </sequence>
                        </complexType>
                  </element>
                  <element name="fileType">
                        <complexType>
                              <attribute name="name" type="string" use=
"required" />
                        </complexType>
                  </element>
                  <element name="fileTypes">
                        <complexType>
                              <sequence>
                                    <element maxOccurs="unbounded"
minOccurs="1" ref="intf:fileType" />
                              </sequence>
                        </complexType>
                  </element>
                  <element name="language">
                        <complexType>
                              <attribute name="source" type="string" use=
"required" />
                              <attribute name="target" type="string" use=
"required" />
                        </complexType>
                  </element>
                  <element name="languages">
                        <complexType>
                              <sequence>
                                    <element maxOccurs="unbounded"
minOccurs="1" ref="intf:language" />
                              </sequence>
                        </complexType>
                  </element>
                  <element name="querySupportResponse">
                        <complexType>
                              <sequence>
                                    <element ref="intf:languages" />
                                    <element ref="intf:services" />
                                    <element ref="intf:fileTypes" />
                                    <element ref="intf:domains" />
                              </sequence>
                        </complexType>
                  </element>
                  <element name="service">
                        <complexType>
                              <sequence>
                                    <element maxOccurs="unbounded"
minOccurs="0" ref="intf:subservice" />
                              </sequence>
                              <attribute name="name" type="string" use=
"required" />
                        </complexType>
                  </element>
                  <element name="services">
                        <complexType>
                              <sequence>
                                    <element maxOccurs="unbounded"
minOccurs="1" ref="intf:service" />
                              </sequence>
                        </complexType>
                  </element>
                  <element name="subdomain">
                        <complexType>
                              <attribute name="name" type="string" use=
"required" />
                        </complexType>
                  </element>
                  <element name="subservice">
                        <complexType>
                              <attribute name="name" type="string" use=
"required" />
                        </complexType>
                  </element>
            </schema>
      </wsdl:types>
      <wsdl:message name="querySupportRequest">
            <wsdl:part name="parameters" element="intf:querySupport" />
      </wsdl:message>
      <wsdl:message name="querySupportResponse">
            <wsdl:part name="parameters" element=
"intf:querySupportResponse" />
      </wsdl:message>
      <wsdl:portType name="TransWS">
            <wsdl:operation name="querySupport">
                  <wsdl:input name="querySupportRequest" message=
"intf:querySupportRequest" />
                  <wsdl:output name="querySupportResponse" message=
"intf:querySupportResponse" />
            </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="TransWSSoapBinding" type="intf:TransWS">
            <wsdlsoap:binding style="document" transport=
"http://schemas.xmlsoap.org/soap/http"; />
            <wsdl:operation name="querySupport">
                  <wsdlsoap:operation soapAction="" />
                  <wsdl:input name="querySupportRequest">
                        <wsdlsoap:body use="literal" />
                  </wsdl:input>
                  <wsdl:output name="querySupportResponse">
                        <wsdlsoap:body use="literal" />
                  </wsdl:output>
            </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="TransWSService">
            <wsdl:port name="TransWS" binding="intf:TransWSSoapBinding">
                  <wsdlsoap:address location=
"http://localhost:9080/TransWSWeb/services/TransWS"; />
            </wsdl:port>
      </wsdl:service>
</wsdl:definitions>

This is an example of the conversation that happens with this web service.
First the query:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=
"http://schemas.xmlsoap.org/soap/envelope/";
                   xmlns:q0="http://simship2.com";
                   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
      <SOAP-ENV:Body>
            <q0:querySupport />
      </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Then the response:

<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
      <soapenv:Body>
            <querySupportResponse xmlns="http://simship2.com";>
                  <languages>
                        <language source="en" target="fr" />
                        <language source="en" target="de" />
                  </languages>
                  <services>
                        <service name="Engineering">
                              <subservice name="L10n kit preparaion" />
                              <subservice name="Software scope assessment"
/>
                              <subservice name="Pre-production i18n code
review" />
                              <subservice name="Localizability review" />
                        </service>
                        <service name="Administration" />
                        <service name="Build" />
                        <service name="Quality Assurance" />
                        <service name="Translation" />
                        <service name="Online Help" />
                        <service name="Documentation" />
                  </services>
                  <fileTypes>
                        <fileType name="text/xml" />
                        <fileType name="doc/pdf" />
                  </fileTypes>
                  <domains>
                        <domain name="Arts and Humanities">
                              <subdomain name="Architecture" />
                              <subdomain name="Art" />
                        </domain>
                        <domain name="Business" />
                        <domain name="Computers">
                              <subdomain name="Computer hardware" />
                              <subdomain name="Computer systems analysis"
/>
                        </domain>
                        <domain name="Engineering" />
                        <domain name="Entertainment" />
                        <domain name="Industry & Technology" />
                        <domain name="Law" />
                        <domain name="Medicine" />
                        <domain name="Natural Sciences" />
                        <domain name="Pure Sciences" />
                        <domain name="Social Sciences" />
                  </domains>
            </querySupportResponse>
      </soapenv:Body>
</soapenv:Envelope>

On the issue of the structure of the response, I have taken the approach of
using attributes to store the information, rather than the element itself.
For example:

  <language source="en" target="fr"/>

Another option would be:

  <language>
    <source>en</source>
    <target>fr</target>
  </language

The first tends to be more compact, but some schema designers have a
preference for the second approach.

I have implemented this web service in WebSphere Studio Application
Developer v5.1 in Java, so I can confirm that it works on that platform at
least.  I'd love some feedback as to whether it works on other platforms,
particularly .NET.  To implement this locally you'll have to change the
location attribute of this line:

                  <wsdlsoap:address location=
"http://localhost:9080/TransWSWeb/services/TransWS"; />

to the URL of the listening web service.

I'm happy to share my Java classes, if anybody wants to play around with
this themselves, but if you're not running WSAD you'll have to do the
mapping from the WSDL to the classes yourself.

FYI, I'm pretty busy next week (including the LRC conference), so I don't
think that I'll be able to make a huge amount more progress than this.
However, if we can get this part of the WSDL sorted, the rest should follow
without too many problems (I hope).

Debate, comment, criticism welcome on all of the points raised above.

Steve

  ---------------------------------------------
  Stephen Flinter
  Connect Global Solutions
  [t] +353 (0)1 882 9038
  [f] +353 (0)1 882 9050
  [m] +353 87 798 1228
  [e] stephen.flinter@connectcgs.com
  [w] www.connectcgs.com
  --------------------------------------------



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]