I have a couple of issues I could use some help on. Been trying to get this
working but all I get are server exceptions. My main problem seems to be my
deployment descriptor, since I never actually get to any parsing with my
custom Serializer/Deserializer. I've included code from both though.
I have a UDT which I want to send as a response to a web service method
invocation. I created a custom Serializer, implementing the
org.apache.soap.util.xml.Serializer and
org.apache.soap.util.xml.Deserializer interfaces. In the marshall function,
I cast the third parameter to a my UDT. I then have a function called save
on my UDT that returns a XML based representation of the object to include
as the actual return. In the unmarshall function, I perform the reverse
actions, creating a new instance of my UDT, then calling a load function
that takes the XML based representation and populates itself.
With that background, here's the problem I'm butting heads with now. In my
deployment descriptor, here's how I have the mappings defined:
<isd:mappings>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn://mycompany/objects/" qname="x:MyUDT"
javaType="com.mycompany.util.MyUDT"
java2XMLClassName="com.mycompany.util.MyUDTSerializer"
xml2JavaClassName="com.mycompany.util.MyUDTSerializer"/>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="" qname="x:myudtXML"
xml2JavaClassName="org.apache.soap.encoding.soapenc.StringDeserializer"/>
</isd:mappings>
And here's a fragment of my marshalling code to perform to actual parameter
setting:
...
MyUDT myudt = (MyUDT)src;
String myudtXML= myudt.save();
if (myudtXML != null)
{
xjmr.marshall(inScopeEncStyle,
String.class,
myudtXML,
"myudtXML",
sink,
nsStack,
ctx);
sink.write(StringUtils.lineSeparator);
}
...
I never seem to actually get this far though. My deployment descriptor
seems to be invalid somehow. The fault code that keeps being returned is
"SOAP-ENV:Server.Exception" with "org/apache/soap/util/xml/Serializer" as
the fault string. Any idea of what I might have declared wrong? Or is
there something I have neglected to do or screwed up?
Any help would be most appreciated.
Craig