Let me make it my request a bit simpler (or more confusing if you don't do ASP.)

Just in case it is helpful I have attached the ASP file that does what I am looking to do in CFM. I was hoping to do it completely in CFM to get the linux guys a full tester also. My site is full working for the client... but I would like to streamline some features and set up a test environment that was more cXML based than Ariba based. I am doing another project with Syquest. (No not the hard drive company... they are another company doing cXML authentication services.)

Thanks,

John Farrar



John Farrar wrote:

OK... here is my goal.

1. I have a page using <CFHTTP> (or whatever correct method I should use)
2. It is sending an XML based header to another CFM page. (XML should be in header, receiving page should be able to see it via this variable "request.HTTPHeader.content") ... this is to emulate a test for another program to make sure the page is working.
(If I get that far the rest is gravy!)
3. I return content to the calling page to validate the request was accepted.


KEY: Step 2 must receive the content in that variable without manipulating the content into it... request.HTTPHeader.content

I know this is simple... but in this case it's passing me by... any gurus out there who can reply for the school of WATSAMATTA U?

Thanks in advance,

John Farrar

P.S.
CFMX 6.x plus


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]





---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]
Title: PunchoutSetupRequest Test Tool






Mimic an Ariba Punchout Setup Request

URL to Test:

Put supplier password in cxml below:

Cxml PunchoutSetupRequest:

AN01000002779-T 603541830-T AribaNetworkAdmin welcome CatalogTester
9068 http://nathanalbee/punchouttester/recieveLidetail.asp http://www.ibmprojector.com/LaunchPage.asp

After clicking submit view source. You will see cxml responce there.

This is an example of what the POST will look like. Notice the cXML is not inside a FORM variable.

POST / HTTP/1.0
Content-Length: 1213
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
Host: YOURWEBSERVER
Connection: Keep-Alive

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE cXML SYSTEM "cXML.dtd">
<cXML version="1.0" timestamp="2000-06-05T09:13:24-07:00" payloadID="[EMAIL PROTECTED]">
    <Header>
    <From>
        <Credential domain="NetworkId">
            <Identity>AN01000002779-T</Identity>
        </Credential>
    </From>
    <To>
        <Credential domain="DUNS">
            <Identity>603541830-T</Identity>
        </Credential>
    </To>
    <Sender>
        <Credential domain="NetworkId">
            <Identity>AribaNetworkAdmin</Identity>
        <SharedSecret>welcome</SharedSecret>
	</Credential>
        <UserAgent>CatalogTester</UserAgent>
    </Sender>
</Header>
<Request deploymentMode="test">
        <PunchOutSetupRequest operation="create">
            <BuyerCookie>9068</BuyerCookie>
            <BrowserFormPost>
                <URL>https://service.ariba.com/punchout?ansessionid=9068</URL>
            </BrowserFormPost>
            <SupplierSetup>
                <URL>http://www.ibmprojector.com/LaunchPage.asp</URL>
            </SupplierSetup>
        </PunchOutSetupRequest>
    </Request>
</cXML>


---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]<% Dim urltotest Dim cxmltosend urltotest = Request.Form("urltotest") cxmltosend = Request.Form("cxmltosend") %> <% function punchoutSetupRequest(url) '(url, methodName, paramArr) Dim cxmlText Dim olddtdvalue Dim newdtdvalue Dim NewserverResponseText olddtdvalue = """cXML.dtd""" newdtdvalue = """http://nathanalbee/punchoutasp/cxml1.1/cXML.dtd""" 'Create the requestBody from the methodName and paramArr cxmlText = cxmltosend 'Create and Send the XML Post Request Set objXML = Server.CreateObject("Microsoft.XMLHTTP") ' Set objLst = Server.CreateObject("Microsoft.XMLDOM") objXML.open "POST", url, false objXML.send(cxmlText) 'Pull Out the data from XML response serverResponseText=objXML.responseText NewserverResponseText = Replace(serverResponseText,olddtdvalue,newdtdvalue) If objXML.responseXML.parseError.errorCode <> 0 Then Err.raise 1, "Stop. parse error on punchoutSetupResponce from supplier's punchout site "& url & vbnewline & vbnewline & objXML.responseText End If ' Response.Write objXML.responseText ' Response.Write newcxml Set xdoc = Server.CreateObject("Microsoft.XMLDOM") xdoc.ValidateOnParse = False xdoc.async = False xdoc.resolveExternals = True loadStatus = xdoc.loadXML(NewserverResponseText) Response.Write "

Server Responce:

" Response.Write newcxml If loadStatus = True then If xdoc.documentElement.childNodes(0).childNodes(0).attributes.getNamedItem("code").text = "200" Then Response.Write "

cXML Returned from Punchout Site

" Response.Write "(view document source to see full cXML inside < pre > < /pre> tags)" Response.Write "
"
				Response.Write serverResponseText
				Response.Write "

" Response.Write "

Status Code:

" Response.Write xdoc.documentElement.childNodes(0).childNodes(0).attributes.getNamedItem("code").text Response.Write " = " & xdoc.documentElement.childNodes(0).childNodes(0).attributes.getNamedItem("text").text ' Get URL from MSDOM Set ReturnedURL = xdoc.getElementsByTagName("URL") ReturnedURL = (ReturnedURL.item(0).text) Response.Write "

URL returned to Punchout to: (follow link to shopping cart)

" Response.Write "" & ReturnedURL Else Response.Write "

cXML Returned from Punchout Site: Status = 500. Supplier site did not send successfull login." Response.Write "

View Source to see cXML" Response.Write serverResponseText End If '********************************Comments**************************** ' Some nice MSDOM error logging for a failed parse or load '******************************************************************** Else Response.Write "

xml @ supplier site failed to load using MSDOM: " Dim strErrText Dim xPE Set xPE = xdoc.parseError strErrText = "Your XML Document failed to load due the following error: " & "Error #: " & xPE.errorCode & ": " & "Line #: " & xPE.Line & "Line Position: " & xPE.linepos & "Position In File: " & xPE.filepos & "Source Text: " & xPE.srcText & "Document URL: " & xPE.url Response.Write strErrText End If end function %> <% 'Call function above to send post punchoutSetupRequest (urltotest) %> ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to