[
https://issues.apache.org/jira/browse/CXF-3239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980097#action_12980097
]
Freeman Fang edited comment on CXF-3239 at 1/11/11 8:36 AM:
------------------------------------------------------------
Hi Tosten,
The problem actually is from that in your test2.idl, the const char definition
is
const char MYCHAR = '\0';
ascii code "0"(a subset of ascii code isn't visiable, they are control char) is
used for control character and it's not intended to represent printable
information, that said, this character is invisible, so can't transform this
char into wsdl
if I change it to
const char MYCHAR = '\65';
then the idl2wsdl tool works as expected. the generated wsdl which contain this
const char looks like
<corba:typeMapping
targetNamespace="http://cxf.apache.org/bindings/corba/idl/test2/typemap">
<corba:const xmlns:xs="http://www.w3.org/2001/XMLSchema" value="5"
idltype="corba:char" name="Test2.MYCHAR" type="xs:byte"/>
</corba:typeMapping>
IMHO this is not a bug.
Best Regards
Freeman
was (Author: ffang):
Hi Tosten,
The problem actually is from that in your test2.idl, the const char definition
is
const char MYCHAR = '\0';
ascii code "0" is used for control character and it's not intended to represent
printable information, that said, this character is invisible, so can't
transform this char into wsdl
if I change it to
const char MYCHAR = '\65';
then the idl2wsdl tool works as expected. the generated wsdl which contain this
const char looks like
<corba:typeMapping
targetNamespace="http://cxf.apache.org/bindings/corba/idl/test2/typemap">
<corba:const xmlns:xs="http://www.w3.org/2001/XMLSchema" value="5"
idltype="corba:char" name="Test2.MYCHAR" type="xs:byte"/>
</corba:typeMapping>
IMHO this is not a bug.
Best Regards
Freeman
> idl2wsdl fails if const char is defined in IDL
> ----------------------------------------------
>
> Key: CXF-3239
> URL: https://issues.apache.org/jira/browse/CXF-3239
> Project: CXF
> Issue Type: Bug
> Components: Tooling
> Affects Versions: 2.3.1
> Environment: CXF-2.3.1, Windows, idl2wsdl
> Reporter: Torsten Mielke
> Assignee: Freeman Fang
> Attachments: test2.idl
>
>
> Running
> {code}
> idl2wsdl test2.idl
> {code}
> on the attached IDL file, produces:
> {code}
> Error : org.apache.cxf.tools.common.ToolException: WSDLException:
> faultCode=PARSER_ERROR: : javax.xml.bind.MarshalException
> {code}
> Running with additional -verbose option prints
> {code}
> idl2wsdl -verbose Test2.idl
> idl2wsdl - Apache CXF 2.3.x-fuse-SNAPSHOT
> ( module Test2 ( const char MYCHAR ) )
> Error : org.apache.cxf.tools.common.ToolException: WSDLException:
> faultCode=PARSER_ERROR: : javax.xml.bind.MarshalException
> org.apache.cxf.tools.common.ToolException:
> org.apache.cxf.tools.common.ToolException: WSDLException:
> faultCode=PARSER_ERROR: : javax.xml.bind.MarshalE
> xception
> at
> org.apache.cxf.tools.corba.processors.idl.IDLToWSDLProcessor.process(IDLToWSDLProcessor.java:88)
> at
> org.apache.cxf.tools.corba.processors.idl.IDLToWSDLProcessor.process(IDLToWSDLProcessor.java:79)
> at org.apache.cxf.tools.corba.IDLToWSDL.execute(IDLToWSDL.java:73)
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
> at org.apache.cxf.tools.corba.IDLToWSDL.run(IDLToWSDL.java:162)
> at org.apache.cxf.tools.corba.IDLToWSDL.main(IDLToWSDL.java:170)
> Caused by: org.apache.cxf.tools.common.ToolException: WSDLException:
> faultCode=PARSER_ERROR: : javax.xml.bind.MarshalException
> at
> org.apache.cxf.tools.corba.processors.idl.IDLToWSDLProcessor.parseIDL(IDLToWSDLProcessor.java:219)
> at
> org.apache.cxf.tools.corba.processors.idl.IDLToWSDLProcessor.process(IDLToWSDLProcessor.java:86)
> ... 7 more
> Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: :
> javax.xml.bind.MarshalException
> at
> org.apache.cxf.wsdl.JAXBExtensionHelper.marshall(JAXBExtensionHelper.java:261)
> at com.ibm.wsdl.xml.WSDLWriterImpl.printExtensibilityElements(Unknown
> Source)
> at
> org.apache.cxf.tools.corba.common.WSDLCorbaWriterImpl.printExtensibilityElements(WSDLCorbaWriterImpl.java:159)
> at
> org.apache.cxf.tools.corba.common.WSDLCorbaWriterImpl.printDefinition(WSDLCorbaWriterImpl.java:119)
> at
> org.apache.cxf.tools.corba.common.WSDLCorbaWriterImpl.writeWSDL(WSDLCorbaWriterImpl.java:77)
> at
> org.apache.cxf.tools.corba.common.WSDLUtils.writeWSDL(WSDLUtils.java:84)
> at
> org.apache.cxf.tools.corba.processors.idl.WSDLASTVisitor.writeDefinition(WSDLASTVisitor.java:268)
> at
> org.apache.cxf.tools.corba.processors.idl.IDLToWSDLProcessor.writeDefinitions(IDLToWSDLProcessor.java:297)
> at
> org.apache.cxf.tools.corba.processors.idl.IDLToWSDLProcessor.parseIDL(IDLToWSDLProcessor.java:217)
> ... 8 more
> Caused by: javax.xml.bind.MarshalException
> - with linked exception:
> [com.ctc.wstx.exc.WstxIOException: Invalid null character in text to output]
> at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:322)
> at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:172)
> at
> org.apache.cxf.wsdl.JAXBExtensionHelper.marshall(JAXBExtensionHelper.java:258)
> ... 16 more
> Caused by: com.ctc.wstx.exc.WstxIOException: Invalid null character in text
> to output
> at
> com.ctc.wstx.sw.BaseNsStreamWriter.doWriteAttr(BaseNsStreamWriter.java:515)
> at
> com.ctc.wstx.sw.BaseNsStreamWriter.writeAttribute(BaseNsStreamWriter.java:224)
> at
> org.apache.cxf.wsdl.PrettyPrintXMLStreamWriter.writeAttribute(PrettyPrintXMLStreamWriter.java:115)
> at
> com.sun.xml.bind.v2.runtime.output.XMLStreamWriterOutput.attribute(XMLStreamWriterOutput.java:131)
> at
> com.sun.xml.bind.v2.runtime.output.XmlOutputAbstractImpl.attribute(XmlOutputAbstractImpl.java:106)
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.attribute(XMLSerializer.java:446)
> at
> com.sun.xml.bind.v2.runtime.property.AttributeProperty.serializeAttributes(AttributeProperty.java:99)
> at
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeAttributes(ClassBeanInfoImpl.java:356)
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:689)
> at
> com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)
> at
> com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)
> at
> com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:155)
> at
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:340)
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:696)
> at
> com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:152)
> at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:157)
> at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:189)
> at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:316)
> at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:323)
> at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:72)
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:494)
> at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:315)
> ... 18 more
> Caused by: java.io.IOException: Invalid null character in text to output
> at
> com.ctc.wstx.api.InvalidCharHandler$FailingHandler.convertInvalidChar(InvalidCharHandler.java:51)
> at com.ctc.wstx.sw.XmlWriter.handleInvalidChar(XmlWriter.java:623)
> at
> com.ctc.wstx.sw.BufferingXmlWriter.writeAttrValue(BufferingXmlWriter.java:1037)
> at
> com.ctc.wstx.sw.BufferingXmlWriter.writeAttribute(BufferingXmlWriter.java:883)
> at
> com.ctc.wstx.sw.BaseNsStreamWriter.doWriteAttr(BaseNsStreamWriter.java:512)
> ... 39 more
> Error : org.apache.cxf.tools.common.ToolException: WSDLException:
> faultCode=PARSER_ERROR: : javax.xml.bind.MarshalException
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.