piyush.shourie has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

Does Perl provides XML support to
1.digitally sign XML documents to send in a request.
2. verify digital signatures on returned XML documents.
3. send SOAP requests to web services.

Please also provide info as to which Perl modules may be used to accomplish the above mentioned jobs.

Replies are listed 'Best First'.
Re: Perl support for XML
by jfroebe (Parson) on Sep 14, 2004 at 13:44 UTC

    Hi,

    1. digitally sign XML documents to send in a request.
    2. verify digital signatures on returned XML documents.

    Yes. Take a look at Crypt::OpenPGP for starters. XML documents are the same as any other document with respect to digital signatures

    3. send SOAP requests to web services.

    Take a look at Soap::Lite

    Jason L. Froebe

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

      XML documents are the same as any other document with respect to digital signatures

      Actually, no, not really, XML people have THEIR OWN methods of dealing with that, so signing with GPG while well-tested and working well, would be considered non-standard and you can encounter problems with interoperability.

        Actually both Yes and No depending on how you define an XML document. If you are referring to solely the content, then this is where http://www.w3.org/Signature comes in... the digital signature is stored outside of the document somewhere

        however, if you are referring to the document as including both the content AND the xml tokens, then you will be writing the digital signature for the file itself. the digital signature is stored outside of the document somewhere

        Now, http://www.w3.org/Signature also covers an encapsulated xml document where the you have a ** DOCUMENT ** within a top level document but the digital signature only covers the encapsulated xml document. The digital signature is stored within the top level document.

        Here is a quick write up on XML Digital Signatures

        Jason L. Froebe

        No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

      A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Perl support for XML
by saintmike (Vicar) on Sep 14, 2004 at 15:05 UTC
    2. verify digital signatures on returned XML documents.
    Do you mean something like xmlsec? I don't think there's a Perl wrapper for this C library yet, but you could write one using XS or SWIG.