您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

.net调用php

2024/5/1 23:29:49发布15次查看
嗯,是用的直接请求,但参数好像无效,返回来总是提示参数为空 //构造soap请求信息 stringbuilder soap = new stringbuilder(); soap.append(?xml version=\1.0\ encoding=\utf-8\?); soap.append(soap-env:envelope xmlns:soap-env=\http://schemas
嗯,是用的直接请求,但参数好像无效,返回来总是提示参数为空
//构造soap请求信息
stringbuilder soap = new stringbuilder();
soap.append();
soap.append();
soap.append();
soap.append();//
soap.append(244767);
soap.append();
soap.append();
soap.append();
//发起请求
uri uri = new uri(http://xxxxxxxx/index.php?r=yar/tgoods);
webrequest webrequest = webrequest.create(uri);
webrequest.contenttype = text/xml; charset=utf-8;
webrequest.method = post;
using (stream requeststream = webrequest.getrequeststream())
{
byte[] parambytes = encoding.utf8.getbytes(soap.tostring());
requeststream.write(parambytes, 0, parambytes.length);
}
httpwebresponse res;
try
{
res = (httpwebresponse)webrequest.getresponse();
}
catch (webexception ex)
{
res = (httpwebresponse)ex.response;
}
streamreader sr = new streamreader(res.getresponsestream(), encoding.utf8);
string strhtml = sr.readtoend();
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product