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

 


Help: OASIS Mailing Lists Help | MarkMail Help

unitsml message

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


Subject: Addition to conversion options


In the teleconference I took on the responsibility of adding an additional conversion option to the schema - a WSDLConversionFrom option. After looking into this, and assuming that it would be a parser (or other automated processing) that would use this feature, the following is what I came up with that would need to be added to the current (0.9.11) schema.

1) Insert another option in the Conversions Sequence

<xsd:complexType name="ConversionsType">
<xsd:annotation>
<xsd:documentation>Type for the container for providing conversion information to other units.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element ref="Float64ConversionFrom" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>Element for providing factors for a conversion equation from another unit; y = d + ((b / c) (x + a)). Note: The related "conversion to" equation is a simple inversion of the above equation; i.e., x = ((c / b) (y - d)) - a.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="SpecialConversionFrom" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>Element for describing a conversion that cannot be described by the linear expression in the element Float64ConversionFrom.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="WSDLConversionFrom" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>Element for providing conversion based on SOAP/WSDL calls to a remote server.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

2) Add a new element definition after SpecialConversionFrom

<xsd:element name="WSDLConversionFrom" type="WSDLConversionFromType">
<xsd:annotation>
<xsd:documentation>Element for providing conversion based on SOAP/WSDL calls to a remote server.</xsd:documentation>
</xsd:annotation>
</xsd:element>


3) Add a a new complexType definition after SpecialConversionFrom


<xsd:complexType name="WSDLConversionFromType">
<xsd:annotation>
<xsd:documentation>Type for the element for providing unit conversion information for conversions that are more complex than the Float64ConversionFrom linear equation.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element ref="ConversionDescription" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>Description of the conversion.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="ServiceMethod" minOccurs="1" maxOccurs="1" type="xsd:string">
<xsd:annotation>
<xsd:documentation>The name of the method on the WSDL service that will do the conversion.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="MethodParameter" minOccurs="1" maxOccurs="unbounded" type="xsd:string">
<xsd:annotation>
<xsd:documentation>The name of the method on the WSDL service that will do the conversion.</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="ID" type="xsd:token">
<xsd:annotation>
<xsd:documentation>Allows reference to this conversion.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="WSDLURI" type="xsd:anyURI" use="required">
<xsd:annotation>
<xsd:documentation>URI for external WSDL definition file.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="WSDLMethod" use="required">
<xsd:annotation>
<xsd:documentation>URI for external WSDL definition file.</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:token">
<xsd:enumeration value="soap"/>
<xsd:enumeration value="get"/>
</xsd:restriction>
</simpleType>
</xsd:attribute>
</xsd:complexType>


An example might look like this

<Conversions>
    <WSDLConversionFrom id="wsdl1" WSDLURI="http://www.somewebsite.com/converter/wsdl" WSDLMethod="soap">
        <ServiceMethod>convertUnit</ServiceMethod>
        <MethodParameter name="inputValue">82</MethodParameter>
        <MethodParameter name="inputUnit"C</MethodParameter>
        <MethodParameter name="outputUnit">K</MethodParameter>
    </WSDLConversionFrom>
</Conversions>

The WSDL Method attribute tells the parser wether to generate a SOAP request or an HTTP GET request to perform the service.

As I have been working on this I have not had chance to 1) write up my comments on the guideline document or scan the schema for other elements that need to have the language added to them.  I will work on those for the next meeting.

Stuart


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