Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Using an Apache Axis web service from C++ client

Using an Apache Axis web service from C++ client

Scheduled Pinned Locked Moved C / C++ / MFC
xmlc++apachewcfhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andy H
    wrote on last edited by
    #1

    I need to send an XML document to a web service running Apache Axis. I have been attempting to POST it using XMLHTTP: HRESULT hr = CoInitialize(NULL); ... IServerXMLHTTPRequestPtr pXMLHTTPReq = NULL; hr = pXMLHTTPReq.CreateInstance(__uuidof(ServerXMLHTTP40)); hr = pXMLHTTPReq->open( _bstr_t("POST"), bstrURL, _variant_t(VARIANT_FALSE) ); CComBSTR xmlString; m_spXMLDoc->get_xml( &xmlString ); // m_spXMLDoc already loaded with XML hr = pXMLHTTPReq->setRequestHeader(_bstr_t("Content-Type"), _bstr_t("text/xml; charset=utf-8")); hr = pXMLHTTPReq->setRequestHeader(_bstr_t("SOAPAction"), _bstr_t("")); hr = pXMLHTTPReq->send( (_variant_t)xmlString ); long status = pXMLHTTPReq->Getstatus(); _bstr_t bstrResponse = pXMLHTTPReq->GetresponseText(); ... Before I added the line: hr = pXMLHTTPReq->setRequestHeader(_bstr_t("SOAPAction"), _bstr_t("")); I was connecting but getting a No Soap Action error. But having added ths line when execution tries to run at that line it raises an exception. I would appreciate any advice anyone can give me on how I can POSt xml through to an Apache Axis web service successfully.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups