SG_unique
asked on
How to Post XML 'response back' to Epicor b2b Supplier using Classic .ASP
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......
(Tap Out message: A string variable was expected but no openning character was found)
Code is below:
Thanks for your help......
<%@LANGUAGE = VBScript%>
<%
'
myURL = "https://www.sg.net/SiteA/_Epicor/b2bshop.asp?CompID=0122"
'********************************************************************
'Build XML string
Function CreateCXML()
%>
<?xml version = "1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML payloadID="<%= Now &"@"&Request.ServerVariables("LOCAL_ADDR")%>" timestamp="<%= Now %>">
<Response>
<Status code="200" text="Success">
</Status>
<PunchOutSetupResponse>
<StartPage>
<URL><%=myURL%>
</URL>
</StartPage>
</PunchOutSetupResponse>
</Response>
</cXML>
<%
End Function
%>
<form method="post" action="<%=BrowserFormPost%>" name="ReturnPost" id="ReturnPost">
<INPUT TYPE="hidden" NAME="cxml-urlencoded" VALUE="<%=CreateCXML()%>">
</form>
<script language="javascript" type="text/javascript">
{
if ('<%=BrowserFormPost%>' != "")
{
document.ReturnPost.submit();
}
}
</script>
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
Dave
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
Dave
I am not familiar with Epicor.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If it is not try changing your function to:
Open in new window