• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 918
  • Last Modified:

Need Page to receive cXML PO

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
Chad Penney
Asked:
Chad Penney
1 Solution
 
MrAgileCommented:
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
 
Chad Penney.Net Techincal Team LeaderAuthor Commented:
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
 
newbie27Commented:
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now