I have run into some difficulties generating XFire code based on the
WS-Notification spec from OASIS. What it comes down to is that the
WS-Notification spec produces a WSDL with the following two xsd fragments:
<xsd:complexType name="NotificationMessageHolderType">
<xsd:sequence>
<xsd:element minOccurs="0" name="message" nillable="true"
type="ns1:Message"/>
<xsd:element minOccurs="0" name="producerReference" nillable="true"
type="ns3:EndpointReferenceType"/>
<xsd:element minOccurs="0" name="subscriptionReference"
nillable="true"
type="ns3:EndpointReferenceType"/>
<xsd:element minOccurs="0" name="topic" nillable="true"
type="ns1:TopicExpressionType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Message">
<xsd:sequence>
<xsd:element minOccurs="0" name="any" nillable="true"
type="xsd:anyType"/>
</xsd:sequence>
</xsd:complexType>
However, the "Message" can be a String of XML such as:
<ns2:Message>
<timer xmlns="" xmlns:ns5="http://www.w3.org/2005/08/addressing">
<name>My Example Job</name>
<group>ServiceMix</group>
<fireTime>Tue Feb 13 22:11:48 EST 2007</fireTime>
</timer>
</ns2:Message>
I was hoping to be able to have access to the xml using the getMessage()
function produced by XFire on the NotificationMessageHolderType class.
However, it only returns "[timer : null]", the first element in the xml. My
guess is that it is attempting to deserialize "timer" into a timer object
which doesn't exist.
My question is what can I do to simply grab that <timer>...</timer> XML
fragment without changing the WS-Notification WSDL and making that
"xsd:anyType" into an xsd:string. Should I write a handler and store it as
a context variable? What would be the preferred way of handling this?
Thank you for your help!
--
View this message in context:
http://www.nabble.com/Need-advice...--Problem-with-%22xsd%3AanyType%22-and-Deserialization-tf3230935.html#a8976989
Sent from the XFire - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email