By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,138 Members | 879 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,138 IT Pros & Developers. It's quick & easy.

Urgent help on IXMLHTTPRequest(Pocket PC win32) for SOAP Client

P: 3
Hi,
I am working on a project related to windows pocket pc 5.0 (win32).

in that i am trying client-server communicationusing SOAP server.

but facing problem on IXMLHTTPRequest.

#################### CODE ##########################
//included files are,

#include "msxml2.h"
#import "msxml3.dll"
using namespace MSXML2;
#define CoInitialize(NULL) CoInitializeEx(NULL, COINIT_MULTITHREADED)

// code snippet as follows.
void ClientServerCommunicationUsingXmlHttpRequest()
{

::CoInitialize(NULL);
{

HRESULT hr;
// Url of SOAP server (Used axis toolkit).
bstr_t Url = "http://192.168.5.98:8080/axis/WinMobileWebService/WinMobileWebService.jws";
bstr_t method = "GET";
_variant_t Async = VARIANT_FALSE;
//body of send method that sends xml of soap envelope.
_variant_t varBody= L"<?xml version='1.0' encoding='UTF-8'?> <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> <soap:Body> <getKeyDataFromClient xmlns='urn:WinMobileWebService'> <c-gensym3 xsi:type='xsd:string'>MY send MSG</c-gensym3> </getKeyDataFromClient> </soap:Body> </soap:Envelope>";


IXMLHTTPRequestPtr oIXMLHTTPRequest = NULL;
hr = oIXMLHTTPRequest.CreateInstance("Msxml2.XMLHTTP");
if(hr!=S_OK)
MessageBox(NULL,L"Create instance failed",L"CreateInstance",MB_OK);

hr = oIXMLHTTPRequest->open(method,Url,Async);
if(hr!=S_OK)
MessageBox(NULL,L"open method failed.",L"open",MB_OK);

hr = oIXMLHTTPRequest->setRequestHeader(L"Content_Type",L"text/xml");
if(hr!=S_OK)
MessageBox(NULL,L"setRequestHeader method failed.",L"setRequestHeader",MB_OK);

hr=oIXMLHTTPRequest->setRequestHeader(L"SOAPAction",L"'urn:WinMobileWe bService/getKeyDataFromClient'");
if(hr!=S_OK)
MessageBox(NULL,L"setRequestHeader method about soap failed.",L"SOAPAction",MB_OK);

hr=oIXMLHTTPRequest->send(varBody);
if(hr!=S_OK)
MessageBox(NULL,L"send method failed.",L"send",MB_OK);
}
::CoUninitialize();
}

################### END OF CODE ########################


###Related problem
1)send method gives error as "problem has occured with gwes.exe."

when i put a breakpoint on send method(i.e.debug it) call passes to msxml.tli file in that,

//code of msxml.tli file of send method as,

inline HRESULT IXMLHTTPRequest :: send(const _variant_t &varBody)
{
HRESULT _hr = raw_send(varBody);
if(FAILED(_hr)) _com_issue_errorex(_hr,this,_uuidof(this));
//from here control passes to disassembly after the line (03FB2130 blt 03FB21C8) it losses the control.
return _hr;
}


Plz i am stuck on this point, i want your help....plz reply this mail.......
Regards,
Bhushan&Jitu
Mar 12 '08 #1
Share this Question
Share on Google+
2 Replies

Stang02GT
Expert 100+
P: 1,208
Hello Bhush,

Welcome to the Scripts. Unfortunately i am unable to answer you questions, but i would like to point you in the direction of forums that will help you to receive a better/faster response to your question.

At the top of your screen you will see the blue navigation bar, under the forums section there is an XML forum. It appears ( i very well could be wrong) that your question is XML based. If it is i would post your question in there.

Please also use the code tags when posting code and don't forget to check out our posting guidelines


Here is the link to the XML forum.


Good luck and I hope you find your answers!
Mar 12 '08 #2

P: 3
Hello Bhush,

Welcome to the Scripts. Unfortunately i am unable to answer you questions, but i would like to point you in the direction of forums that will help you to receive a better/faster response to your question.

At the top of your screen you will see the blue navigation bar, under the forums section there is an XML forum. It appears ( i very well could be wrong) that your question is XML based. If it is i would post your question in there.

Please also use the code tags when posting code and don't forget to check out our posting guidelines


Here is the link to the XML forum.


Good luck and I hope you find your answers!
HI Stang02GT,
Thanks for your reply, it is very usefully for me and my friends thoues are new for this concept like Forum...........
Mar 13 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.