HTTP アダプタを作成し、SOAP リクエストを呼び出そうとしています。しかし、次のエラーが発生します。
{
"errors": [
"White spaces are required between publicId and systemId.",
"Failed to parse the payload from backend (procedure: HttpRequest)"
],
"info": [
],
"isSuccessful": false,
"responseHeaders": {
"Content-Length": "1164",
"Content-Type": "text\/html; charset=UTF-8",
"Date": "Mon, 06 Apr 2015 22:16:54 GMT",
"X-Powered-By": "Servlet\/2.5 JSP\/2.1"
},
"responseTime": 869,
"statusCode": 404,
"statusReason": "Not Found",
"totalTime": 910,
"warnings": [
]
}
SOAP UI でリクエストをテストしたところ、正しい値が得られました。
**注: この wsdl は、基本サービスを使用して Oracle Customer Care & Billing Product から自動生成されます。**
ここにリクエストを貼り付けます: http://9.113.129.21:7500/ouaf/XAIApp/xaiserver/CM_GETCURRENTBILL
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cm="http://oracle.com/CM_GETCURRENTBILL.xsd">
<soapenv:Header/>
<soapenv:Body>
<cm:CM_GETCURRENTBILL dateTimeTagFormat="xsd">
<!--Optional:-->
<cm:zone>CM-GETBILCNT</cm:zone>
<!--Optional:-->
<cm:accountId>?</cm:accountId>
<!--Zero or more repetitions:-->
<cm:results>
<!--Optional:-->
<cm:billId>?</cm:billId>
</cm:results>
</cm:CM_GETCURRENTBILL>
</soapenv:Body>
</soapenv:Envelope>
SOAP UI から実行しているときに、Adapter.xml で指定したユーザー名とパスワードを指定する必要があります。
<wl:adapter name="DemoHTTPwithAuthAdapter"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wl="http://www.ibm.com/mfp/integration"
xmlns:http="http://www.ibm.com/mfp/integration/http">
<displayName>DemoHTTPwithAuthAdapter</displayName>
<description>DemoHTTPwithAuthAdapter</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>http</protocol>
<domain>9.113.129.21</domain>
<port>7500</port>
<connectionTimeoutInMilliseconds>30000</connectionTimeoutInMilliseconds>
<socketTimeoutInMilliseconds>30000</socketTimeoutInMilliseconds>
<authentication>
<basic />
<serverIdentity>
<username>TESTER</username>
<password>ibmindia#$</password>
</serverIdentity>
</authentication>
<maxConcurrentConnectionsPerNode>50</maxConcurrentConnectionsPerNode>
<!-- Following properties used by adapter's key manager for choosing specific certificate from key store
<sslCertificateAlias></sslCertificateAlias>
<sslCertificatePassword></sslCertificatePassword>
-->
</connectionPolicy>
</connectivity>
<procedure name="CM_GETCURRENTBILLService"/>
</wl:adapter>
また、ここに私の adpater-impl.js ファイルがあります。
function CM_GETCURRENTBILLService(accountId) {
var soapRequest = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cm="http://oracle.com/CM_GETCURRENTBILL.xsd">'
+'<soapenv:Header/>'
+'<soapenv:Body>'
+'<cm:CM_GETCURRENTBILL dateTimeTagFormat="xsd">'
+ '<!--Optional:-->'
+'<cm:zone>CM-GETBILCNT</cm:zone>'
+'<!--Optional:-->'
+'<cm:accountId>'+accountId+'</cm:accountId>'
+'<!--Zero or more repetitions:-->'
+'<cm:results>'
+'<!--Optional:-->'
+'<cm:billId></cm:billId>'
+'</cm:results>'
+'</cm:CM_GETCURRENTBILL>'
+'</soapenv:Body>'
+'</soapenv:Envelope>';
var path="http://oracle.com/CM_GETCURRENTBILL.xsd";
var input = {
method : 'post',
returnedContentType : 'xml',
path : path,
headers : {
'SOAPAction' : 'http://oracle.com/CM_GETCURRENTBILL.xsd/CM_GETCURRENTBILL'
},
body : {
content : soapRequest,
contentType : 'text/xml; charset=utf-8'
}
};
return WL.Server.invokeHttp(input);
}