我有一个xml,我试图通过wslite发送到我的服务。我的服务端点,我们称之为https://development.net/InquiryService
现在,当我通过soapUI发送以下调用时,我得到了正确的响应
<soapenv:Envelope //my header information>
<soapenv:Header>
<wsec:Security>
<wsec:PartnerToken>
<wsec:PartnerId>xxxx</wsec:PartnerId>
<wsec:Password>yyyy</wsec:Password>
</wsec:PartnerToken>
</wsec:Security>
</soapenv:Header>
<soapenv:Body>
<acc:retrieveUserAccount>
<acc:SystemInfo>
<sys:ServiceContext>
<sys:transactionId>123</sys:transactionId>
<sys:sourceLogicalId>zzzz</sys:sourceLogicalId>
</sys:ServiceContext>
</acc:SystemInfo>
<acc:accessRegistration>
<acc1:userId>xxxx</acc1:userId>
</acc:accessRegistration>
</acc:retrieveUserAccount>
</soapenv:Body>
</soapenv:Envelope>
当我通过grails发送服务请求时,使用
withSoap(serviceURL:"https://development.net/InquiryService"){
def response = send {
serviceRequest
}
}
我得到wslite.soap.SOAPFaultException: env:Client - Internal Error
我已经验证了xml完全相同,所以我不确定为什么这不起作用。
我认为问题是我需要在某处添加我的wsdl,但在哪里?
答案 0 :(得分:0)
如果serviceRequest
变量是String,则以下内容应该有效:
def response = send(serviceRequest)
大括号会导致它将一个闭包传递给send
,如果serviceRequest
是一个你不希望发生的字符串。