[AWS] ada2wsdl, wsdl2ada, and packages

Marc Criley mc at mckae.com
Wed Jul 11 16:50:04 CEST 2007


On Wed Jul 11  6:31 , Pascal Obry  sent:

>
>Hum... the problem may be because those types are named INTEGER and
>NATURAL. ada2wsdl is probably confused with Standard.Integer and
>Standard.Natural, would be nice to know if this is working when using
>other names.
>

I renamed them to EA_INTEGER and EA_NATURAL and get effectively the same result:

-- ea_assets.ads
with EA_Common;

package EA_Assets is

  type ASSET is record
     ID : Integer;
  end record;

  type ASSET_ARRAY is
    array ( EA_Common.EA_NATURAL range <> ) of ASSET;

  type ASSET_ARRAY_ACCESS is
    access ASSET_ARRAY;

end EA_Assets;

-- ea_assets_io.ads
with EA_External_Interface;
use EA_External_Interface;
with EA_Assets;
with EA_Common;

package EA_Assets_IO is

function Get (
   For_The_Thinker : EA_Common.EA_INTEGER;
   Log             : EA_External_Interface.LOGGING_MODE := NONE
) return EA_Assets.ASSET_ARRAY_ACCESS;


end EA_Assets_IO;

-- ea_common.ads
package EA_Common is

  type EA_INTEGER is
    range -2 ** 31 .. 2 ** 31 - 1;
    
  subtype EA_NATURAL is
    EA_INTEGER range 0 .. EA_INTEGER'LAST;

end EA_Common;

-- ea_external_interface.ads
package EA_External_Interface is

   type LOGGING_MODE is (
     NONE,
     APPEND,
     OVERWRITE
   );
end EA_External_Interface;

$ ada2wsdl ea_assets_io.ads -f

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="EA_Assets_IO"
   targetNamespace="http://soapaws/EA_Assets_IO_def/"
   xmlns:tns="http://soapaws/EA_Assets_IO_def/"
   xmlns="http://schemas.xmlsoap.org/wsdl/"
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
   xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:n1="http://soapaws/EA_Common_pkg/"
   xmlns:n2="http://soapaws/EA_External_Interface_pkg/"
   xmlns:n3="http://soapaws/EA_Assets_IO_pkg/">

   <!-- Generated by AWS/Ada2WSDL v1.1
        on Wednesday 11 July 2007 at 09:48:31 -->

   <types>
      <schema xmlns="http://www.w3.org/2000/10/XMLSchema">

         <simpleType name="LOGGING_MODE"
                 targetNamespace="http://soapaws/EA_External_Interface_pkg/">
            <restriction base="xsd:string">
               <enumeration value="NONE"/>
               <enumeration value="APPEND"/>
               <enumeration value="OVERWRITE"/>
            </restriction>
         </simpleType>
      </schema>
   </types>

   <message name="Get_Request">
      <part name="For_The_Thinker" type="n1:EA_Common.EA_INTEGER"/>
      <part name="Log" type="n2:LOGGING_MODE"/>
   </message>

   <message name="Get_Response">
      <part name="Result" type="n3:ASSET_ARRAY_ACCESS"/>
   </message>

   <portType name="EA_Assets_IO_PortType">

      <operation name="Get">
         <input message="tns:Get_Request"/>
         <output message="tns:Get_Response"/>
      </operation>
   </portType>

   <binding name="EA_Assets_IO_Binding" type="tns:EA_Assets_IO_PortType">
      <soap:binding style="rpc"
         transport="http://schemas.xmlsoap.org/soap/http"/>

      <operation name="Get">
         <soap:operation soapAction="Get"/>
         <input>
            <soap:body
               encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
               namespace="http://soapaws/EA_Assets_IO_def/"
               use="encoded"/>
         </input>
         <output>
            <soap:body
               encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
               namespace="http://soapaws/EA_Assets_IO_def/"
               use="encoded"/>
         </output>
      </operation>
   </binding>

   <service name="EA_Assets_IO_Service">
      <port name="EA_Assets_IO_Port" binding="tns:EA_Assets_IO_Binding">
         <soap:address location="http://.../"/>
      </port>
   </service>
</definitions>



More information about the AWS mailing list