Loading ...
Sorry, an error occurred while loading the content.

Crash course - SOAP::Lite / WSDL / Verisign DNS

Expand Messages
  • Brian Menges
    I m trying to get SOAP::Lite to work with our Verisign Managed DNS product, but I m having some difficulties in defining the soap objects and wanted to know if
    Message 1 of 2 , May 4, 2012
    • 0 Attachment
      I'm trying to get SOAP::Lite to work with our Verisign Managed DNS
      product, but I'm having some difficulties in defining the soap objects
      and wanted to know if I could get a small crash course on building and
      reading the SOAP messages and replies.

      The WSDL that I am using is here:
      https://api.verisigndns.com/dnsa-ws/V2.0/dnsaapi?wsdl

      The API is naturally:
      https://api.verisigndns.com

      At the top I'm defining:
      use SOAP::Lite +autodispatch =>
      uri => 'https://api.verisigndns.com/dnsa-ws/V2.0/dnsaapi?wsdl',
      proxy => 'https://api.verisigndns.com';

      and my attempted call for 'getCustomerList' is:
      my $soap = SOAP::Lite->call(
      SOAP::Header->name('authInfo'),
      SOAP::Header->name('userToken'),
      SOAP::Header->name('userName','<username>'),
      SOAP::Header->name('password','<password>'),
      SOAP::Data->name('getCustomerList')
      );

      doing 'print $soap;' prints the number 1; not sure if this is success
      or not... because I don't see the related output per a python script
      that I had. Also 'print $soap->result;' prints nothing...

      Is there a way that I can display the soap envelope before I fire it
      off to the API? and then decode/print the response? I'm trying to
      search for this but I'm at a loss.

      Naturally they have a very expansive API, so I have to write lots of
      containers to utilize this, but if I can define the functions to build
      my SOAPs then great, but I just can't see the data structures via my
      normal methods. Help?

      ~Brian
    • Martin Busik
      Hi Brian, ... The wsdl you refer to does not contain a specification of the contents of a authInfo element. I suppose, the expected header-structure is
      Message 2 of 2 , May 4, 2012
      • 0 Attachment
        Hi Brian,

        > The WSDL that I am using is here:
        > https://api.verisigndns.com/dnsa-ws/V2.0/dnsaapi?wsdl
        >
        > The API is naturally:
        > https://api.verisigndns.com
        >
        > At the top I'm defining:
        > use SOAP::Lite +autodispatch =>
        > uri => 'https://api.verisigndns.com/dnsa-ws/V2.0/dnsaapi?wsdl',
        > proxy => 'https://api.verisigndns.com';
        >
        > and my attempted call for 'getCustomerList' is:
        > my $soap = SOAP::Lite->call(
        > SOAP::Header->name('authInfo'),
        > SOAP::Header->name('userToken'),
        > SOAP::Header->name('userName','<username>'),
        > SOAP::Header->name('password','<password>'),
        > SOAP::Data->name('getCustomerList')
        > );
        >

        The wsdl you refer to does not contain a specification of the contents of a
        "authInfo" element.
        I suppose, the expected header-structure is something like:

        <authInfo>
        <userToken>
        <userName>name</userName>
        <password>pWpW</password>
        </userToken>
        </authInfo

        i.e. authInfo is of complex type.
        You might find an idea how to create such header data in:

        http://www.wlp-systems.de/soap-lite-and-ws-security.html

        > Is there a way that I can display the soap envelope before I fire it off
        to the
        > API? and then decode/print the response? I'm trying to search for this but
        I'm
        > at a loss.

        There are some way, the simplest one:
        use SOAP::Lite (+trace => [qw(transport debug parameters)]);

        HTH,
        Martin
      Your message has been successfully submitted and would be delivered to recipients shortly.