[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ask for Favor: wsdl2rpg.sh



Thank you Tim and Michael for your help. It is interesting to see what IBM does. Basically they do what I had in mind, too. They change a simple type with attributes to a complex type and add the attributes as child elements to the complex type. In order to avoid duplicate names, IBM adds "_value" to the original name whereas I considered to add a prefix to the attributes:

  D Email_t         DS                  qualified template
  D isNil_Email_t                  1n
  D type                                likeds(xsd_string)
  D disabled                            likeds(xsd_boolean)
  D format                              likeds(xsd_string)
  D public                              likeds(xsd_int)
  D comment                             likeds(xsd_anyType)
  D Email_value                         likeds(xsd_string)

The original name "Email" has been changed to "Email_value".

For complex types no special changes take place. The attributes are just added as child elements:

  D Person_t        DS                  qualified template
  D isNil_Person_t                 1n
  D gender                              likeds(xsd_string)
  D vip                                 likeds(xsd_boolean)
  D aliases                             likeds(Alias_Array_t)
  D city                                likeds(xsd_string)
  D firstname                           likeds(xsd_string)
  D lastname                            likeds(xsd_string)
  D email                               likeds(Email_Array_t)

Thanks,

Thomas.


Am 07.10.2013 18:17, schrieb Timo Casaluci:
    Hi Thomas,


    I've attached the generated stubs.


    Regards,


    Timo

    2013/10/6 Thomas Raddatz <[1]thomas.raddatz@xxxxxxxxxxx>

      Hi,
      Is there someone who wants to do me a favor? I am looking for
      somebody who has IBM's wsdl2rpg.sh on his System i and who is
      willing to generate a client from the attached wsdl file for me.
      I consider to enhance my WSDL2RPG to support attributes and I like
      to know how IBM's utility handles attributes.
      Sure I know that I could handle attributes of XML complex types the
      same as their child elements. Of course I could change a XML simple
      type to a complex type in order to add the attributes. But for the
      simple types that means that I get a new complex type for each
      simple type that has attributes. Example of a simple type with
      attributes:
      <xs:complexType name="Email">
       <xs:simpleContent>
        <xs:extension base="xs:string">
         <xs:attribute name="type" type="xs:string" use="required"/>
         <xs:attribute name="disabled" type="xs:boolean" use="optional"/>
         <xs:attribute name="format" type="xs:string"
      default="ax1:EmailFormat"/>
         <xs:attribute name="public" type="xs:int" fixed="1"/>
         <xs:attribute name="comment" />
        </xs:extension>
       </xs:simpleContent>
      </xs:complexType>
      D Email_t...
      D                 DS                 template
      D  type                       128A
      D  disabled                      N
      D  format                     128A
      D  public                      10I 0 inz(1)
      D  comment                    128A
      Now I am curious to see what IBM does.
      Thank you for your help.
      Thomas.
      --------------------------------------------------------------------
      ---
      This is the FTPAPI mailing list.  To unsubscribe, please go to:
      [2]http://www.scottklement.com/mailman/listinfo/ftpapi
      --------------------------------------------------------------------
      ---

References

    1. mailto:thomas.raddatz@xxxxxxxxxxx
    2. http://www.scottklement.com/mailman/listinfo/ftpapi



-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------