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

5877xsd:anyURI and .NET

Expand Messages
  • David Hall
    Feb 26, 2007
      Hi folks -

      I'm having some weird issue when using a URL with an encoded
      ampersand. The SOAP::Lite code decodes it from "&" to "&" and
      applies the xsd:anyURI. Unfortunately, the .NET server I'm talking to
      upchucks on that. Leaving the ampersand decoded seems to break the
      rules of XML but perhaps the xsd:anyURI overrides that. Reading the
      XML specification makes my head hurt, so I'm not sure what the
      "correct" behavior is.


      Searching these forums didn't really turn up anything related to my
      issue in particular. Searching the .NET support forums didn't turn up
      anything either.

      Forcing the code to treat URL's as strings makes everything work
      correctly, but seems like a bad idea for me to be hacking at the
      internals of SOAP::Lite. Just an FYI, this is the code I changed to
      verify that it would work:

      'anyURI' =>
      # [95, sub { $_[0] =~ /^(urn:)|(http:\/\/)/i; }, 'as_anyURI'],
      [95, sub { $_[0] =~ /^(urn:)|(http:\/\/)/i; }, 'as_string'],

      It's in the object initialization area.

      Any idea how to handle this a little more effectively/prettier
      assuming that there's nothing I can do on the .NET side of the fence?