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

Re: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType

Expand Messages
  • Graham Irvine
    Hi The server doesnt understand the datatye anytype , possibly the error is slightly misleading it that it probably understands the datatype but a parameter
    Message 1 of 5 , Apr 18, 2005
    • 0 Attachment
      Hi

      The server doesnt understand the datatye "anytype" , possibly the
      error is slightly misleading it that it probably understands the
      datatype but a parameter you are sending is being mistyped.

      You will need to look at either the SOAP being sent or the WSDL of
      what the server expects and set the "->type('<datatype>')" explicitly
      for that parameter.

      Graham


      --- In soaplite@yahoogroups.com, "Tom Drought" <tdrought@h...> wrote:
      >
      > I have a SOAP:Lite script which is making a call to SOAP and am
      > receiving this error message:
      >
      > soapenv:Server.userException org.xml.sax.SAXException: No deserializer
      > for {http://www.w3.org/2001/XMLSchema}anyType
      >
      > Anyone know why, and how it can be fixed.
      >
      > Thanks,
      > Tom
    • Byrne Reese
      http://www.w3.org/TR/xmlschema-0/#anyType Curious that it is not recognized. Have you tried xsd:any - that maybe recognized in lieu of xsd:anyType, which
      Message 2 of 5 , Apr 18, 2005
      • 0 Attachment
        http://www.w3.org/TR/xmlschema-0/#anyType

        Curious that it is not recognized.

        Have you tried "xsd:any" - that maybe recognized in lieu of xsd:anyType,
        which despite it being in the spec, I rarely see. I usually see
        "xsd:any" for some reason. Or perhaps my memory is failing me. :-/


        Graham Irvine wrote:

        >
        > Hi
        >
        > The server doesnt understand the datatye "anytype" , possibly the
        > error is slightly misleading it that it probably understands the
        > datatype but a parameter you are sending is being mistyped.
        >
        > You will need to look at either the SOAP being sent or the WSDL of
        > what the server expects and set the "->type('<datatype>')" explicitly
        > for that parameter.
        >
        > Graham
        >
        >
        > --- In soaplite@yahoogroups.com, "Tom Drought" <tdrought@h...> wrote:
        > >
        > > I have a SOAP:Lite script which is making a call to SOAP and am
        > > receiving this error message:
        > >
        > > soapenv:Server.userException org.xml.sax.SAXException: No deserializer
        > > for {http://www.w3.org/2001/XMLSchema}anyType
        > <http://www.w3.org/2001/XMLSchema%7DanyType>
        > >
        > > Anyone know why, and how it can be fixed.
        > >
        > > Thanks,
        > > Tom
        >
        >
        >
        >
        > ------------------------------------------------------------------------
        > *Yahoo! Groups Links*
        >
        > * To visit your group on the web, go to:
        > http://groups.yahoo.com/group/soaplite/
        >
        > * To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        > <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
        >
        > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
        > Service <http://docs.yahoo.com/info/terms/>.
        >
        >
      • Graham Irvine
        Hi Byrne Yes it should undestand it (Although Apache implementations of SOAP ( Xerces) had a problem with it for ages. I think its fixed now ). I was
        Message 3 of 5 , Apr 18, 2005
        • 0 Attachment
          Hi Byrne

          Yes it should undestand it (Although Apache implementations of SOAP (
          Xerces) had a problem with it for ages. I think its fixed now ).

          I was suggesting that the error message was not giving the true cause
          of error and was misrepresnting anothere error in the client code.
          (Since anyType is most often used in ArrayType data structures).

          Tom posted me the details via email (by mistake im sure .. damn yahoo
          group defaults to direct reply :( ) . But i'm copying it back to the
          list as its a nice excercise in building a complex soap query .

          This is what the server is expecting

          <otherParams xsi:type="soapenc:Array" soapenc:arrayType="xsd:anyType
          [5]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
          <item xsi:type="soapenc:Array" soapenc:arrayType="xsd:anyType
          [2]" xmlns:ns2="http://www.w3.org/2002/12/soap-encoding">
          <item xsi:type="xsd:string">domain_name</item>
          <item xsi:type="xsd:string">hostname.net</item>
          </item>
          <item xsi:type="soapenc:Array" soapenc:arrayType="xsd:anyType
          [2]" xmlns:ns3="http://www.w3.org/2002/12/soap-encoding">
          <item xsi:type="xsd:string">seller_id</item>
          <item xsi:type="xsd:string">1</item>
          </item>
          </otherParams>

          He was constructing it as follows

          my $otherparams = SOAP::Data->name('otherParams' =>
          \SOAP::Data->value(
          SOAP::Data->name("item" =>
          \SOAP::Data->value(
          SOAP::Data->type('string')->name
          ('item' => 'domain_name'), #domain name
          SOAP::Data->type('string')->name
          ('item' => 'xmltester.com') #domain name
          )
          ),
          SOAP::Data->name("item" =>
          \SOAP::Data->value(
          SOAP::Data->type('string')->name
          ('item' => 'seller_id'), #????
          SOAP::Data->type('string')->name
          ('item' => '0') #????
          )
          )
          )
          );

          so you can see the issue , error is being thrown because array
          construct is all wrong. I dont know about everyone else but to me It
          seems to be a real problem with almost all soap servers Except of
          course for SOAP::Lite <laughs>, giving false errors . I always take
          them with a pinch of salt.

          Now an attempt to construct above ..

          This is my off the top of my head attempt. I am sure there will be a
          few typos etc as im typing this directly into here and not using an
          editor.

          firstly unless you want to hard code this request you will almost
          certainly want to create the arrays in perl and i guess this will be
          in the context of input or loaded data.

          So a mock up of that ...

          my $records = 5; # Im setting a constant here as im not sure from
          SOAP envelope why this is 5 ??
          # Get Request Data
          my @host =('domain_name','xmltesters.com');
          $hsize = @host;
          my @seller = ('seller_id','1');
          $ssize = @seller;

          my $request = SOAP::Data->name('OtherParams')->attr({"xsi:type"=>
          "SOAP-ENC:Array",
          "SOAP-ENC:arrayType" => "xsd:string[$records]",
          xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"}) =>
          SOAP::Data->name("item")->attr({"xsi:type"=> "SOAP-ENC:Array",
          "SOAP-ENC:arrayType" => "xsd:anyType[$hsize]",
          xmlns:ns2="http://www.w3.org/2002/12/soap-encoding"})
          =>
          SOAP::Data->name("item" =>(SOAP::Data->value(@host)->type("string")),
          SOAP::Data->name("item")->attr({"xsi:type"=> "SOAP-ENC:Array",
          "SOAP-ENC:arrayType" => "xsd:anyType[$ssize]",
          xmlns:ns3="http://www.w3.org/2002/12/soap-encoding"})
          =>
          SOAP::Data->name("item" =>(SOAP::Data->value(@seller)->type("string"))
          );

          Im sure you will have some more work to do Tom to declare the
          namespaces etc ns2 and ns3 elswhere .. but this give or take a few
          missing brackets should just about do it.

          Graham


          --- In soaplite@yahoogroups.com, Byrne Reese <byrne@m...> wrote:
          > http://www.w3.org/TR/xmlschema-0/#anyType
          >
          > Curious that it is not recognized.
          >
          > Have you tried "xsd:any" - that maybe recognized in lieu of
          xsd:anyType,
          > which despite it being in the spec, I rarely see. I usually see
          > "xsd:any" for some reason. Or perhaps my memory is failing me. :-/
          >
          >
          > Graham Irvine wrote:
          >
          > >
          > > Hi
          > >
          > > The server doesnt understand the datatye "anytype" , possibly the
          > > error is slightly misleading it that it probably understands the
          > > datatype but a parameter you are sending is being mistyped.
          > >
          > > You will need to look at either the SOAP being sent or the WSDL of
          > > what the server expects and set the "->type('<datatype>')" explicitly
          > > for that parameter.
          > >
          > > Graham
          > >
          > >
          > > --- In soaplite@yahoogroups.com, "Tom Drought" <tdrought@h...> wrote:
          > > >
          > > > I have a SOAP:Lite script which is making a call to SOAP and am
          > > > receiving this error message:
          > > >
          > > > soapenv:Server.userException org.xml.sax.SAXException: No
          deserializer
          > > > for {http://www.w3.org/2001/XMLSchema}anyType
          > > <http://www.w3.org/2001/XMLSchema%7DanyType>
          > > >
          > > > Anyone know why, and how it can be fixed.
          > > >
          > > > Thanks,
          > > > Tom
          > >
          > >
          > >
          > >
          > >
          ------------------------------------------------------------------------
          > > *Yahoo! Groups Links*
          > >
          > > * To visit your group on the web, go to:
          > > http://groups.yahoo.com/group/soaplite/
          > >
          > > * To unsubscribe from this group, send an email to:
          > > soaplite-unsubscribe@yahoogroups.com
          > >
          <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
          > >
          > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
          > > Service <http://docs.yahoo.com/info/terms/>.
          > >
          > >
        • Tom Drought
          I had it right in front of my face for a day, but, did not see it. I had made a search and got some code from MajorDomo, but, I didn t set it up right. Thanks
          Message 4 of 5 , Apr 19, 2005
          • 0 Attachment
            I had it right in front of my face for a day, but, did not see it. I
            had made a search and got some code from MajorDomo, but, I didn't
            set it up right.

            Thanks to Graham, I now have it working. I'm sure I'll have to clean
            it up though, but, it works.

            This is what I had written yesterday:

            my $otherparams = SOAP::Data->name('otherParams' =>
            \SOAP::Data->value(
            SOAP::Data->name("item" =>
            \SOAP::Data->value(
            SOAP::Data->type('xsd:string')->name
            ('item' => 'domain_name'), #domain name
            SOAP::Data->type('xsd:string')->name
            ('item' => 'xmltester.com') #domain name
            )
            )->attr({'xsi:type'=>'soapenc:Array'})->attr
            ({'soapenc:arrayType'=>'xsd:anyType[2]'})->attr
            ({'xmlns:ns2'=>'http://www.w3.org/2002/12/soap-encoding'}),
            SOAP::Data->name("item" =>
            \SOAP::Data->value(
            SOAP::Data->type('xsd:string')->name
            ('item' => 'seller_id'), #????
            SOAP::Data->type('xsd:string')->name
            ('item' => '0') #????
            )
            )->attr({'xsi:type'=>'soapenc:Array'})->attr
            ({'soapenc:arrayType'=>'xsd:anyType[3]'})->attr
            ({'xmlns:ns2'=>'http://www.w3.org/2002/12/soap-encoding'})
            )
            )->attr({'xsi:type'=>'soapenc:Array'})->attr
            ({'soapenc:arrayType'=>'xsd:anyType[5]'})->attr
            ({'xmlns:soapenc'=>'http://schemas.xmlsoap.org/soap/encoding/'});


            When I studied the code Graham sent me, I decided to combine the
            Attr to:
            attr({'xsi:type'=>'soapenc:Array','soapenc:arrayType'=>'xsd:anyType
            [2]','xmlns:ns6'=>'http://www.w3.org/2002/12/soap-encoding'})

            Now it works. :)) Thank you Graham. Thanks to everyone who helped.

            Tom

            --- In soaplite@yahoogroups.com, "Graham Irvine" <graham@g...> wrote:
            >
            > Hi Byrne
            >
            > Yes it should undestand it (Although Apache implementations of
            SOAP (
            > Xerces) had a problem with it for ages. I think its fixed now ).
            >
            > I was suggesting that the error message was not giving the true
            cause
            > of error and was misrepresnting anothere error in the client code.
            > (Since anyType is most often used in ArrayType data structures).
            >
            > Tom posted me the details via email (by mistake im sure .. damn
            yahoo
            > group defaults to direct reply :( ) . But i'm copying it back to
            the
            > list as its a nice excercise in building a complex soap query .
            >
            > This is what the server is expecting
            >
            > <otherParams xsi:type="soapenc:Array"
            soapenc:arrayType="xsd:anyType
            > [5]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
            > <item xsi:type="soapenc:Array" soapenc:arrayType="xsd:anyType
            > [2]" xmlns:ns2="http://www.w3.org/2002/12/soap-encoding">
            > <item xsi:type="xsd:string">domain_name</item>
            > <item xsi:type="xsd:string">hostname.net</item>
            > </item>
            > <item xsi:type="soapenc:Array" soapenc:arrayType="xsd:anyType
            > [2]" xmlns:ns3="http://www.w3.org/2002/12/soap-encoding">
            > <item xsi:type="xsd:string">seller_id</item>
            > <item xsi:type="xsd:string">1</item>
            > </item>
            > </otherParams>
            >
            > He was constructing it as follows
            >
            > my $otherparams = SOAP::Data->name('otherParams' =>
            > \SOAP::Data->value(
            > SOAP::Data->name("item" =>
            > \SOAP::Data->value(
            > SOAP::Data->type('string')->name
            > ('item' => 'domain_name'), #domain name
            > SOAP::Data->type('string')->name
            > ('item' => 'xmltester.com') #domain name
            > )
            > ),
            > SOAP::Data->name("item" =>
            > \SOAP::Data->value(
            > SOAP::Data->type('string')->name
            > ('item' => 'seller_id'), #????
            > SOAP::Data->type('string')->name
            > ('item' => '0') #????
            > )
            > )
            > )
            > );
            >
            > so you can see the issue , error is being thrown because array
            > construct is all wrong. I dont know about everyone else but to me
            It
            > seems to be a real problem with almost all soap servers Except of
            > course for SOAP::Lite <laughs>, giving false errors . I always take
            > them with a pinch of salt.
            >
            > Now an attempt to construct above ..
            >
            > This is my off the top of my head attempt. I am sure there will be
            a
            > few typos etc as im typing this directly into here and not using an
            > editor.
            >
            > firstly unless you want to hard code this request you will almost
            > certainly want to create the arrays in perl and i guess this will
            be
            > in the context of input or loaded data.
            >
            > So a mock up of that ...
            >
            > my $records = 5; # Im setting a constant here as im not sure from
            > SOAP envelope why this is 5 ??
            > # Get Request Data
            > my @host =('domain_name','xmltesters.com');
            > $hsize = @host;
            > my @seller = ('seller_id','1');
            > $ssize = @seller;
            >
            > my $request = SOAP::Data->name('OtherParams')->attr({"xsi:type"=>
            > "SOAP-
            ENC:Array",
            > "SOAP-ENC:arrayType" => "xsd:string[$records]",
            > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"}) =>
            > SOAP::Data->name("item")->attr({"xsi:type"=> "SOAP-ENC:Array",
            > "SOAP-ENC:arrayType" => "xsd:anyType[$hsize]",
            > xmlns:ns2="http://www.w3.org/2002/12/soap-encoding"})
            > =>
            > SOAP::Data->name("item" =>(SOAP::Data->value(@host)->type
            ("string")),
            > SOAP::Data->name("item")->attr({"xsi:type"=> "SOAP-ENC:Array",
            > "SOAP-ENC:arrayType" => "xsd:anyType[$ssize]",
            > xmlns:ns3="http://www.w3.org/2002/12/soap-encoding"})
            > =>
            > SOAP::Data->name("item" =>(SOAP::Data->value(@seller)->type
            ("string"))
            > );
            >
            > Im sure you will have some more work to do Tom to declare the
            > namespaces etc ns2 and ns3 elswhere .. but this give or take a few
            > missing brackets should just about do it.
            >
            > Graham
            >
            >
            > --- In soaplite@yahoogroups.com, Byrne Reese <byrne@m...> wrote:
            > > http://www.w3.org/TR/xmlschema-0/#anyType
            > >
            > > Curious that it is not recognized.
            > >
            > > Have you tried "xsd:any" - that maybe recognized in lieu of
            > xsd:anyType,
            > > which despite it being in the spec, I rarely see. I usually see
            > > "xsd:any" for some reason. Or perhaps my memory is failing me. :-
            /
            > >
            > >
            > > Graham Irvine wrote:
            > >
            > > >
            > > > Hi
            > > >
            > > > The server doesnt understand the datatye "anytype" , possibly
            the
            > > > error is slightly misleading it that it probably understands
            the
            > > > datatype but a parameter you are sending is being mistyped.
            > > >
            > > > You will need to look at either the SOAP being sent or the
            WSDL of
            > > > what the server expects and set the "->type('<datatype>')"
            explicitly
            > > > for that parameter.
            > > >
            > > > Graham
            > > >
            > > >
            > > > --- In soaplite@yahoogroups.com, "Tom Drought" <tdrought@h...>
            wrote:
            > > > >
            > > > > I have a SOAP:Lite script which is making a call to SOAP and
            am
            > > > > receiving this error message:
            > > > >
            > > > > soapenv:Server.userException org.xml.sax.SAXException: No
            > deserializer
            > > > > for {http://www.w3.org/2001/XMLSchema}anyType
            > > > <http://www.w3.org/2001/XMLSchema%7DanyType>
            > > > >
            > > > > Anyone know why, and how it can be fixed.
            > > > >
            > > > > Thanks,
            > > > > Tom
            > > >
            > > >
            > > >
            > > >
            > > >
            > -------------------------------------------------------------------
            -----
            > > > *Yahoo! Groups Links*
            > > >
            > > > * To visit your group on the web, go to:
            > > > http://groups.yahoo.com/group/soaplite/
            > > >
            > > > * To unsubscribe from this group, send an email to:
            > > > soaplite-unsubscribe@yahoogroups.com
            > > >
            > <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
            > > >
            > > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms
            of
            > > > Service <http://docs.yahoo.com/info/terms/>.
            > > >
            > > >
          Your message has been successfully submitted and would be delivered to recipients shortly.