Solved

Need Page to receive cXML PO

Posted on 2008-06-17
3
900 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

690 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