locked
Problem Using WSDL2Java to generate Java Code For adCenter API Version 4 RRS feed

  • Question

  • When using org.apache.axis.wsdl.WSDL2Java to generate Java code for the MSN Adcenter 4 API, we get both a MediumType and a MediumtypeNull class generated.  The MediumType class is referenced from the generated AdCenterOrder class in the constructor, the getMedium(), and the setMedium() methods.  However, this method is empty, while the MediatypeNull class contains the "None", "Search", and "Content" possible values.

    It appears that this issue is related to an Axis bug where WSDL2Java doesn't properly generate code for schema <list> enumerations.  See https://issues.apache.org/jira/browse/AXIS-66 for more info.

    Here's the associated XML in the WSDL that is causing the problem:

    Code Snippet

         <s:simpleType name="MediumType">
            <s:list>
              <s:simpleType>
                <s:restriction base="s:string">
                  <s:enumeration value="None" />
                  <s:enumeration value="Search" />
                  <s:enumeration value="Content" />
                </s:restriction>
              </s:simpleType>
            </s:list>
          </s:simpleType>



    We're currently using the WSDL2Java that comes with Axis 1.2RC2 to generate our code.  Has anyone been successful at using WSDL2Java to generate code for the version 4 API?  If so, what version of Axis are you using?

    Would you folks at Microsoft consider updating the API to not use the list enumeration in order to allow the API to be easily used by Axis users?  This appears to be the only place in the API where the list enumeration is used.
    Thursday, June 14, 2007 4:48 AM

Answers

  • Mark,

    We tested our samples using Axis 1.4. Hope this helps.

    Jeff Dillon, Microsoft adCenter API Technical Support
    Thursday, June 14, 2007 2:10 PM

All replies

  • Mark,

    We tested our samples using Axis 1.4. Hope this helps.

    Jeff Dillon, Microsoft adCenter API Technical Support
    Thursday, June 14, 2007 2:10 PM
  • Mark,

    I got the same issues with Axis 1.2RC2 and I have no desire to upgrade to 1.4 knowing that it will likely break with Google's API.

    Apart from modifying theCampaignManagement WSDL, did you find a workaround?

    Henri
    Wednesday, June 27, 2007 11:36 PM