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. XML / XSL
  4. MSXML2.serverXMLHTTP.4.0

MSXML2.serverXMLHTTP.4.0

Scheduled Pinned Locked Moved XML / XSL
xmlannouncementwcfcomsysadmin
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.
  • H Offline
    H Offline
    hemrk
    wrote on last edited by
    #1

    Gives error access denied. if i change MSXML2.serverXMLHTTP.4.0 to MSXML2.serverXMLHTTP then it gives error that soapaction. here is my code <%@language=Jscript%> <% var objSrvHTTP; var objXMLSend; var objXMLReceive; var line=""; objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0"); objXMLSend = Server.CreateObject("Microsoft.XMLDOM"); objXMLReceive = Server.CreateObject("Microsoft.XMLDOM"); objXMLSend.async = false; objFS = Server.CreateObject("Scripting.FileSystemObject"); ReadStream = objFS.OpenTextFile (Server.MapPath("BatchInput.xml"),1,false); //ReadStream = objFS.OpenTextFile (Server.MapPath("Indulis.xml"),1,false); var l=""; while (!ReadStream.AtEndOfStream) { l=ReadStream.Readline(); line = line + l; } objSrvHTTP.setTimeouts(-1,-1,-1,-1) //This is important //If this line is not there it will time out //Before getting error back objSrvHTTP.open ("POST","http://gems/GeneralLedgerTest/Update.asmx",false); //objSrvHTTP.open ("POST","http://aura/GeneralLedger67/Update.asmx",false); //objSrvHTTP.open ("POST","http://localhost/GeneralLedger/Update.asmx",false); objSrvHTTP.setRequestHeader("Content-Type", "text/xml"); objSrvHTTP.setRequestHeader("SOAPAction","http://gems/Sample"); objSrvHTTP.send (line); objXMLReceive = objSrvHTTP.responseXML; Response.ContentType = "text/xml"; Response.Write (objXMLReceive.xml); %> my xml file is <?xml version='1.0' encoding='utf-8'?> <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> soap:Body <LoadGLRequest xmlns='http://www.gemsgov.com/Request'> <GLTransfer xmlns='http://www.gemsgov.com/Request'> <GLLoadSchema xmlns='http://tempuri.org/GLLoadSchema.xsd'> <GLBatch ORGANIZATION='001' EXSource='OHR' Sequence='0'> <BatchHeader BatchDate='091009' AreaCode='' Operator='OHR' Sequence='1'> <BatchDetails Account='01-00-00-1010-1010-00000 ' Amount='-1214762.58' Description='TEST' GLType='PR' Grant='' Project='' ProjectTask='' WorkorderNumber='' WorkCode='' TransactionDate='082109' AltSource='PR' AltDetail='0001' Sequence='2' /> <BatchDetails Account='01-00-00-1310-0000-00072 ' Amount='6769.25 ' Description='TEST2' TransactionDate='082109' AltSource='PR' AltDetail='0002'

    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