今問題が発生しています。SOAP要求が失敗しましたR
私は、SOAPのデータ交換のためのRを使用しようとしましたが、次のように常にサーバが応答し得る:
210.242.163.56をしようと... 210.242.163.56に接続
(210.242.163.56 )ポート80(#0)
POST/SendDigXml/HTTP/1.1
ホスト:210.242.163.56
は受け入れ:text/xmlで
受け入れ:マルチパート/ *
のContent-Type:text/xmlでは、文字セット= UTF-8
のSOAPAction:http://210.242.163.56/SendDigXml/GetLastMod
のContent-Length:397
アップロードが完全にオフに送信さ:397 397バイトのうち、
< HTTP/1.1 500内部サーバーエラー
<キャッシュ制御:プライベート
<コンテンツタイプ:テキスト/ xml;文字セット= UTF-8
<サーバー:マイクロソフト-IIS/7.5
< X-ASPNET-バージョン:4.0.30319
< X-Poweredのバイ:ASP.NET
<日付:火曜、2016年11月1日午前六時32分54秒GMT
<のContent-Length:441
<接続:キープアライブ
<年齢:210.242.163.56がそのまま
そしてfaulcodeとfaultStringのを左ホストする0
< 接続#0は、次のとおりです。
<faultcode>soap:Client</faultcode>
<faultstring>The server could not recognize the value of the HTTP header SOAPAction: http://210.242.163.56/SendDigXml/GetLastMod/.</faultstring>
私はRCurlパッケージのcurlPerform関数を次のコードで使用しています:
library(RCurl)
id ="iamuser"
pw ="letmepass"
headerFields =
c(Accept = "text/xml",
Accept = "multipart/*",
'Content-Type' = "text/xml; charset=utf-8",
SOAPAction = "http://210.242.163.56/SendDigXml/GetLastMod")
body = sprintf('<?xml version="1.0" encoding="utf-8"?>
<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>
<GetLastMod xmlns="http://210.242.163.56/SendDigXml/">
<user_id>%s</user_id>
<password>%s</password>
<county_code>%s</county_code>
<data_type>%s</data_type>
</GetLastMod>
</soap:Body></soap:Envelope>',id,pw,"Y","1")
reader = basicTextGatherer()
getupdate<-curlPerform(url = "http://210.242.163.56/SendDigXml/",
httpheader = headerFields,
postfields = body,
writefunction = reader$update,
verbose = TRUE)
SOAPAction値の形式は、テンプレートの規定に従っており、いくつかの他の表現も試みましたが、結果は同じです。他に何ができるか分からない。誰か助けてくれますか?
ありがとうございます。