We're consuming SOAP messages for which the string type was extended or
redefined (see at the bottom). To denote null/empty values the XML
element uses "VEMPTY" as text content.

Example: <ns2:modifiedBy>VEMPTY</ns2:modifiedBy>

Before the message is deserialized and mapped to the Java model we'd
like to transform "VEMPTY" to "". As this special text content can
appear in arbitrary elements I don't think the standard
TransformationFeature as per
https://cxf.apache.org/docs/transformationfeature.html#TransformationFeature-Replacingtextcontent
is applicable. Correct?

I suspect we need to use the XSLT transformation, right?

[StringType]
<xsd:simpleType name="StringType">
    <xsd:annotation>
        <xsd:documentation xml:lang="en">
            ...some documentation...
            VEMPTY if effective value is null
            ...some more documentation...
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string"/>
</xsd:simpleType>

<xsd:element name="modifiedBy" type="st:StringType">
    <xsd:annotation>
        <xsd:documentation>
            ....
        </xsd:documentation>
    </xsd:annotation>
</xsd:element>

-- 
Marcel Stör, https://frightanic.com
My PGP key: https://frightanic.com/pgp/
Couchsurfing: http://www.couchsurfing.com/people/marcelstoer
O< ascii ribbon campaign - stop html mail - http://j.mp/1OThh9L

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to