Dear All, I have a problem with Cocoon and eXist (by way of SOAP). I'm trying to store an XML document in an eXist database, with Cocoon initiating the request. All communication needs to be via SOAP.
My XSP looks like: <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:soap="http://apache.org/xsp/soap/3.0" xmlns:xscript="http://apache.org/xsp/xscript/1.0" xmlns:xsp-session-fw="http://apache.org/xsp/session-fw/1.0" xmlns:log="http://apache.org/xsp/log/2.0"> <page> <soap:call url="http://sts590009:4080/exist/services/Admin"> <store> <sessionId><xsp-session-fw:getxml context="exist-context" path="/exist/sessionId" as="string"/></sessionId> <data> <smurf>test</smurf> </data> <encoding>UTF-8</encoding> <path>/db/itform/insert.xml</path> <replace>true</replace> </store> </soap:call> </page> </xsp:page> This generates the following error: <page> <soapenv:Envelope> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring> java.rmi.RemoteException: null; nested exception is: java.lang.NullPointerException </faultstring> <detail/> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope> </page> My problem is the <data>. According to the eXist APIs, this should be base64 encoded binary data. How do I do that from within an XSP? I modified the SOAP call so that the data section read: <data xsi:type="xsd:base64Binary" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"> <smurf>test</smurf> </data> The SOAP error for this is: org.xml.sax.SAXException: Deserializing parameter 'data': could not find deserializer for type base64Binary So how do I get <smurf>test</smurf> converted to base64? Or am I thinking about this the wrong way? Any help appreciated! Peter Raftos -- Project Officer Scholarly Technology Services Australian National University Tel: (61 2) 6125 1065 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
