I'm trying to use a custom serializer/deserializer but can't get it to work.
I've done this in the past for the BeanSerializer without a problem, but
have run into a roadblock with my own serializer/deserializer.
In the client, I registered my custom serializers as follows:
// Add our custom serializers
SOAPMappingRegistry smr = call.getSOAPMappingRegistry();
ContextContentSerializer ccSer = new ContextContentSerializer();
ContextParticipantSerializer cpSer = new ContextParticipantSerializer();
smr.mapTypes (Constants.NS_URI_SOAP_ENC,
new QName ("urn:net.carefx.hipaalog", "contextContent"),
net.carefx.hipaalog.ContextContent.class,
ccSer, ccSer);
smr.mapTypes (Constants.NS_URI_SOAP_ENC,
new QName ("urn:net.carefx.hipaalog", "contextParticipant"),
net.carefx.hipaalog.ContextParticipant.class,
cpSer, cpSer);
This seems to work okay and looking at the generated SOAP call it seems to
be correct.
For the server, I have the following mappings in the deployment descriptor
<isd:mappings>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn:net.carefx.hipaalog" qname="x:contextContent"
javaType="net.carefx.hipaalog.ContextContent"
java2XMLClassName="net.carefx.hipaalog.ContextContentSerializer"
xml2JavaClassName="net.carefx.hipaalog.ContextContentSerializer"/>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn:net.carefx.hipaalog" qname="x:contextParticipant"
javaType="net.carefx.hipaalog.ContextParticipant"
java2XMLClassName="net.carefx.hipaalog.ContextParticipantSerializer"
xml2JavaClassName="net.carefx.hipaalog.ContextParticipantSerializer"/>
</isd:mappings>
When I make the call, I get the following error from the server:
HTTP/1.1 500
Server: Microsoft-IIS/5.0
Date: Fri, 31 May 2002 18:17:47 GMT
Date: Fri, 31 May 2002 18:17:47 GMT
Server: WebLogic WebLogic Server 6.1 SP1 09/18/2001 14:28:44 #138716
Content-Length: 475
Content-Type: text/xml; charset=utf-8
Set-Cookie:
JSESSIONID=PPe2S3Kapw3CFyR4vp1D0hbJe8BtCJsYCd23H6SCH7CNh7bzr2NL!1368694550!-
1062730652!7001!7002; path=/
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server.Exception:</faultcode>
<faultstring>org/apache/soap/util/xml/Serializer</faultstring>
<faultactor>/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
If I redeploy with no mappings at all, I get the expected 'no mapping found'
error, so the mappings in the deployment descriptor are getting seen, at
least somewhat. I put some code in the serializer/deserializer classes to
make an entry in the WebLogic log when they are loaded, and I don't see that
message. So it appears that my classes aren't getting loaded. There are no
messages of any kind in the WebLogic log.
The error message in the SOAP reply isn't very helpful.
I'd appreciate any ideas on what I can do to make this work.
Thanks.