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

6316Re: [soaplite] suppress type info

Expand Messages
  • Srinivas Vippagunta
    Apr 2, 2009
      Thanks peter. I tried that and it works but I was somehow hesitant in using
      the raw xml. I figured out a way to suppress the type info. I created a
      custom serializer and in it I "overwrote" the typelookup method.

      sub typelookup() {
      return undef;
      }

      This worked like a charm, but I am not aware of any other side-effects it
      may have.

      I have also tried setting autotype() to false but it didn't work.

      Thanks,
      Srinivas.

      On 4/2/09 2:33 PM, "Petar Shangov" <pshangov@...> wrote:

      >
      > You can always create the xml you need using whatever tool you wish and them
      > pass it in raw format to SOAP::Data.
      >
      > From the docs:
      >
      > $xml_content = "<foo><bar>123</bar></foo>";
      > $elem = SOAP::Data->type('xml' => $xml_content);
      >
      >
      > ----- Original Message ----
      >> From: Srinivas Vippagunta <sriniv@...>
      >> To: soaplite@yahoogroups.com
      >> Sent: Thursday, 2 April, 2009 23:52:34
      >> Subject: [soaplite] suppress type info
      >>
      >> Hello,
      >> Is there an easy way to suppress the type info in a request? For eg:
      >>
      >> my $method = SOAP::Data->name('TestMethod')
      >> ->attr({xmlns => 'http://abc.com/'});
      >>
      >> @params = ( SOAP::Data->name("param1" => 'abc'),
      >> SOAP::Data->name("myquery" => \SOAP::Data->value(
      >>
      >> SOAP::Data->name("Parameter" =>'')
      >> ->attr({
      >> 'key1' =>'abc1',
      >>
      >> 'Value1' =>'1234'
      >> }
      >> )
      >> ->attr({xmlns => 'http://abcd.com/xyz'});
      >> my $som1 = $s->call($method => @params);
      >>
      >> the above call generates an soap request with types in it and I am
      >> getting an error because of that. My request looks like as shown below.
      >> How can I suppress the xsi:type info. Should I override the Serializer?
      >> Is this the only way.
      >>
      >>
      >>
      >> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      >> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      >> soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      >>
      >>
      >> abc
      >>
      >>
      >> KeyId="abc1"/>
      >>
      >>
      >>
      >>
      >>
      >> thanks,
      >> Srinivas.
      >>
      >>
      >>
      >>
      >> ------------------------------------
      >>
      >> Yahoo! Groups Links
      >>
      >>
      >>
    • Show all 5 messages in this topic