Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support in SOAPClient for using XMLs built with 'mkp.yield' #141

Open
agseco opened this issue Jun 20, 2017 · 0 comments
Open

Support in SOAPClient for using XMLs built with 'mkp.yield' #141

agseco opened this issue Jun 20, 2017 · 0 comments

Comments

@agseco
Copy link

agseco commented Jun 20, 2017

This allows to modularise XMLs generation, for instance breaking down each XML part into a different method and then putting all the parts together with mkp.yield.

For illustration purposes:

def response = client.send {
    body {
        CoreQuery {
            mkp.yield this.buildCoreQueryElement(ctx)
        }
    }
}
def buildCoreQueryElement(ctx) {
    return {
        ElementA('Some content')
    }
}

Currently this approach won't work because the XML serialisation to String performed in SOAPMessageBuilder is carried out using groovy.xml.MarkupBuilder; groovy.xml.StreamingMarkupBuilder could be used instead, as in RESTClient.

agseco pushed a commit to caravelo/groovy-wslite that referenced this issue Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant