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

Im writing a client in perl using SOAP::Lite.

I have run into a problem and when calling a certain method I get an error.

I have examined the XML that is being sent by my client and it looks fine but I get a faulty response. I am following this up with the vendor but right now it doesn't look like it will be solved soon.

I tried to test out the XML that was being sent by running it in soapUI and have managed to get the SOAP call working with that program.

So my situation right now is that I have a web service that wont accept my SOAP request but I also have the exact XML that I need to send but its in XML not perl.

So is there a way in SOAP::Lite (or some other module) that would allow me to send pure XML?

Replies are listed 'Best First'.
Re: SOAP: sending XML directly
by Anonymous Monk on Dec 14, 2010 at 03:48 UTC
Re: SOAP: sending XML directly
by locked_user sundialsvc4 (Abbot) on Dec 14, 2010 at 14:18 UTC

    In order to respond to your inquiry in any meaningful way, we need details. &nnbsp; You say, variously, that you get “an error,” or “a faulty response,” but neglect to tell us what, exactly, it is.

    If you did “manage to get the SOAP call working with that program,” then this, I think, pretty much establishes that the problem is on your end, and if you actually manage to get a vendor to help you (debug your own code), you will be the exception.   Usually, it’s a matter of, “we’ll get around to helping you as soon as Mr. Godot arrives back from his vacation.”   So, give us details.   Exactly what was the message you received, and, if the content is short and not proprietary, what is the actual SOAP message that you sent?

Re: SOAP: sending XML directly
by hominid (Priest) on Dec 14, 2010 at 15:11 UTC
    To the best of my knowledge and if I understand your question correctly, there is no way to send a pre-constructed XML file or snippet with SOAP::Lite. You can however "hand roll" your SOAP::Lite packets by using the SOAP::Data and SOAP::Header objects. If you provide an example of the XML you wish to send, we may be able to help you build it.

    Update: After reading the docs more closely, this may be what you are looking for: COMPOSING_MESSAGES_USING_RAW_XML
Re: SOAP: sending XML directly
by ikegami (Patriarch) on Dec 15, 2010 at 02:28 UTC

    So is there a way in SOAP::Lite (or some other module) that would allow me to send pure XML?

    Which transport does your SOAP service use, HTTP? Then LWP::UserAgent.

Re: SOAP: sending XML directly
by Mask (Pilgrim) on Dec 14, 2010 at 12:28 UTC
    Have you seen what is the difference between the XML that is being sent by your script and XML sent by you in the soapUI?