Forum Discussion

sarath12121991's avatar
sarath12121991
Occasional Visitor
9 years ago

How to generate NTLM based rest project to java in soapui

Basically i can able to successfully excute a rest url using ntlm based authentication, is it possible to generate java code for this working project using wadl2java option in soapui

1 Reply

  • rupert_anderson's avatar
    rupert_anderson
    Valued Contributor

    Hi,

     

    Where you say generate java code, I take it you mean generate java service skeleton code based on your WADL definition? 

     

    There is an option in SoapUI to generate code from a WADL i.e. described at

     

    http://www.soapui.org/rest-testing/code-generation.html

     

    But, SoapUI's wadl2java option seems to be intended to wrap the classic wadl2java i.e. the one at this link https://wadl.java.net/, which is pretty old and only generates java client code based on the WADL. 

     

    I rarely find myself working with WADL defined services these days, but if I were then I would use the Apache CXF wadl2java option - see http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-wadl2javacommandlinetool

     

    This CXF based approach definately works, as I covered in in a recipe in the first chapter of my book. You just need to download Apache CXF, and then you can run the bundled wadl2java command against your WADL to generate a JAX-RS interface and skeleton implementation for your service.

     

    Hope this helps,

    Cheers,

    Rupert