我使用了 IBM MobileFirst Studio V7.1 - 服务发现向导选项并从应用程序 WSDL 文件创建了一个 SOAP 适配器。服务发现过程在 MFP Studio 中正确创建 MobileFirst 适配器
消息负载如下所示
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://siebel.com/CustomUI">
<soapenv:Header>
<ns1:Security soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="http://schemas.xmlsoap.org/ws/2002/07/secext">
<ns1:UsernameToken>
<ns1:Username>IBM</ns1:Username>
<ns1:Password>IBM</ns1:Password>
</ns1:UsernameToken>
</ns1:Security>
</soapenv:Header>
<soapenv:Body>
<cus:QueryJobDetails_Input>
<cus:Object_spcId>SURV0332</cus:Object_spcId>
</cus:QueryJobDetails_Input>
</soapenv:Body>
</soapenv:Envelope>
现在,使用 MobileFirst Studio 中的适配器测试选项,以下 JSON 有效负载正在对话窗口中传递
过程参数
参数:
{"QueryJobDetails_Input":{"Object_spcId":"SURV0332"}}
标题:
{"UsernameToken":{"Username":"IBM","Password":"IBM"}}
但是当适配器执行时出现以下错误
{
"errors": [
"Class Cast: com.worklight.common.js.util.JSObjectConverter$1 cannot be cast to java.lang.String"
],
"info": [
],
"isSuccessful": false,
"warnings": [
]
}
WS Security Header 块是否以正确的格式传递?
谢谢