You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by Chathura Herath <ch...@gmail.com> on 2006/06/07 08:50:46 UTC
Re: Adding two methods to the Description Componenet
This namespace issue comes into the play when i am trying to generate
java types from the schema. In some cases there are namespaces that
are defined in the description element which are types related. So,
with wsdl4j what we did was manually extract those namespaces from the
definition and feed it to the schema compiler. This makes sure the
schema compiler will not get confused by the namespaces that are
defined in the definition.
So in the component model what happen to all the namespaces declared
in the description. Are you injecting them to each and every schema in
the types component.
Take a look at the wsdl attached, its one of the samples in axis2. It
has used a namespace inside the schema that is defined in the
definition. Is this no longer possible in wsdl 2.0. If it is possible
get namespace is a useful method for the description component because
the types returned by the types component will be incomplete
otherwise.
THanks
Chathura
> The Description interface interface in Woden reflects only the properties
> defined for the Description Component in the WSDL 2.0 spec and these do not
> include target namespace or declared namespaces. This is because the WSDL
> 2.0 Component model is an abstract WSDL model that has no notion of
> namespaces, because it does not expose document composition and the use of
> namespaces to avoid name clashes.
>
> Our initial Woden goal was to develop a Component model API that faithfully
> reflects the WSDL 2.0 Component model per Section 2 of the WSDL 2.0 Part 1
> spec to validate the spec - that is, confirm that it can be implemented and
> that it is useful. I would prefer to keep to that goal at least until the
> W3C interop event in July. However any feedback about the usefulness or
> deficiencies of the Component model would help the WSDL 2.0 working group
> evaluate the Component model. Could you provide some more detail about
> what you are trying to achieve and why you need namespace information in
> the Component model so we can understand your requirement a bit better.
> Thanks.
>
Re: Adding two methods to the Description Componenet
Posted by Jeremy Hughes <hu...@apache.org>.
On 6/7/06, Chathura Herath <ch...@gmail.com> wrote:
> Point is sometimes users may use namespaces that are defined in the
> Definition/Description inside the schema, because if you consider the
> scope of the entire WSDL those namespaces and qnames are very much
> valid.
Hi, I think you have found a bug which is the same as WODEN-26. I've
just added a comment to that JIRA. Please feel free to comment also.
Thanks,
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org
Re: Adding two methods to the Description Componenet
Posted by Chathura Herath <ch...@gmail.com>.
Hi,
Please see my comments in line.
> I looked at the attached WSDL. The elements and types defined in the
> schema have a namespace. http://userguide.axis2.apache.org/xsd
>
I know, but the point is its using a namespace prefix and we all know
how namespace prefixes are resolved. So in this case the the prefix
xsd1 can only be resolved by the namespaces declared in the
Definition.
> In WSDL 2.0, each element and type is represented by an Element
> Declaration or Type Definition component which have QNames. You get
> the namespace from the QName.
>
> WSDL 2.0 requires that elements and types belong to a namespace. [1]
>
> When you create Java types, you should map the namespace to the Java
> package name.
I know and its beside the point.
>This comes from the type or element, not the description
> component.
Point is sometimes users may use namespaces that are defined in the
Definition/Description inside the schema, because if you consider the
scope of the entire WSDL those namespaces and qnames are very much
valid.
Thanks
>
> [1] http://www.w3.org/TR/2006/CR-wsdl20-20060327/#Schema-0017
>
> On 6/7/06, Jeremy Hughes <hu...@apache.org> wrote:
> > On 6/7/06, Chathura Herath <ch...@gmail.com> wrote:
> > > Take a look at the wsdl attached, its one of the samples in axis2. It
> > > has used a namespace inside the schema that is defined in the
> > > definition. Is this no longer possible in wsdl 2.0. If it is possible
> > > get namespace is a useful method for the description component because
> > > the types returned by the types component will be incomplete
> > > otherwise.
> > Hi. I had the same problem and opened a JIRA [1]. I gen'd a wsdl2.0
> > doc from a wsdl1.1 using the converter. The input doc was missing the
> > xmlns:xsd declaration in the <types><schema> element and the converter
> > didn't put one in the output. Woden complains (well actually it's
> > Xerces) with:
> >
> > UndeclaredPrefix: Cannot resolve 'xsd:string' as a QName: the prefix
> > 'xsd' is not declared.
> >
> > because Woden sets both:
> >
> > parser.setFeature(org.apache.xerces.impl.Constants.SAX_FEATURE_PREFIX
> > + org.apache.xerces.impl.Constants.VALIDATION_FEATURE, true);
> > parser.setFeature(org.apache.xerces.impl.Constants.XERCES_FEATURE_PREFIX
> > + org.apache.xerces.impl.Constants.SCHEMA_VALIDATION_FEATURE, true);
> >
> > I'm not sure why this means the xmlns:xsd declaration is not visible
> > from the inlined schema though. John, do you have any insight?
> >
> > btw: WSDL4J doesn't set these features and copes with the prefix being
> > defined at the <definitions> scope.
> >
> > Jeremy
> > [1] http://issues.apache.org/jira/browse/WODEN-26
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: woden-dev-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: woden-dev-help@ws.apache.org
>
>
--
Chathura Herath
http://people.apache.org/~chathura/
http://chathurah.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org
Re: Adding two methods to the Description Componenet
Posted by Arthur Ryman <ar...@gmail.com>.
I looked at the attached WSDL. The elements and types defined in the
schema have a namespace. http://userguide.axis2.apache.org/xsd
In WSDL 2.0, each element and type is represented by an Element
Declaration or Type Definition component which have QNames. You get
the namespace from the QName.
WSDL 2.0 requires that elements and types belong to a namespace. [1]
When you create Java types, you should map the namespace to the Java
package name. This comes from the type or element, not the description
component.
[1] http://www.w3.org/TR/2006/CR-wsdl20-20060327/#Schema-0017
On 6/7/06, Jeremy Hughes <hu...@apache.org> wrote:
> On 6/7/06, Chathura Herath <ch...@gmail.com> wrote:
> > Take a look at the wsdl attached, its one of the samples in axis2. It
> > has used a namespace inside the schema that is defined in the
> > definition. Is this no longer possible in wsdl 2.0. If it is possible
> > get namespace is a useful method for the description component because
> > the types returned by the types component will be incomplete
> > otherwise.
> Hi. I had the same problem and opened a JIRA [1]. I gen'd a wsdl2.0
> doc from a wsdl1.1 using the converter. The input doc was missing the
> xmlns:xsd declaration in the <types><schema> element and the converter
> didn't put one in the output. Woden complains (well actually it's
> Xerces) with:
>
> UndeclaredPrefix: Cannot resolve 'xsd:string' as a QName: the prefix
> 'xsd' is not declared.
>
> because Woden sets both:
>
> parser.setFeature(org.apache.xerces.impl.Constants.SAX_FEATURE_PREFIX
> + org.apache.xerces.impl.Constants.VALIDATION_FEATURE, true);
> parser.setFeature(org.apache.xerces.impl.Constants.XERCES_FEATURE_PREFIX
> + org.apache.xerces.impl.Constants.SCHEMA_VALIDATION_FEATURE, true);
>
> I'm not sure why this means the xmlns:xsd declaration is not visible
> from the inlined schema though. John, do you have any insight?
>
> btw: WSDL4J doesn't set these features and copes with the prefix being
> defined at the <definitions> scope.
>
> Jeremy
> [1] http://issues.apache.org/jira/browse/WODEN-26
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: woden-dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org
Re: Adding two methods to the Description Componenet
Posted by Lawrence Mandel <lm...@ca.ibm.com>.
>btw: WSDL4J doesn't set these features and copes with the prefix being
>defined at the <definitions> scope.
I believe that's because WSDL4J doesn't validate documents. You should be
able to disable these checks by disabling validation, if that's what
you're interested in doing.
Lawrence
"Jeremy Hughes" <hu...@apache.org>
Sent by: jpjhughes@gmail.com
06/07/2006 07:19 AM
Please respond to
woden-dev@ws.apache.org
To
woden-dev@ws.apache.org
cc
Subject
Re: Adding two methods to the Description Componenet
On 6/7/06, Chathura Herath <ch...@gmail.com> wrote:
> Take a look at the wsdl attached, its one of the samples in axis2. It
> has used a namespace inside the schema that is defined in the
> definition. Is this no longer possible in wsdl 2.0. If it is possible
> get namespace is a useful method for the description component because
> the types returned by the types component will be incomplete
> otherwise.
Hi. I had the same problem and opened a JIRA [1]. I gen'd a wsdl2.0
doc from a wsdl1.1 using the converter. The input doc was missing the
xmlns:xsd declaration in the <types><schema> element and the converter
didn't put one in the output. Woden complains (well actually it's
Xerces) with:
UndeclaredPrefix: Cannot resolve 'xsd:string' as a QName: the prefix
'xsd' is not declared.
because Woden sets both:
parser.setFeature(org.apache.xerces.impl.Constants.SAX_FEATURE_PREFIX
+ org.apache.xerces.impl.Constants.VALIDATION_FEATURE, true);
parser.setFeature(org.apache.xerces.impl.Constants.XERCES_FEATURE_PREFIX
+ org.apache.xerces.impl.Constants.SCHEMA_VALIDATION_FEATURE, true);
I'm not sure why this means the xmlns:xsd declaration is not visible
from the inlined schema though. John, do you have any insight?
btw: WSDL4J doesn't set these features and copes with the prefix being
defined at the <definitions> scope.
Jeremy
[1] http://issues.apache.org/jira/browse/WODEN-26
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org
Re: Adding two methods to the Description Componenet
Posted by Jeremy Hughes <hu...@apache.org>.
On 6/7/06, Chathura Herath <ch...@gmail.com> wrote:
> Take a look at the wsdl attached, its one of the samples in axis2. It
> has used a namespace inside the schema that is defined in the
> definition. Is this no longer possible in wsdl 2.0. If it is possible
> get namespace is a useful method for the description component because
> the types returned by the types component will be incomplete
> otherwise.
Hi. I had the same problem and opened a JIRA [1]. I gen'd a wsdl2.0
doc from a wsdl1.1 using the converter. The input doc was missing the
xmlns:xsd declaration in the <types><schema> element and the converter
didn't put one in the output. Woden complains (well actually it's
Xerces) with:
UndeclaredPrefix: Cannot resolve 'xsd:string' as a QName: the prefix
'xsd' is not declared.
because Woden sets both:
parser.setFeature(org.apache.xerces.impl.Constants.SAX_FEATURE_PREFIX
+ org.apache.xerces.impl.Constants.VALIDATION_FEATURE, true);
parser.setFeature(org.apache.xerces.impl.Constants.XERCES_FEATURE_PREFIX
+ org.apache.xerces.impl.Constants.SCHEMA_VALIDATION_FEATURE, true);
I'm not sure why this means the xmlns:xsd declaration is not visible
from the inlined schema though. John, do you have any insight?
btw: WSDL4J doesn't set these features and copes with the prefix being
defined at the <definitions> scope.
Jeremy
[1] http://issues.apache.org/jira/browse/WODEN-26
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org