SOAP を使用してユーザー情報を取得するために http アダプターを作成しようとしています。
基本認証 (ユーザー名 + パスワード) を追加しないと、この Web サービスにアクセスできません。続行するにはどうすればよいですか?
SoapAdapter.xml
<displayName>SoapAdapter</displayName>
<description>SoapAdapter</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>https</protocol>
<domain>www-304.ibm.com</domain>
<port>443</port>
<connectionTimeoutInMilliseconds>30000</connectionTimeoutInMilliseconds>
<socketTimeoutInMilliseconds>300000</socketTimeoutInMilliseconds>
<maxConcurrentConnectionsPerNode>50</maxConcurrentConnectionsPerNode>
<!-- Following properties used by adapter's key manager for choosing specific certificate from key store
<sslCertificateAlias></sslCertificateAlias>
<sslCertificatePassword></sslCertificatePassword>
-->
</connectionPolicy>
</connectivity>
SoapAdapter-impl.js
function getUserPro() {
var request =
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://www.ibm.com/tools/wse/ws/">
<soapenv:Header/>
<soapenv:Body>
<ws:ws_getUserCustomerOperation>
<ws:RequestedUserDetails>
<userid>my-email-address</userid>
<group>Customer</group>
</ws:RequestedUserDetails>
</ws:ws_getUserCustomerOperation>
</soapenv:Body>
</soapenv:Envelope>;
var input = {
method : 'post',
returnedContentType : 'xml',
headers:{'Content-Type':'text/xml','Authorization':'Basic ' + ('my-email-address:*******')},
path : '/easytools/runtime/uat/protect/***/Customer/webservices/ws_addProductToCartCustomer.wss?',
body: {
content : request.toString(),
contentType : 'text/xml; charset=utf-8'
}
};
return WL.Server.invokeHttp(input);
}