hallikpapa has asked for the wisdom of the Perl Monks concerning the following question:

I have a bunch of data that is being stored in a variable $writer (large amount of XML data) This doesn't work correctly, but is SOAP::Lite what I want if I want to do an http POST to jboss(8180) of all this XML data? If not, how would I post the hash'd data stored in $writer to that specific URL address?
my $soap = SOAP::Lite->proxy('http://localhost:8180'); my $excel = Spreadsheet::ParseExcel::Workbook->Parse($file); my $writer = XML::Writer->new( OUTPUT => $soap, NEWLINES => 0, DATA_MODE => 1, DA +TA_INDENT => 2, );
Separate question also. You'll notice that I am using Spreadsheet::ParseExcel. It works fine in linux, but I am developing the code on my laptop before I push it to the box, but I can't run it on windows. I get this error.
Weak references are not implemented in the version of perl at C:/Perl/ +site/lib/Spreadsheet/ParseExcel.pm line 67 BEGIN failed--compilation aborted at C:/Perl/site/lib/Spreadsheet/Pars +eExcel.pm line 67. Compilation failed in require at script.pl line 4. BEGIN failed--compilation aborted at script.pl line 4.

Replies are listed 'Best First'.
Re: Question with SOAP::Lite
by talexb (Chancellor) on Nov 08, 2007 at 02:49 UTC

    I believe your problem with weak references has to do with the Spreadsheet::ParseExcel module wanting to compile some XS code -- which on Windows isn't possible unless you have an appropriate C compiler avilable. Failing that, presumably it falls back on a pure Perl solution, but it appears that fallback plan isn't working on Windows.

    Hopefully someone more knowledgeable with this module will be able to comment -- I just wanted to post this to point you in what I believe is the right direction.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Re: Question with SOAP::Lite
by hallikpapa (Scribe) on Nov 08, 2007 at 00:55 UTC
    Well I am going to look into using SOAP::Transport::HTTP, any tips if this is what I want or not would be helpful. I dug a little deeper when someone told me to use SOAP::Lite. But the other question still remains. Is there some kind of configuration I can do to make the same mods work on windows that work on linux?
Re: Question with SOAP::Lite
by erroneousBollock (Curate) on Nov 08, 2007 at 03:52 UTC
    This doesn't work correctly, but is SOAP::Lite what I want if I want to do an http POST to jboss(8180) of all this XML data?
    Not usually.

    SOAP::Lite is for communicating via the SOAP protocol. It has two modes major modes: RPC and Document. (Either can be Literal or Encoded.)

    You can send chunks of XML to SOAP services written to expect Document/* format, but it's really up to the SOAP service (regarding what it expects).

    More likey, you'll be required to do a simple HTTP 'POST' to some HTML form published by the server-side Java.

    If not, how would I post the hash'd data stored in $writer to that specific URL address?
    However the receiving server process expects it? ;) Seriously, the server-like (being a Java thing) likely has documentation somewhere that you can read to figure out what protocol and content constraints are in place.

    -David

      I found the right mod I wanted to use for an http post. I will also look into what it's trying to compile. That may solve some other mods I was having problems with. Thanks monks!