cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Ma" <jim...@iona.com>
Subject RE: svn commit: r504471 - in /incubator/cxf/trunk: rt/core/src/main/java/org/apache/cxf/wsdl11/ tools2/common/src/main/java/org/apache/cxf/tools/common/ tools2/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/ tools2
Date Thu, 08 Feb 2007 07:56:36 GMT
Hi Dan ,

Thank you for pointing out these issues for me.

Comments inline.

> I don't think this commit is right at all. First, you can't use a
> Map<string, Element> with the targetNamespace as the key.
>You can
> have many
> schemas with the same targetNamespace, so that isn't allowed.

Sorry for  the variable name "tns" making you confused,
I use the schema systemId as the key . If the systemId is duplicate, it will
use the systemId
and targetNamspace( from line 286 to 291) . I will rename the variable .


>Second, this
> code has caused an infinite loop on my machine at line 280. You need to
> check to make sure you haven't already added an existing schema.

I will review these codes and make sure  it works fine. I'd like to know
which test case will cause
the infinite loop. Can you tell me which platform do you use?


> Third, this
> info should be in the SchemaInfo model, not in a Map in the service model
> properties. If you're going to look at the imported Schema elements,
> construct a new SchemaInfo object for each one.

>From the aspect of runtime,  these imported schema elements should construct
a new SchemaInfo
object for each one. From the aspect of tooling , it only needs the the
schema elements list. And this
list is only used by tools .  Current modification is a workaround. If
XMLSchema can be enhanced,
These modifications will be removed and original codes work will work fine
for the new tools.


>Fourth, this makes
> WSDLServiceBuilder not thread safe, which is clearly a departure from the
> current implementation.
>

I just realized WSDLServiceBuilder should be thread safe . Forgive me . I am
working on
tooling for a long time and  tooling does not need to care about thread safe
. :-) .
I will change it to ConcurrentHashMap.


> I think what we should be doing instead is
> 1. Add a SystemId property to the SchemaInfo which contains the URI of the
> schema element or in the case of the WSDL, the systemId = WSDL_URI +
> "#types" + schemaNumber.

This will cause some problems when a jaxb binding file is bound to a real
schema
systemId.

> 2. Loop through the imported schemas, checking for duplicates, and then
> create a new SchemaInfo for each import
>
> The one problem we will have is that XmlSchema will try to handle imports
> itself - but we already have the imported schemas via
> SchemaImports. For now
> we'll just have to create SchemaInfos for the imported Schemas without an
> XmlSchema object I think. I will work on a resolution in the XmlSchema
> source soon...

Agreed .We need to put the real schema element for each schema.  After I
finished tooling refactoring , I will modify it.

I also found another issue in XMLSchema is it can not handle the schema
contains jaxb binding annotation.


Thanks

Jim




Mime
View raw message