How to Post XML 'response back'  to Epicor b2b Supplier using Classic .ASP

Posted on 2009-04-15
Last Modified: 2012-05-06
I am able to receive a 'Punchout request' from supplier with no problems, but, when I try to Post response back using 'cxml-urlencoded' hidden field I receive following message:

(Tap Out message: A string variable was expected but no openning character was found)

Code is below:

Thanks for your help......

<%@LANGUAGE = VBScript%>



myURL = ""


'Build XML string

Function CreateCXML()


<?xml version = &quot;1.0&quot; encoding=&quot;UTF-8&quot;?>


<cXML payloadID="&lt;%= Now &amp;&quot;@&quot;&amp;Request.ServerVariables(&quot;LOCAL_ADDR&quot;)%&gt;" timestamp="&lt;%= Now %&gt;">


<Status code="200" text="Success">











End Function


<form method="post" action="<%=BrowserFormPost%>" name="ReturnPost" id="ReturnPost">

<INPUT TYPE="hidden" NAME="cxml-urlencoded" VALUE="<%=CreateCXML()%>">


<script language="javascript" type="text/javascript">


    if ('<%=BrowserFormPost%>' != "")






Open in new window

Question by:SG_unique
    LVL 9

    Expert Comment

    Have you attempted to alert the value of the hidden field to verify that the XML is getting into the field?
    If it is not try changing your function to:

    Function CreateCXML()
    createcxml = "<?xml version = ""1.0"" encoding=""UTF-8""?>"
    createcxml = createcxml & "<!DOCTYPE cXML SYSTEM """">"
    createcxml = createcxml & "<cXML payloadID=""" & now & "@" & Request.ServerVariables("LOCAL_ADDR") & """ timestamp=""" & Now &""">"
    createcxml = createcxml & "<Response><Status code=""200"" text=""Success"" />"
    createcxml = createcxml & "<PunchOutSetupResponse><StartPage>"
    createcxml = createcxml & "<URL>" & myURL & "</URL></StartPage></PunchOutSetupResponse>"
    createcxml = createcxml & "</Response></cXML>"
    End Function

    Open in new window


    Expert Comment

    by:Rich Hudec
     Yes - XML is getting into hiddenfield ,also, tried your New function logic.
    After change to program (per above function)  I initially received error: A string literal was expected.
    So I replaced double-quotes with single-quotes and received error msg: The character '<' cannot be used in a attribute value.
     I decided to create a Login program to access this page and the 'hidden' field was read correctly and redirected to my catalog page w/o a problem. I'm wondering if Epicor has a configuration setting that needs to be set.

    Thanks again for any suggestions
    LVL 9

    Expert Comment

    I am not familiar with Epicor.

    Accepted Solution

    Epicor is Similiar to Ariba procurement application, there are a couple of choices of how-to post/receive a data string  - either thru a hidden field  or  XML call.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Title # Comments Views Activity
    two-way Authentication ASP 3 61
    XML namaspace 2 26
    UTC (timezone) without using an API 16 21
    API not working 33 41
    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now