0

HTTP SOAP ベースの呼び出し用のアダプターを作成しています。アダプターの呼び出し中に呼び出しのコードを以下に示します。次のようなエラーが発生します。

SOAPAdapter.xml は次のとおりです。

<wl:adapter xmlns:wl="http://www.worklight.com/integration" xmlns:http="http://www.worklight.com/integration/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="SOAPAdapter">

<displayName>SOAPAdapter</displayName>
<description>SOAPAdapter</description>
<connectivity>
    <connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
        <protocol>http</protocol>
        <domain>*.*.com</domain>
        <port>80</port>         
    </connectionPolicy>
    <loadConstraints maxConcurrentConnectionsPerNode="2"/>
</connectivity>

<procedure name="get_soap_req_list"/>

SOAPAdapter-impl.js は次のとおりです。

関数 get_soap_req_list() {

  var request = 
    '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
        +'<soap:Body>'
            +'<AddList  xmlns="http://schemas.microsoft.com/sharepoint/soap/">'
                +'<listName>tiu</listName>'
                +'<description>uyt</description>'
                +'<templateID>6</templateID>'
            +'</AddList>'
        +'</soap:Body>'
    +'</soap:Envelope>';
WL.Logger.debug("@@@"+request);

            var input = {
                method : 'post',
                returnedContentType : 'xml',
                path : '/_vti_bin/Lists.asmx',
                body : {
                    content: request.toString(),                  
                    contentType: 'text/xml; charset=utf-8'                
                }               

            };
**27**            var result = WL.Server.invokeHttp(input);               
**28**            return result;
}

コンソールエラーは次のとおりです。

E: プロシージャー SOAPAdapter/get_soap_req_listFWLSE0100E の呼び出し中にエラーが発生しました: parameters:{ "arr": [ 9 ] } TypeError: Cannot read property "Body" from undefined (D%3A%5CWorklightworkSpace%5Cmodule_05_2_HTTP_Adapter%5Cadapters%5CSOAPAdapter/SOAPAdapter-impl. js#42) FWLSE0101E: 原因: null

結果出力:

{ "errors": [ ], "info": [ ], "isSuccessful": true, "responseHeaders": { "Content-Length": "0", "Date": "Thu, 20 Jun 2013 11:08: 03 GMT"、"MicrosoftSharePointTeamServices": "14.0.0.6123"、"SPRequestGuid": "7a89adce-9ede-4197-bfc4-aff18e85e763"、"サーバー": "Microsoft-IIS/7.5"、"WWW-認証": "NTLM ", "X-MS-InvokeApp": "1; RequireReadOnly", "X-Powered-By": "ASP.NET" }, "responseTime": 156, "statusCode": 401, "statusReason": "Unauthorized" 、「テキスト」:「」、「合計時間」: 172、「警告」:[ ] }

4

1 に答える 1