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

Trouble retrieving base64Binary

Expand Messages
  • trond_straume
    Hi! I m requesting a base64Binary-file from a soap-server, but I get this errormessage when trying to retrieve it with SOAP::Lite. The xml-code seems valid
    Message 1 of 4 , Oct 25, 2002
    • 0 Attachment
      Hi!

      I'm requesting a base64Binary-file from a soap-server, but I get this
      errormessage when trying to retrieve it with SOAP::Lite.

      The xml-code seems valid soap-code to me...

      What do I do to get SOAP::Lite understanding ns2:base64Binary? Is
      there any workaround?

      This is what SOAP::Lite prompts:

      Unrecognized type '{http://schemas.xmlsoap.org/soap/encoding/}
      base64Binary'
      <?xml version='1.0' encoding='UTF-8'?>
      <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body>
      <ns1:getFile xmlns:ns1="urn:service" SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <return xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
      xsi:type="ns2:Array" xmlns:ns3="http://myserver/my.xsd"
      ns2:arrayType="ns3:myStruct[1]">
      <item xsi:type="ns3:myStruct">
      <file xsi:type="ns2:base64Binary">JVE ... g0K</file>
      </item>
      </return>
      </ns1:getFile>

      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>


      Regards

      Trond Straume
    • Paul Kulchenko
      Hi Trond, That s an interesting question. There was a couple of discussions on soapbuilders list about this issue. SOAP 1.1 came with XML Schema 1999 that was
      Message 2 of 4 , Oct 28, 2002
      • 0 Attachment
        Hi Trond,

        That's an interesting question. There was a couple of discussions on
        soapbuilders list about this issue. SOAP 1.1 came with XML Schema
        1999 that was current at that moment and schema for SOAP 1.1 spec
        included data types according to that schema. When XML Schema 2001
        was released, schema for SOAP 1.1 was updated to reflect changes in
        new schema, but I would argue that that was not the right way to do
        it, because there is no versioning mechanism in the SOAP spec that
        allows you to change the schema it is referring to.

        So, SOAP::Lite still uses "old" types, but in most cases it's not a
        problem, because only few toolkits send data in SOAP namespace (most
        use XML Schema to do that, and there is no ambiguity about those data
        types).

        To get SOAP::Lite to accept base64Binary in SOAP 1.1, you can add
        this line:

        *SOAP::XMLSchemaSOAP1_1::Deserializer::as_base64Binary =
        \&SOAP::XMLSchema2001::Deserializer::as_base64Binary;

        Best wishes, Paul.

        --- trond_straume <trond.straume@...> wrote:
        > I'm requesting a base64Binary-file from a soap-server, but I get
        > this errormessage when trying to retrieve it with SOAP::Lite.
        >
        > The xml-code seems valid soap-code to me...
        >
        > What do I do to get SOAP::Lite understanding ns2:base64Binary? Is
        > there any workaround?
        >
        > This is what SOAP::Lite prompts:
        >
        > Unrecognized type '{http://schemas.xmlsoap.org/soap/encoding/}
        > base64Binary'
        > <?xml version='1.0' encoding='UTF-8'?>
        > <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        > <SOAP-ENV:Body>
        > <ns1:getFile xmlns:ns1="urn:service" SOAP-
        > ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        > <return xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
        > xsi:type="ns2:Array" xmlns:ns3="http://myserver/my.xsd"
        > ns2:arrayType="ns3:myStruct[1]">
        > <item xsi:type="ns3:myStruct">
        > <file xsi:type="ns2:base64Binary">JVE ... g0K</file>
        > </item>
        > </return>
        > </ns1:getFile>
        >
        > </SOAP-ENV:Body>
        > </SOAP-ENV:Envelope>
        >
        >
        > Regards
        >
        > Trond Straume
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do you Yahoo!?
        HotJobs - Search new jobs daily now
        http://hotjobs.yahoo.com/
      • trond_straume
        THANKS for your answer. Now I get it... Trond ... data
        Message 3 of 4 , Oct 31, 2002
        • 0 Attachment
          THANKS for your answer. Now I get it...

          Trond

          --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
          > Hi Trond,
          >
          > That's an interesting question. There was a couple of discussions on
          > soapbuilders list about this issue. SOAP 1.1 came with XML Schema
          > 1999 that was current at that moment and schema for SOAP 1.1 spec
          > included data types according to that schema. When XML Schema 2001
          > was released, schema for SOAP 1.1 was updated to reflect changes in
          > new schema, but I would argue that that was not the right way to do
          > it, because there is no versioning mechanism in the SOAP spec that
          > allows you to change the schema it is referring to.
          >
          > So, SOAP::Lite still uses "old" types, but in most cases it's not a
          > problem, because only few toolkits send data in SOAP namespace (most
          > use XML Schema to do that, and there is no ambiguity about those
          data
          > types).
          >
          > To get SOAP::Lite to accept base64Binary in SOAP 1.1, you can add
          > this line:
          >
          > *SOAP::XMLSchemaSOAP1_1::Deserializer::as_base64Binary =
          > \&SOAP::XMLSchema2001::Deserializer::as_base64Binary;
          >
          > Best wishes, Paul.
          >
          > --- trond_straume <trond.straume@o...> wrote:
          > > I'm requesting a base64Binary-file from a soap-server, but I get
          > > this errormessage when trying to retrieve it with SOAP::Lite.
          > >
          > > The xml-code seems valid soap-code to me...
          > >
          > > What do I do to get SOAP::Lite understanding ns2:base64Binary? Is
          > > there any workaround?
          > >
          > > This is what SOAP::Lite prompts:
          > >
          > > Unrecognized type '{http://schemas.xmlsoap.org/soap/encoding/}
          > > base64Binary'
          > > <?xml version='1.0' encoding='UTF-8'?>
          > > <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
          > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          > > <SOAP-ENV:Body>
          > > <ns1:getFile xmlns:ns1="urn:service" SOAP-
          > > ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
          > > <return xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
          > > xsi:type="ns2:Array" xmlns:ns3="http://myserver/my.xsd"
          > > ns2:arrayType="ns3:myStruct[1]">
          > > <item xsi:type="ns3:myStruct">
          > > <file xsi:type="ns2:base64Binary">JVE ... g0K</file>
          > > </item>
          > > </return>
          > > </ns1:getFile>
          > >
          > > </SOAP-ENV:Body>
          > > </SOAP-ENV:Envelope>
          > >
          > >
          > > Regards
          > >
          > > Trond Straume
          > >
          > >
          > > ------------------------ Yahoo! Groups Sponsor
          > >
          > > To unsubscribe from this group, send an email to:
          > > soaplite-unsubscribe@y...
          > >
          > >
          > >
          > > Your use of Yahoo! Groups is subject to
          > > http://docs.yahoo.com/info/terms/
          > >
          > >
          >
          >
          > __________________________________________________
          > Do you Yahoo!?
          > HotJobs - Search new jobs daily now
          > http://hotjobs.yahoo.com/
        • Paul Harman
          ... Hmmm. I tried this in my application, but I still get the following: Name SOAP::XMLSchemaSOAP1_1::Deserializer::as_base64Binary used only once: possible
          Message 4 of 4 , Nov 21, 2003
          • 0 Attachment
            --- In soaplite@yahoogroups.com, Paul Kulchenko <paulclinger@y...>
            wrote:
            > To get SOAP::Lite to accept base64Binary in SOAP 1.1, you can add
            > this line:
            >
            > *SOAP::XMLSchemaSOAP1_1::Deserializer::as_base64Binary =
            > \&SOAP::XMLSchema2001::Deserializer::as_base64Binary;


            Hmmm. I tried this in my application, but I still get the following:

            Name "SOAP::XMLSchemaSOAP1_1::Deserializer::as_base64Binary" used
            only once: possible typo at getContent.pl line 13.
            Unrecognized type '{http://www.w3.org/1999/XMLSchema}base64Binary'

            Any ideas? Maybe I'm using a more recent version of SOPA::Lite where
            this fix doesn't work, or I've missed something obvious...?

            Paul
          Your message has been successfully submitted and would be delivered to recipients shortly.