Solved

Need Page to receive cXML PO

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 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

20 Experts available now in Live!

Get 1:1 Help Now