I need help with the transformation of my SOAP-request.
In XML my request looks like:
def response = soapClient.send(
"""<soapenv:Envelope xmlns:soapenv="http://ift.tt/sVJIaE"
xmlns:ns="http://someLink/session/1.0"
xmlns:bat="http://anotherLink/types/service"
xmlns:com="http://anotherLink/types/common">
<soapenv:Header>
<ns:someValue>""" + this.someValue + """</ns:someValue>
</soapenv:Header>
<soapenv:Body>
<bat:nameOfRequest>
<com:info version="${this.version}"/>
<bat:myId>${myId}</bat:myId>
</bat:nameOfRequest>
</soapenv:Body>
</soapenv:Envelope>""")
I want to get the Syntax similar to something like this:
def response = soapClient.send(SOAPAction: 'http://anotherLink/types/service/nameOfRequest'){
header{
SessionHeader('xmlns':'http://someLink/session/1.0'){
someValue("${this.someValue}")
}
}
body{
nameOfRequest('xmlns':'http://anotherLink/types/service/'){
info('xlmns':'http://anotherLink/types/common',version:'${this.version}')
myId("${this.myId}")
}
}
I think I am doing something wrong with ne info attribute because I'm getting an Exception which says that there is no signature of method: java.lang.String.call() applicable for argument types (myClosure)
No comments:
Post a Comment