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

Empty element; xsi:type="xsd:string" attribute -> .NET client spits up

Expand Messages
  • dcgrigsby <dan@unpossible.com>
    Hi, I m successfully using a VB.Net client with a Soap::Lite based server. I ve run into a problem that doesn t appear to be one of the .NET FAQs, so I
    Message 1 of 2 , Dec 22, 2002
    • 0 Attachment
      Hi,

      I'm successfully using a VB.Net client with a Soap::Lite based
      server. I've run into a problem that doesn't appear to be one of
      the .NET FAQs, so I thought I'd ask:

      I am trying to return an empty tag with a single attribute. I use

      return SOAP::Data
      ->name("{http://webservices.mozo.com/LookUp}Item" => "")
      ->attr({"{http://webservices.mozo.com/LookUp}key" => "somekey"})
      ;

      The service returns the following element (extracted from the
      headers):

      <namesp2:Item namesp3:key="somekey" xsi:type="xsd:string"
      xmlns:namesp2="http://webservices.mozo.com/LookUp"/>

      .NET spits up because of the xsi:type attribute in there. I used
      the full results to write a CGI to output the soap message, stripped
      out the xsi:type attribute and it works.

      So the question is: how can I get an empty element with out having
      a xsi:type attribute?

      Thanks,

      Dan
    • dcgrigsby <dan@unpossible.com>
      Answering my own question: 1) Added - type( ) to strip out the xsi:type 2) Removed unnecessary {http://webservices.mozo.com/LookUp} namespace decl from attr.
      Message 2 of 2 , Dec 22, 2002
      • 0 Attachment
        Answering my own question:

        1) Added ->type("") to strip out the xsi:type
        2) Removed unnecessary {http://webservices.mozo.com/LookUp}
        namespace decl from attr.

        Sorry for the double-post.

        --- In soaplite@yahoogroups.com, "dcgrigsby <dan@u...>" <dan@u...>
        wrote:
        > Hi,
        >
        > I'm successfully using a VB.Net client with a Soap::Lite based
        > server. I've run into a problem that doesn't appear to be one of
        > the .NET FAQs, so I thought I'd ask:
        >
        > I am trying to return an empty tag with a single attribute. I use
        >
        > return SOAP::Data
        > ->name("{http://webservices.mozo.com/LookUp}Item" => "")
        > ->attr({"{http://webservices.mozo.com/LookUp}key" => "somekey"})
        > ;
        >
        > The service returns the following element (extracted from the
        > headers):
        >
        > <namesp2:Item namesp3:key="somekey" xsi:type="xsd:string"
        > xmlns:namesp2="http://webservices.mozo.com/LookUp"/>
        >
        > .NET spits up because of the xsi:type attribute in there. I used
        > the full results to write a CGI to output the soap message,
        stripped
        > out the xsi:type attribute and it works.
        >
        > So the question is: how can I get an empty element with out having
        > a xsi:type attribute?
        >
        > Thanks,
        >
        > Dan
      Your message has been successfully submitted and would be delivered to recipients shortly.