saitakyuz
saitakyuz

Reputation: 76

Apache Cxf Wsdl2java Create Web Service Client Encoding Error

I tried to create web service client, then I am seeing that encoding error.

I changed the eclipse encoding property, JVM encoding property and file encoding property and set UTF-8, but that does not change anything!

    WSDLToJava Error: Schema Error : s4s-att-invalid-value: Invalid attribute value for 'attributeFormDefault' in element 'schema'. Recorded reason: cvc-enumeration-valid: Value 'unqualıfıed' is not facet-valid with respect to enumeration '(qualified | unqualified)'. It must be a value from the enumeration.

org.apache.cxf.tools.common.ToolException: Schema Error : s4s-att-invalid-value: Invalid attribute value for 'attributeFormDefault' in element 'schema'. Recorded reason: cvc-enumeration-valid: Value 'unqualıfıed' is not facet-valid with respect to enumeration '(qualified | unqualified)'. It must be a value from the enumeration.
    at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.validateSchema(JAXBDataBinding.java:911)
    at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.addSchemas(JAXBDataBinding.java:588)
    at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:391)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:589)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:242)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:139)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:286)
    at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
Caused by: org.xml.sax.SAXParseException: s4s-att-invalid-value: Invalid attribute value for 'attributeFormDefault' in element 'schema'. Recorded reason: cvc-enumeration-valid: Value 'unqualıfıed' is not facet-valid with respect to enumeration '(qualified | unqualified)'. It must be a value from the enumeration.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSAttributeChecker.reportSchemaError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSAttributeChecker.checkAttributes(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSAttributeChecker.checkAttributes(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDocumentInfo.<init>(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
    at javax.xml.validation.SchemaFactory.newSchema(Unknown Source)
    at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.validateSchema(JAXBDataBinding.java:906)
    ... 10 more

Thanks.

Upvotes: 1

Views: 2540

Answers (1)

Winston
Winston

Reputation: 1820

  • Delete attributeFormDefault="unqualified" elementFormDefault="unqualified" line from wsdl
  • Change your All Regional Settings United States/Kingdom
  • When you import WSDL select Develop Client from Apache CXF Wizard

Upvotes: 1

Related Questions