• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Capture xmlfiles on website

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a way we get all our xmlfiles in the email. But we would like to get them directly in our web site. Once the xmlfile comes in our website, I would like to put it in our database.
My question is if we are getting files in our website, where exactly in the server are our files stored. This is because once I know where the file is stored , I can ftp it to unix and run my shell script. My main goal is to get the file to unix.
Any help would be greatly appreciated.
thanks,
Vidhya
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by vidhya subramaniam:

My question is if we are getting files in our website, where exactly in the server are our files stored. This is because once I know where the file is stored , I can ftp it to unix and run my shell script. My main goal is to get the file to unix.
Any help would be greatly appreciated.
thanks,
Vidhya


First thing you have to decide is how you are going to receive an XML via web page.
there is lot of option and its depends on its own needs.
Forexample, some website may expect their user to upload the xml file using form based upload, or cutting and pasting XML file into the textarea of the website -- but this expect your user to be a SUPER USER.
Tell me what you are trying to achieve or why u need your user to send an XML file to your website? that could us to reply you further.
 
vidhya subramaniam
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have various customers who use Ariba for sending their EDI files. Ariba uses cxml to send their files. Currently they are coming in an email box but we would like to put them in a url so that they can upload the files to the url. So how do I extract files from the url and proceed?
thanks
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by vidhya subramaniam:
We have various customers who use Ariba for sending their EDI files. Ariba uses cxml to send their files. Currently they are coming in an email box but we would like to put them in a url so that they can upload the files to the url. So how do I extract files from the url and proceed?
thanks


Some nightly suggestions, may be someone will add u more.
1. if ur sender can place the files in their webserver than u can write a java code to read the remote cxml file and process it furhter
a DOM code like this will do the job


there are lot of other issue that u have to study before doing this.


2.Javamail
if ur sender is not happy with the above way, then u better write a javamail code, which will read the email with attachments, and the attachments will be processes by an XML parser.


3.A web interface provided by you, where ur sender will upload the cxml files. Jspsmartupload package or file upload servlet written by Jason Hunter will help u to code jsp/servlet

4. A web service hosted at ur sender place which will emits the cxml files upon a client request from ur PC.
Apart from this u have to study urself which suits better for ur client/business case.
 
vidhya subramaniam
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Balaji, for your help. But I have a small doubt.
You said if the sender places files in their web server then you can write the java code. Can I use this code to read the files if they send the files to our url link. Is there any website where I can find more information about this.
Thanks,
Vidhya
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by vidhya subramaniam:
Can I use this code to read the files if they send the files to our url link. Is there any website where I can find more information about this.
Thanks,
Vidhya


when you say "send the file to our url link"
can you be more specific, i could n't able to understand what u mean.
 
vidhya subramaniam
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Balaji,
By our url link , I meant my company's website. hope this clears.
thanks,
vidhya
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by vidhya subramaniam:
Balaji,
By our url link , I meant my company's website. hope this clears.
thanks,
vidhya


Vidhya!!..
No again.

You Said:Can I use this code to read the files if they send the files to our url link.

My question is when you say 'they send the files to our link' what do you mean ??
I mean [b]by what way they can send you the file to your website[b]?
Generally your website shd provide them an interface so that the sender can visit your website and upload the file(like attaching a file in hotmail or yahoo mail ).
Could you please ask your question again in very detailed.
If I'm confusing or confused, can someone please help me to understand this question.
 
vidhya subramaniam
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Balaji,
I will tell you in detail the whole scenario. Hope that will help.
We have various customers like AIG, Kaiser etc who use Ariba software to send purchase orders in EDI . Currently they send the orders via email with cxml attachments. I am working on a project which involves extracting the cxml file from the email and putting it in our database.
Now I have to automate the whole process. I am through with the later half of the project . I want to automate the part of extracting the cxml files from the email and ftping that to one local directory in unix so that my shell script can run.
This is one way. So I wanted to know how exactly I can automate that process.
There is another option that I have to do research on. That is in Ariba there is a way where the customers can use an option of sending the xmlfiles directly to url. This url would be my company's website. NOw if they send the files directly to my company's url then how do I extract it and take it to unix?
I hope this is cleared your confusion and you are able to help me.
Thanks
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by vidhya subramaniam:

I want to automate the part of extracting the cxml files from the email and ftping that to one local directory in unix so that my shell script can run.
This is one way. So I wanted to know how exactly I can automate that process.


Since your customers is already using email to send the cxml file, the best option could be to * write a java program with javamail package,
* this program shd read the emails sent by customers say to address foo@foo.com, extract the attachememnts
* store it or ftp it to ur local or remote directory.
To do this u have read the tutorials that comes up with javamail package.
If you are familiar with java programming then doing this will not be very difficult.


There is another option that I have to do research on. That is in Ariba there is a way where the customers can use an option of sending the xmlfiles directly to url. This url would be my company's website. NOw if they send the files directly to my company's url then how do I extract it and take it to unix?


For this please read the Ariba documentation and see what actually its doing when sending the xmlfiles directly to the url, Its can send it as a http queryString if the xmlfile is very small or as an URL encoded. After reading the Ariba documentation, try to give us an exmaple of what its sending. A cut and paste could be fine.
 
This tiny ad is wafer thin:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic