cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Artur Karazniewicz (JIRA)" <>
Subject [jira] Created: (CXF-1460) wsld2java does not honor elementFormDefault="qualified" in XmlSchema annotation
Date Sat, 01 Mar 2008 14:24:51 GMT
wsld2java does not honor elementFormDefault="qualified" in XmlSchema annotation

                 Key: CXF-1460
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.0.4, 2.0.3
         Environment: Windows XP, Java Standard Edition 5.0
            Reporter: Artur Karazniewicz
            Priority: Blocker

java2wsdl does not honour elementFormDefault="qualified" attribute. Generated
does not have set attribute elementFormDefault=XmlNsForn.QUALIFIED.

See below example:

here is sample wsdl:

<wsdl:definitions xmlns:soap=""
        xmlns:xsd="" name="loanap"
                        elementFormDefault="qualified" attributeFormDefault="unqualified">
                        <xsd:element name="aplication">
                                                <xsd:element name="salary" type="xsd:decimal"
                                                <xsd:element name="loan" type="xsd:decimal"
                        <xsd:element name="result">
                                                <xsd:element name="commited" type="xsd:boolean"
                                                <xsd:element name="amount" type="xsd:decimal"
        <wsdl:message name="applyRequest">
                <wsdl:part element="loanapp:aplication" name="parameters" />
        <wsdl:message name="applyResponse">
                <wsdl:part element="loanapp:result" name="parameters" />
        <wsdl:portType name="LoanService">
                <wsdl:operation name="apply">
                        <wsdl:input message="tns:applyRequest" />
                        <wsdl:output message="tns:applyResponse" />
        <wsdl:binding name="loanapSOAP" type="tns:LoanService">
                <soap:binding style="document"
                        transport="" />
                <wsdl:operation name="apply">
                                soapAction="" />
                                <soap:body use="literal" />
                                <soap:body use="literal" />
        <wsdl:service name="loanap">
                <wsdl:port binding="tns:loanapSOAP" name="LoanService">
                                location="" />

I use {code}wsdl2java loanapp.wsdl{code} to generate Java artefacts and got
as below:

@javax.xml.bind.annotation.XmlSchema(namespace = "")
package org.example.loanap.types;

Note that, in above embedded XML Schema  I have {code}elementFormDefault="qualified{code}
but in above
package-info it is not reflected. 

When Metro stack is used I got what expected:

{code}wsimport -Xnocompile loanap.wsdl{code}


@javax.xml.bind.annotation.XmlSchema(namespace = "", elementFormDefault
= javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package org.example.loanap.types;

What's interesting. When I use jaxb 2.0.5 (which seems to be used in CXF 2.0.4) and xjc I
got exactly the same code as wsimport. 

It seems that's CXF bug, rather than JAXB RI. Also I consider this as a serius show stopper,
since CXF will produce XML instances which are not valid against above schema (i.e. unqualified).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message