GroovyWS and complex requests

前端 未结 3 1768
天涯浪人
天涯浪人 2020-12-30 11:22

I\'ve faced with a problem of sending complex requests with GroovyWS.

This is sample request generated by soapUI:



        
3条回答
  •  南方客
    南方客 (楼主)
    2020-12-30 12:00

    Many thanks Bill.

    I just want to add some info for future readers.

    To turn on logging for GroovyWS in Grails:

    log4j = {
       debug 'grails.app',
             'groovyx.net.ws',
             'org.apache.cxf'
    }
    

    With this as mentioned Bill you can see the names of the classes.


    One more thing: parameters may have different type. Not List. That's why it should be created too.

    def params = proxy.create('com.temp.feeds.FeedRequestType$Parameters');
    

    To retrieve available methods and fields for newly created objects you can use Groovy reflection:

    params.class.methods.each{
            println it;
    }
    params.class.fields.each{
            println it;
    }
    

    That's all!

    -vova

提交回复
热议问题