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

Problems with returned values from getEndpointInfo

Expand Messages
  • Wes Moulder
    Hey Bob, I m having troubles with the getEndpointInfo call. One of the Endpoints does not have a wsdlURL. This in itself is not a problem, however, shouldn t
    Message 1 of 4 , Apr 11, 2002
    • 0 Attachment

      Hey Bob,

      I’m having troubles with the getEndpointInfo call.  One of the Endpoints does not have a wsdlURL.  This in itself is not a problem, however, shouldn’t it be explicitly declared xsi:nil=’1’?

      I guess it boils down to the question “Is there a difference between a null value and an empty value?”.  If the type were xsd:string, then would there be a difference between sending a null string and sending “”?

      I fixed our tests to work around it, but I wanted to know if an empty element should be treated as a null value.

       

      Thanks,

      --Wes

    • Bob Cunnings
      Hi Wes, Well, it happens that the native type being serialized in this case is indeed an empty string. Since empty or zero length strings are supported by any
      Message 2 of 4 , Apr 11, 2002
      • 0 Attachment
        Hi Wes,

        Well, it happens that the native type being serialized in this case is indeed an empty string. Since empty or zero length strings are supported by any programming language an RPC service might be implemented in, sending an empty accessor element (zero characters) as the representation should interop ok.

        As for your question, in the case of SOAP encoded messages, could it be that the answer varies depending on what particular programming language is being used , and the nature of the string type being serialized? Here, for instance, strings are stored as VARIANTs, so "empty value" maps to a BSTR of length 0, and "null value" maps to a VARIANT of type VT_NULL. So there is a distinction made, and it's reflected in the encoding, as xsi:nil will appear on the accessor in the "null value" case.

        But I wonder if there are cases where the answer is "no".

        RC

        > Hey Bob,
        > I'm having troubles with the getEndpointInfo call. One of the Endpoints
        > does not have a wsdlURL. This in itself is not a problem, however,
        > shouldn't it be explicitly declared xsi:nil='1'?
        > I guess it boils down to the question "Is there a difference between a
        > null value and an empty value?". If the type were xsd:string, then
        > would there be a difference between sending a null string and sending
        > ""?
        > I fixed our tests to work around it, but I wanted to know if an empty
        > element should be treated as a null value.
        >
        > Thanks,
        > --Wes
        >
      • Wes Moulder
        Bob, We have been mapping anyURI, which is the declared type of the wsdlURL, to java.net.URL. After rereading the rfc for URIs, it looks like we re too
        Message 3 of 4 , Apr 12, 2002
        • 0 Attachment

          Bob,

           We have been mapping anyURI, which is the declared type of the wsdlURL, to java.net.URL.  After rereading the rfc for URIs, it looks like we’re too restrictive, as we don’t allow relative URIs through that way.  Am I correct in assuming a URI of “” is perfectly valid as a relative URI that would theoretically point to “the current document”?  It still doesn’t seem to be what was intended by that entry in the getEndpointInfo call.

           

          Thanks for your help,

          --Wes

           

          -----Original Message-----
          From: Bob Cunnings [mailto:cunnings@...]
          Sent: Friday, April 12, 2002 1:52 AM
          To: soapbuilders@yahoogroups.com
          Subject: Re: [soapbuilders] Problems with returned values from getEndpointInfo

           

          Hi Wes,

          Well, it happens that the native type being serialized in this case is indeed an empty string. Since empty or zero length strings are supported by any programming language an RPC service might be implemented in, sending an empty accessor element (zero characters) as the representation should interop ok.

          As for your question, in the case of SOAP encoded messages, could it be that the answer varies depending on what particular programming language is being used , and the nature of the string type being serialized? Here, for instance, strings are stored as VARIANTs, so "empty value" maps to a BSTR of length 0, and "null value" maps to a VARIANT of type VT_NULL. So there is a distinction made, and it's reflected in the encoding, as xsi:nil will appear on the accessor in the "null value" case.

          But I wonder if there are cases where the answer is "no".

          RC

          > Hey Bob,
          > I'm having troubles with the getEndpointInfo call.  One of the Endpoints
          > does not have a wsdlURL.  This in itself is not a problem, however,
          > shouldn't it be explicitly declared xsi:nil='1'?
          > I guess it boils down to the question "Is there a difference between a
          > null value and an empty value?".  If the type were xsd:string, then
          > would there be a difference between sending a null string and sending
          > ""?
          > I fixed our tests to work around it, but I wanted to know if an empty
          > element should be treated as a null value.

          > Thanks,
          > --Wes
          >




          -----------------------------------------------------------------
          This group is a forum for builders of SOAP implementations to discuss implementation and interoperability issues.  Please stay on-topic.

          To unsubscribe from this group, send an email to:
          soapbuilders-unsubscribe@yahoogroups.com



          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
        • Bob Cunnings
          Hi Wes, Oops, I was entirely forgetting that per the WSDL for the service the parameter wsdlURI is of type anyURI . So in this case I think you re right. I
          Message 4 of 4 , Apr 12, 2002
          • 0 Attachment
            Hi Wes,

            Oops, I was entirely forgetting that per the WSDL for the service
            the parameter "wsdlURI" is of type "anyURI". So in this case I think
            you're right. I should be sending a "nil" accessor since the
            semantic is that of "null value" as opposed to the empty URI "",
            meaning the current document.

            Seen in that light it's a bug in the service handler here, which
            should be passing a NULL value to the SOAP processor when
            pulls an empty value from the database. I'll fix it right away.

            Thanks,

            RC

            > Bob,
            > We have been mapping anyURI, which is the declared type of the wsdlURL,
            > to java.net.URL. After rereading the rfc for URIs, it looks like we're
            > too restrictive, as we don't allow relative URIs through that way. Am I
            > correct in assuming a URI of "" is perfectly valid as a relative URI
            > that would theoretically point to "the current document"? It still
            > doesn't seem to be what was intended by that entry in the
            > getEndpointInfo call.
            >
            > Thanks for your help,
            > --Wes
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.