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

Re: [soaplite] xsd:base64Binary or SOAP-ENC:base64?

Expand Messages
  • Byrne Reese
    In the upcoming release of SOAP::Lite 0.65 this issue will most likely go away. That is because we will be favoring the 2001 XML Schema definitions, as opposed
    Message 1 of 2 , Dec 12, 2003
    • 0 Attachment
      In the upcoming release of SOAP::Lite 0.65 this issue will most likely go
      away. That is because we will be favoring the 2001 XML Schema definitions,
      as opposed to the 1999 version (which just so happens to use base64).

      Of course I should mention that the 1999 schema does not go away, it is
      simply not the default schema used anymore.

      There is a way to change the schema to 2001. That is best acheived by the
      following code (please someone double check me and make sure this works -
      I am doing this from memory):

      $client = SOAP::Lite->proxy()->uri()...;
      $client->serializer->xmlschema('http://www.w3.org/2001/XMLSchema');

      > I've been fooling around with SOAP using gsoap, SOAP:Lite, and
      > Borland C Builder 6 and have come across the following issue using a
      > gsoap server:
      >
      > 1)I can use both xsd:base64Binary and SOAP-ENC:base64 to communicate
      > between a gsoap server and a gsoap client.
      >
      > 2)Using a SOAP::Lite I can get the SOAP-ENC:base64 responce but
      > it gives me an error for the xsd:base64Binary.
      >
      > 3)On the other hand BCB6 sends the data as xsd:base64Binary in both
      > cases making the server return an error when it expects a SOAP-
      > ENC:base64. So I can not just use SOAP-ENC:base64.
      >
      > The error I get using SOAP::Lite is:
      > Unrecognized type '{http://www.w3.org/1999/XMLSchema}base64Binary'
      >>?xml version="1.0" encoding="UTF-8"?SOAP-ENV:Envelope
      >> xmlns:SOAP-
      > ENV="http://
      > schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-
      > ENC="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      > xmlns:xsd="
      > http://www.w3.org/1999/XMLSchema"
      > xmlns:ns="uri:/smsbouncer"SOAP-
      > ENV:Body SOAP-
      > ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"id="_0"ns:bounceResponseoutput
      > xsi:type="SOAP-ENC:Array" SOAP-
      > ENC:arrayType="ns:sms[1]"item xsi:type="ns:sms"body
      > xsi:type="xsd:base64Binary"/bodym
      > sisdn xsi:type="xsd:string"/msisdnservice
      > xsi:type="xsd:string"/service/item/output/ns:bounceRespons
      > e/SOAP-ENV:Body/SOAP-ENV:Envelope< at ./client.pl line 39
      >
      > I use the following code:
      >
      >>snip
      >
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      >
      >
      >
      >
      >


      ^byrne :/
    • games_stelios
      I ve been fooling around with SOAP using gsoap, SOAP:Lite, and Borland C Builder 6 and have come across the following issue using a gsoap server: 1)I can use
      Message 2 of 2 , Dec 12, 2003
      • 0 Attachment
        I've been fooling around with SOAP using gsoap, SOAP:Lite, and
        Borland C Builder 6 and have come across the following issue using a
        gsoap server:

        1)I can use both xsd:base64Binary and SOAP-ENC:base64 to communicate
        between a gsoap server and a gsoap client.

        2)Using a SOAP::Lite I can get the SOAP-ENC:base64 responce but
        it gives me an error for the xsd:base64Binary.

        3)On the other hand BCB6 sends the data as xsd:base64Binary in both
        cases making the server return an error when it expects a SOAP-
        ENC:base64. So I can not just use SOAP-ENC:base64.

        The error I get using SOAP::Lite is:
        Unrecognized type '{http://www.w3.org/1999/XMLSchema}base64Binary'
        <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-
        ENV="http://
        schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-
        ENC="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="
        http://www.w3.org/1999/XMLSchema" xmlns:ns="uri:/smsbouncer"><SOAP-
        ENV:Body SOAP-
        ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"id="_0">
        <ns:bounceResponse><output xsi:type="SOAP-ENC:Array" SOAP-
        ENC:arrayType="ns:sms[1]"><item xsi:type="ns:sms"><body
        xsi:type="xsd:base64Binary">aGVsbG8gd29ybGQAIGZyb20gcGVybA==</body><m
        sisdn xsi:type="xsd:string">6936123343</msisdn><service
        xsi:type="xsd:string">555</service></item></output></ns:bounceRespons
        e></SOAP-ENV:Body></SOAP-ENV:Envelope> at ./client.pl line 39

        I use the following code:

        <snip>
        my $param1=SOAP::Data->name('input');
        $param1->value([
        SOAP::Data->name('body'=>$body)->type
        ('xsd:base64Binary'),
        SOAP::Data->name('msisdn'=>$msisdn)->type('string'),
        SOAP::Data->name('service'=>$service)->type('string')
        ]
        );
        $result=$soap->bounce($param1);
        <snip>

        Is there a way to fool SOAP::Lite into thinking that
        xsd:base64Binary is SOAP-ENC:base64?

        I am not very fluent in perl and SOAP:Lite so if there is a very
        obvious answer don't be too rude :)

        the relative wsdl part follows:

        <complexType name="sms">
        <sequence>
        <element name="body" type="xsd:base64Binary" minOccurs="1"
        maxOccurs="1" nillable="true"/>
        <element name="msisdn" type="xsd:string" minOccurs="1"
        maxOccurs="1"/>
        <element name="service" type="xsd:string" minOccurs="1"
        maxOccurs="1"/>
        </sequence>
        </complexType>

        <complexType name="ArrayOfsms">
        <complexContent>
        <restriction base="SOAP-ENC:Array">
        <sequence>
        <element name="sms" type="ns:sms" minOccurs="0"
        maxOccurs="unbounded"/>
        </sequence>
        <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="ns:sms[]"/>
        </restriction>
        </complexContent>
        </complexType>

        <message name="bounceRequest">
        <part name="input" type="ns:sms"/>
        </message>

        <message name="bounceResponse">
        <part name="output" type="ns:ArrayOfsms"/>
        </message>


        Thanks in advance for any replies
      Your message has been successfully submitted and would be delivered to recipients shortly.