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

I am using SOAP::Lite to make a call:
$HOST = "http://localhost/devel/soap_mini/echo.cgi"; $NS = "urn:/SOAPY/Echo"; $PHRASE = shift; my $soap = SOAP::Lite ->readable(1) ->uri($NS) ->proxy($HOST);
The call works and I get the correct data back but I am getting errors in my httpd-error.log file:
[Tue Jan 21 11:08:07 2003] [error] [client 127.0.0.1] Illegal namespac +e identifier '/soapy/echo' for URN 'urn:/SOAPY/Echo' at /usr/local/li +b/perl5/site_perl/5.8.0/SOAP/Lite.pm line 2097
What is the correct format for the uri() call?

Thanks

Edit by tye, change PRE around all to CODE parts

Replies are listed 'Best First'.
Re: SOAP::Lite and uri/urn
by diotalevi (Canon) on Jan 21, 2003 at 19:36 UTC

    I always thought that URIs had to have two forward slashes after the protocol. You wrote only one.

    Update Well I goofed. URN does not mean URI. It does however look like you are using a reserved character (slash) in your namespace identifier. A probable reformulation of your URN: urn:SOAPY:echo. You'll want to revisit RFC 2141 at http://www.ietf.org/rfc/rfc2141.txt. The grammar is right up front so it's not imposing or anything.


    Seeking Green geeks in Minnesota

      Thanks for the response. This morning I changed:
      $NS = "urn:SOAPY/Echo";
      to
      $NS = "SOAPY/Echo";
      and it worked with no errors.

        That's good you don't get an error. I'm sceptical of this approach though. The parameter name is URI. You mentioned URNs. "SOAPY/Echo" isn't valid as either a URI or as a URN. Either that or it's ok as a relative URI fragment but all in all this just looks fishy to me.


        Seeking Green geeks in Minnesota