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 <[EMAIL PROTECTED]> wrote:
On 6/7/06, Chathura Herath <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to