Solved

Need Page to receive cXML PO

Posted on 2008-06-17
3
888 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

13 Experts available now in Live!

Get 1:1 Help Now