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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bhushanbsc
    New Member
    • Mar 2008
    • 3

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

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

    in that i am trying client-server communicationus ing SOAP server.

    but facing problem on IXMLHTTPRequest .

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

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

    // code snippet as follows.
    void ClientServerCom municationUsing XmlHttpRequest( )
    {

    ::CoInitialize( NULL);
    {

    HRESULT hr;
    // Url of SOAP server (Used axis toolkit).
    bstr_t Url = "http://192.168.5.98:80 80/axis/WinMobileWebSer vice/WinMobileWebSer vice.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:Envelop e 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:encodingSt yle='http://schemas.xmlsoap .org/soap/encoding/' xmlns:soap='htt p://schemas.xmlsoap .org/soap/envelope/'> <soap:Body> <getKeyDataFrom Client xmlns='urn:WinM obileWebService '> <c-gensym3 xsi:type='xsd:s tring'>MY send MSG</c-gensym3> </getKeyDataFromC lient> </soap:Body> </soap:Envelope>" ;


    IXMLHTTPRequest Ptr oIXMLHTTPReques t = NULL;
    hr = oIXMLHTTPReques t.CreateInstanc e("Msxml2.XMLHT TP");
    if(hr!=S_OK)
    MessageBox(NULL ,L"Create instance failed",L"Creat eInstance",MB_O K);

    hr = oIXMLHTTPReques t->open(method,Ur l,Async);
    if(hr!=S_OK)
    MessageBox(NULL ,L"open method failed.",L"open ",MB_OK);

    hr = oIXMLHTTPReques t->setRequestHead er(L"Content_Ty pe",L"text/xml");
    if(hr!=S_OK)
    MessageBox(NULL ,L"setRequestHe ader method failed.",L"setR equestHeader",M B_OK);

    hr=oIXMLHTTPReq uest->setRequestHead er(L"SOAPAction ",L"'urn:WinMob ileWebService/getKeyDataFromC lient'");
    if(hr!=S_OK)
    MessageBox(NULL ,L"setRequestHe ader method about soap failed.",L"SOAP Action",MB_OK);

    hr=oIXMLHTTPReq uest->send(varBody );
    if(hr!=S_OK)
    MessageBox(NULL ,L"send method failed.",L"send ",MB_OK);
    }
    ::CoUninitializ e();
    }

    ############### #### 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.debu g 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(varBod y);
    if(FAILED(_hr)) _com_issue_erro rex(_hr,this,_u uidof(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
  • Stang02GT
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    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!
    Last edited by Stang02GT; Mar 12 '08, 04:32 PM. Reason: typo

    Comment

    • bhushanbsc
      New Member
      • Mar 2008
      • 3

      #3
      Originally posted by Stang02GT
      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.......... .

      Comment

      Working...