cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aki Yoshida <elak...@gmail.com>
Subject Re: Question: CXF 'generate Web Service'-issue when using "xsd:redefine"
Date Tue, 05 Aug 2014 09:01:44 GMT
The part that is not clear to me is how you are going to use the
instance of PersonWithDog and where? The component that has the
original Person schema will find this instance invalid because it has
the unexpected Dog element. Only those components that have the new
redefined schema can process it. This means, you will have problems
with interoperability in non-centralized applications like web
services. The redefine is just a macro to rewrite another schema for a
local modification.

If you are for the separation of concern and keep things clean,
instead of using the redefine feature that corrupts the original
schema, can you use the extend feature to define your own schema to
add the extra element that you need? In this case, there will be no
ambiguity in interpreting the old and new schemas. All instances can
be fully validated against their corresponding schema.

And regarding the transform feature, you will need it in either case
(customization via redefine or extend) when you want to achieve
interoperability between a new component creating a new instance and
sending it to another component that has only the old schema and code.

You are free to file a Jira request to log this issue. But to have
this issue fixed, you will probably need a stronger argument to
convince people that the support of redefine is important unless
someone already looked into it and got a fix in their microwave.

regards, aki

2014-08-01 16:31 GMT+02:00 Timo Hosters <thosters@orga-systems.com>:
>  Intention
> Aki Yoshida-3 wrote
>> I am not sure what you are intending to do.
>
> The use case would be: A project partner wants you to provide additional
> functionality (here: via a Web Service). A prerequisite is that you have to
> incorporate his already existent message definitions.
> Excursus:
> To stick with the initial Person/Dog-metaphor of this post, this would mean
> e. g.: The project partner provides you information from his
> 'Person'-database by calling the Web Service with a 'Person'-object. Using
> that, your Web Service determines suitable dogs for the person and sticks
> the according data to the 'Person'-object, leading to a
> 'PersonWithDog'-object.
> So I must not change the original definitions, but I may add to the
> definitions. The "Redefine" approach seemed to be perfect for that:
> Keep the original definitions file
> Have another file 'next to' it
> In that file: Place your extensions (using "Redefine")
> If the original definitions change (bound to happen) merely replace the
> original file and adjust the extension file - if required
> That is less trouble compared to copying the original and modifying it
> directly. (Also: See "separation of concerns"-aspect below)
>  Transformation feature
> Aki Yoshida-3 wrote
>>  ... CXF offers some inline transformation feature o overcome typical
>> schema incompatibility issues ...
>
> Those <https://cxf.apache.org/docs/transformationfeature.html>  ? I used
> these features before, but - I have to admit - I simply did not
> consider/forgot about them for this use case. But transformation features
> *might pose another solution* for that issue. Thanks!
>  Remark / separation of concerns
> However one more remark: With the "redefine"-approach, I like the
> "separation of concern" aspect. Meaning 'some other guy' with a little bit
> of XML/XSD-knowledge can handle change requests/definition updates. With the
> CXF transformation feature, that other guy needs more CXF-knowledge (and for
> my situation, I cannot rely on that unfortunately).
> I think it would be convenient if CXF could handle the "Redefine" approach.
> Would it be okay to file a change request for that?
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Question-CXF-generate-Web-Service-issue-when-using-xsd-redefine-tp5746898p5747219.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message