locked
WSDL2Java Issues (+ Maven/CXF) RRS feed

  • Question

  • Hello all,

    I am trying to use Apache's CXF codegen plugin for Maven to do the WSDL2Java code generation for the Bing Ads API.  I am having 2 issues-

    1. The code generation for the ReportingService and BulkService seemed to go fine, but when I tried to get the reporting service code working, I ran into an issue.  I can't seem to find the BasicHttpBinding_IReportingServiceStub class or the ReportingServiceLocator class.

    What am I doing wrong?  I tried to use this instead, but I wasn't able to set headers for the tokens, IDs, etc.

    IReportingService service = new ReportingService().getBasicHttpBindingIReportingService();

    2. When trying to run the codegen for the CustomerManagementService, I get a naming collision that seems to be caused by these two entities:

    <xs:element name="ClientLinkStatus" nillable="true" type="tns:ClientLinkStatus" />
    
    <xs:element minOccurs="0" name="Status" nillable="true" type="tns:ClientLinkStatus" />

    I read a few things that said this might be fixable with an external bindings file.  I am very new to this WSDL2Java thing, so any help on this would really be appreciated.

    Thank you!

    Tuesday, December 2, 2014 2:19 PM

Answers

  • Hello.

    For Axis we have guidance on using WSDL2Java here in case the comparison helps:
    http://msdn.microsoft.com/en-US/library/bing-ads-overview-getting-started-java-with-web-services.aspx. 

    Also note that we are planning to introduce a Java SDK in early 2015, and you won't have to run WSDL2Java. Please check back at the developer blog for more details e.g. January. 

    In the meantime you might evaluate some other solutions instead of wsdl2java e.g. wsimport as mentioned here:
    http://stackoverflow.com/questions/8211668/wsimport-how-to-generate-service-endpoint-classes-and-jaxb-classes-in-seperate

    Best regards,
    Eric

    Tuesday, December 9, 2014 4:48 PM