Solved

Need Page to receive cXML PO

Posted on 2008-06-17
3
896 Views
Last Modified: 2012-06-27
I need a simple ASP.NET webpage to receive a cXML PO from a customer. The transaction is supposed to be a http POST transaction but there is very litttle information or any examples on how to actually design a page to receive the post. At this point I only care about gathering the data nas saving it as is in a text file. Nothing more. I've tried looking for anything in the Request.Files collection and saving all data posted in the Request.Form.AllKeys collection but I don't seem to be getting anything!

The customer has sent the PO as a test a couple times and gets the error:
 "<exception>com.dstm.iprocure.exception.DsSystemException: Illegal character in local name "
however no one seems to know what the heck the local name is refering to?
0
Comment
Question by:Chad Penney
3 Comments
 
LVL 8

Expert Comment

by:MrAgile
ID: 21827445
hi There,

lets look at the error first. The localname is a string name referring to an element in the xml fragment / document.Rember that xml gets shirty when you try to include characters that are no compliant.

Sean



>>The customer has sent the PO as a test a couple times and gets the error:
 "<exception>com.dstm.iprocure.exception.DsSystemException: Illegal character in local name "
however no one seems to know what the heck the local name is refering to?
0
 

Accepted Solution

by:
Chad Penney earned 0 total points
ID: 21831900
Well I think I found a solution. The inbound data is not posted inteh way a conventional form is posted with data assigned to Keys. I had to read the entire input stream and then save that to a file.
t looks like the error that they were getting on the other end was actually within their system do to some incorrect settings or something and didn't have anything at all to do with our system.
Dim Length = 256
      Dim oStrm As System.IO.Stream
      Dim iLen, iBytesRead As Integer
      
      oStrm = Request.InputStream
      iLen = CInt(oStrm.Length)
      Dim arrStrm(iLen) As Byte
      iBytesRead = oStrm.Read(arrStrm, 0, iLen)
      
      Dim writeStream As IO.FileStream = New IO.FileStream(Server.MapPath("Process/" & sFileName & "-strm.txt"), IO.FileMode.Create, IO.FileAccess.Write)
 
      While (iBytesRead > 0)
        writeStream.Write(arrStrm, 0, iBytesRead)
        iBytesRead = oStrm.Read(arrStrm, 0, Length)
      End While
      oStrm.Close()
      writeStream.Close()

Open in new window

0
 
LVL 8

Expert Comment

by:newbie27
ID: 24010818
hello  cmpenney:

i have to do similar thing in one of my asp.net application , please can you give me some sample code to send and recieve data using cXML?

any help will greatly be appreciated..

http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_24273763.html
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

825 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