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

unspecified namespace?

Expand Messages
  • scoraymond
    Hello all- I m a SOAP newbie, and I m having a heck of a time debugging a simple perl client that calls the TerraSeek[1] GIS services. Here s my script:
    Message 1 of 2 , Feb 8, 2002
    • 0 Attachment
      Hello all-

      I'm a SOAP newbie, and I'm having a heck of a time debugging a
      simple perl client that calls the TerraSeek[1] GIS services. Here's
      my script:

      #!/usr/bin/perl -w
      use SOAP::Lite;
      my $var2 = SOAP::Data->type('struct' =>
      {zip => '66044'})->name('args');
      my $result = SOAP::Lite
      -> uri('TerraSeek:GPS_Web_service')
      -> proxy('http://216.101.160.38/xmlrpc/soap_api.php')
      -> getCoords($var2)
      -> result;

      Running this results in the error/warning message "Unspecified
      namespace for type ':struct[1]'", followed by the full SOAP
      response. The service is supposed to return an array containing a
      struct containing two strings, 'lat' and 'long'.

      My question: what does this warning message mean, how can I correct
      it or suppress it, and how can I access the two returned strings?
      TIA for helping out a newbie.

      :scott raymond


      [1] getCoords() method: http://216.101.160.38/soap2.html?
      introspect=1&method=getCoords&host=&uri=&port=
    • Paul Kulchenko
      Hi, Scott! ... Don t specify struct in your parameter: my $var2 = SOAP::Data- name(args = {zip = 66044 }); If you expect to get an array of structs back,
      Message 2 of 2 , Feb 10, 2002
      • 0 Attachment
        Hi, Scott!

        > My question: what does this warning message mean, how can I correct
        > it or suppress it, and how can I access the two returned strings?
        > TIA for helping out a newbie.
        Don't specify 'struct' in your parameter:

        my $var2 = SOAP::Data->name(args => {zip => '66044'});

        If you expect to get an array of structs back, then all you need to
        do is this:

        print $result->[0]->{lat};

        to access the first latitude.

        Best wishes, Paul.

        --- scoraymond <sco@...> wrote:
        > Hello all-
        >
        > I'm a SOAP newbie, and I'm having a heck of a time debugging a
        > simple perl client that calls the TerraSeek[1] GIS services. Here's
        >
        > my script:
        >
        > #!/usr/bin/perl -w
        > use SOAP::Lite;
        > my $var2 = SOAP::Data->type('struct' =>
        > {zip => '66044'})->name('args');
        > my $result = SOAP::Lite
        > -> uri('TerraSeek:GPS_Web_service')
        > -> proxy('http://216.101.160.38/xmlrpc/soap_api.php')
        > -> getCoords($var2)
        > -> result;
        >
        > Running this results in the error/warning message "Unspecified
        > namespace for type ':struct[1]'", followed by the full SOAP
        > response. The service is supposed to return an array containing a
        > struct containing two strings, 'lat' and 'long'.
        >
        > My question: what does this warning message mean, how can I correct
        >
        > it or suppress it, and how can I access the two returned strings?
        > TIA for helping out a newbie.
        >
        > :scott raymond
        >
        >
        > [1] getCoords() method: http://216.101.160.38/soap2.html?
        > introspect=1&method=getCoords&host=&uri=&port=
        >
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Send FREE Valentine eCards with Yahoo! Greetings!
        http://greetings.yahoo.com
      Your message has been successfully submitted and would be delivered to recipients shortly.