iSeries' wsdl2ws is buggy

Commercial software packages that are based on open source components often have a hard time following the release cycles of their underlying components. Basically this means you end up using the 'previous version' without the latest fixes and enhancements.

IBM has a product called IBM Web Services Client for C/C++ for its iSeries platform (aka AS/400). Version 1.1 of this product is based on Apache Software Foundation's Axis C++ version 1.5.

The wsdl2ws tool, included in Axis C++, generates different types of wrapper classes/skeletons for the client and/or server side for a given WSDL file. You give it a WSDL file and it spits out C or C++ code.

It turns out that the iSeries version of wsdl2ws is suffering from a nasty bug where no code gets generated for attributes of a parent type.

If you have the following in your WSDL file:

<s:complexType name="Parent" abstract="true">
  <s:attribute name="ParentAttribute" type="s:int"/>
</s:complexType>
<s:complexType name="Child">
  <s:complexContent mixed="false">
    <s:extension base="tns:Parent">
      <s:attribute name="ChildAttribute" type="s:string"/>
    </s:extension>
  </s:complexContent>
</s:complexType>

Then the wsdl2ws tool on iSeries (based on Axis C++ 1.5) generates the following C client source code for the Child type:

typedef struct ChildTag {
  xsdc__string ChildAttribute;
} Child;

The Child struct does not have any code for the ParentAttribute of the parent type. This means trouble!

The wsdl2ws tool of the latest (beta) version of Axis C++ 1.6 generates correct C client source code for the Child type:

typedef struct ChildTag {
  xsdc__int ParentAttribute;
  xsdc__string ChildAttribute;
} Child;

The problem does not occur when the parent type uses child elements instead of attributes.

PS: I haven't tested the generation of C++ source code because it is much harder to call C++ code from RPG.

Topic: 

Add new comment