以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 Dot NET,C#,ASP,VB 』 (http://bbs.xml.org.cn/list.asp?boardid=43) ---- IXMLHTTPRequestPtr->responseText 返回的XML怎么会不完全啊? [求助] (http://bbs.xml.org.cn/dispbbs.asp?boardid=43&rootid=&id=11993) |
-- 作者:muzi -- 发布时间:11/12/2004 9:24:00 AM -- IXMLHTTPRequestPtr->responseText 返回的XML怎么会不完全啊? [求助] IXMLHTTPRequestPtr->responseText 返回的XML怎么会不完全啊? 我的代码是 bool accessingWebService(_bstr_t command_invoker_service_namespace, _variant_t user_name, _variant_t password, _variant_t mac, _variant_t user_ip, LPSTR sessionID) { IXMLHTTPRequestPtr pIXMLHTTPRequest = NULL; BSTR bstrString = NULL; HRESULT hr; try { hr = CoInitialize(NULL); SUCCEEDED(hr) ? S_OK : throw hr; hr = pIXMLHTTPRequest.CreateInstance("Msxml2.XMLHTTP"); hr = pIXMLHTTPRequest->open(_bstr_t(_T("POST")), _variant_t lpstrBody = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Body><wci:getSessionID xmlns:wci=\""; if(pIXMLHTTPRequest->status != 200 && pIXMLHTTPRequest->status != 207) bstrString = pIXMLHTTPRequest->responseText; |
-- 作者:muzi -- 发布时间:11/12/2004 9:52:00 AM -- 这是返回的结果: "<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:getSessionIDResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://localhost:8080/wci/CommandInvoker.jws"> <ns1:getSessionIDReturn xsi:type="xsd:string">7B5A322B725A52F6AE9D181DDA91DD79</ns1:getSessionIDReturn> </ns1:getSess" "7B5A322B725A52F6AE9D181DDA91DD79"这一串就是我调用Web service 返回的结果,也是我要得到的 |
-- 作者:muzi -- 发布时间:11/12/2004 1:22:00 PM -- 改为这样就可以了: ...... hr = pIXMLHTTPRequest->send(lpstrBody); SUCCEEDED(hr) ? S_OK : throw hr; if(pIXMLHTTPRequest->status != 200 && pIXMLHTTPRequest->status != 207) MSXML2::IXMLDOMDocument * pXMLDoc; IDispatch * ppBody; |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
62.500ms |