Automatic decoding of base64 binary Elements from SOAP messa

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Automatic decoding of base64 binary Elements from SOAP messa

Postby heyrothu » Tue Dec 01, 2009 4:42 am

We are exchanging pdf data streams between a Java an a Smalltalk system via webservices using the xsd-schema below.

Everything is fine, up to the point where the xml-elements are de-serialized and transferred into the corresponding Smalltalk objects. The original base64 binary data stream is stored into the smalltalk object.

On the java side, the binary pdf data stream is automatically converted into base64 binary by the serializer - I strongly suspect by using the xsd information.

I would have expected similar behavior on the Smalltalk side during de-serializing.

So, my question is, whether the automatic deserialization is just not implemented, not supported in VA or I am doing something wrog.

Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:element name="aprod.ermitteltePdfStreamsFuerRechnungsnummern">
      <xs:complexType>
         <xs:sequence>
            <xs:element name="rechnungsSatz" type="rechnungsSatz" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>
   <xs:complexType name="rechnungsSatz">
      <xs:sequence>
         <xs:element name="rechnungsnummer" type="rechnungsnummer"/>
         <xs:element name="pdfStream" type="pdfStream"/>
      </xs:sequence>
   </xs:complexType>
   <xs:simpleType name="rechnungsnummer">
      <xs:restriction base="xs:string"/>
   </xs:simpleType>
   <xs:simpleType name="pdfStream">
      <xs:restriction base="xs:base64Binary">
         <xs:minLength value="0"/>
      </xs:restriction>
   </xs:simpleType>
</xs:schema>
heyrothu
 
Posts: 6
Joined: Wed Dec 19, 2007 5:07 am

Re: Automatic decoding of base64 binary Elements from SOAP messa

Postby heyrothu » Tue Dec 01, 2009 8:04 am

I just noticed that serialization is working fine. Assign a ByteArray to an attribute that is mapped to a nase64binary element and it is converted automatically.
heyrothu
 
Posts: 6
Joined: Wed Dec 19, 2007 5:07 am


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest