?
Solved

How to post an xml document?

Posted on 2003-12-01
5
Medium Priority
?
225 Views
Last Modified: 2010-08-05
I have a url that I need to post an XML document to, not sure how to proceed. Any help is appreciated.

Andy
0
Comment
Question by:icculus12
[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
  • 2
5 Comments
 
LVL 20

Expert Comment

by:jmcg
ID: 9854140
If you have the LWP bundle installed, it comes with a program (a script, really) that is installed with names like:

/usr/local/bin/lwp-request
/usr/local/bin/POST
/usr/local/bin/GET
/usr/local/bin/HEAD

Take a look at the manpage for it

http://search.cpan.org/~gaas/libwww-perl-5.76/bin/lwp-request

This would be a way, with essentially no programming, to do this upload task.
0
 

Author Comment

by:icculus12
ID: 9854445
Ok, I gave the POST program a try, executed the command as follows:

POST -c text/xml https://url_to_xml_parser_app_here.asp

then input the xml content and got this result:

<HTML>
<HEAD><TITLE>An Error Occurred</TITLE></HEAD>
<BODY>
<H1>An Error Occurred</H1>
501 Protocol scheme 'https' is not supported
</BODY>
</HTML>

Looks like the fact that the server is secure is causing problems with POST... Any ideas of a workaround or alternative solutions available?

Thanks,
Andy
0
 
LVL 20

Expert Comment

by:jmcg
ID: 9855170
You'll get that error if you do not have the encryption libraries installed.

Are you on Windows and using ActivePerl or are you on something else?

0
 

Author Comment

by:icculus12
ID: 9856014
I am on a Linux server with Perl 5.6.0 - which libraries do I need? Do I need to execute any special commands or does the mere presence of the enc. library allow it to work with https?

Thanks,
Andy
0
 
LVL 20

Accepted Solution

by:
jmcg earned 1000 total points
ID: 9857389
In that case, see this document:

http://search.cpan.org/src/GAAS/libwww-perl-5.76/README.SSL

I've seen this work for people using the Crypt::SSLeay module. I don't know about the IO::Socket::SSL module.

And, yes, the mere presence of the library (properly installed of course, so LWP can find it) will allow https requests to work.
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.

Question has a verified solution.

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

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

765 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