2
잘 작동하는 Wslite 플러그인을 사용하는 SOAP 클라이언트가 있지만 매개 변수가 가장 좋은 방법으로 전송되지 않습니다.그레이즈 SOAP 클라이언트 WSLITE 매개 변수
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)"
}
웹 서비스는 전송 매개 변수없이 예외가 발생합니다.
내가 뭘 잘못하고 있니? :(
감사