正常に動作する Wslite プラグインを備えた SOAP クライアントがありますが、パラメーターが最適な方法で送信されません。
def calcClient(Integer n1, Integer n2) throws Exception {
def response
try {
soapClient.serviceURL = "http://localhost:8080/SISAP/services/sendMail?wsdl"
response = soapClient.send() {
soapNamespacePrefix "soap"
envelopeAttributes "xmlns:util":"http://util.unime.edu.br/"
body {
calc{
//is not the best way
mkp.yieldUnescaped "<util:number1>$n1</util:number1>"
mkp.yieldUnescaped "<util:number2>$n2</util:number2>"
}
}
}
} catch (Exception exception) {
log.error(exception.message)
throw exception
}
println response.body.calculaResponse.return
return
}
正常に動作していますが、試してみると:
calc{
number1(n1)
number2(n2)
}
または
calc{
"util:number1($n1)"
"util:number2($n2)"
}
または
calc{
"{util}number1($n1)"
"{util}number2($n2)"
}
パラメーターが送信されない場合、Web サービスは例外をスローします。
私は何を間違っていますか?:(
ありがとう