ミドルウェア クライアント (Cohesion と呼ばれます) を使用してサーバーにトランザクションをポストしようとしています。以下は私のコード(asp)です:
Dim xmlhttp 'As Object
Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", "http://server_ip/Databox-dr/CohesionConnect.asmx/GetHostReply", False
'using only http://server_ip/Databox-dr/CohesionConnect.asmx doesn't work, either
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
'xmlhttp.setRequestHeader "Content-Length", "128"
xmlhttp.send "50000000000MSUF"
Set xmlhttp = Nothing
私が持っているドキュメント(そしてそれだけです)は、私にこれを伝えています:
HTTP POST 以下は、サンプルの HTTP POST 要求と応答です。表示されているプレースホルダーは、実際の値に置き換える必要があります。
POST /DATABOX-DR/CohesionConnect.asmx/GetHostReply HTTP/1.1
Host: server_ip
Content-Type: application/x-www-form-urlencoded
Content-Length: length
sTran=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://fidelityifs.com/webservices">string</string>
(長さと文字列は実際の値に置き換える必要があります)
私は何を間違っていますか?文字列の長さを設定するにはどうすればよいですか? ありがとう!!