The GetResultXml method retrieves the XML returned as a result of executing
the Transport command. This <response>
XML is stored in the Transport response component.
_bstr_t bstrResultXML =
spITransportRsp->GetResultXml();
<response>
portion
of the XML returned in the Transport
response component.... typedef std::vector< _bstr_t > ResultTagList; ... // Obtain the response name and description from the standard response component _bstr_t bstrResponseDescription = spIAppIntRsp->GetDescription(); std::cout << "ResponseDescription=" << ( bstrResponseDescription.length() ? (LPCSTR) bstrResponseDescription : _T( "" ) ) << std::endl; _bstr_t bstrResponseName = spIAppIntRsp->GetName(); std::cout << "ResponseName=" << ( bstrResponseName.length() ? (LPCSTR) bstrResponseName : _T( "" ) ) << std::endl; // Obtain the specific response information contained in the custom TransportRsp component ITransportRspPtr spITransportRsp(spIAppIntRsp);
_ASSERTE(spITransportRsp != 0); ResultTagList tagList;
tagList.push_back(_bstr_t(_T("/response/objectset/document/properties/property[symname = \"DocumentTitle\"]/value")));
tagList.push_back(_bstr_t(_T("/response/objectset/document/properties/property[symname = \"Name\"]/value")));
for (unsigned int i = 0; i < tagList.size(); i++) {
_bstr_t tagPathName = tagList[i];
_bstr_t bstrResultValue = spITransportRsp->GetResult(tagPathName);
std::cout << "tag=" << (tagPathName.length() ? (LPCSTR) tagPathName : _T("")) << std::endl;
std::cout << "value=" << (bstrResultValue.length() ? (LPCSTR) bstrResultValue : _T("")) << std::endl;
}
_bstr_t bstrResultXml = spITransportRsp->GetResultXml();
std::cout << "resultText=" << (bstrResultText.length() ? (LPCSTR) bstrResultText : _T("")) << std::endl;...