cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Diego Jarillo (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1200) wsdltojava accepts targetnamespace with ':' in the name but generate code that does not compile
Date Mon, 17 Dec 2007 09:48:43 GMT

    [ https://issues.apache.org/jira/browse/CXF-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552355
] 

Diego Jarillo commented on CXF-1200:
------------------------------------

If you don't have internet conecction and you create an operation in your wsdl with 
<xsd:schema>
            <xsd:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"

            	   schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
 </xsd:schema>

In the Wsdl2Java tool, I have my Catalog.xml 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
	<system systemId="http://cxf.apache.org/schemas/configuration/cxf-beans.xsd" uri="jar:file:D:/apache-cxf-2.0.3-incubator/lib/cxf-2.0.3-incubator.jar!/schemas/configuration/cxf-beans.xsd"/>
	<system systemId="http://cxf.apache.org/schemas/jaxws.xsd" uri="jar:file:D:/apache-cxf-2.0.3-incubator/lib/cxf-2.0.3-incubator.jar!/schemas/jaxws.xsd"/>
	
	
	<system systemId="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
uri="jar:file:D:/apache-cxf-2.0.3-incubator/lib/cxf-2.0.3-incubator.jar!/schemas/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
	
	<rewriteSystem  systemId="http://www.w3.org/2001/XMLSchema.dtd" rewritePrefix="classpath:schemas/XMLSchema.dtd"/>
	
	<rewriteSystem systemIdStartString="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"
rewritePrefix="classpath:schemas/xmldsig-core-schema.xsd" />
  	<rewriteSystem systemIdStartString="http://www.w3.org/2000/09/xmldsig#" rewritePrefix="classpath:schemas/xmldsig-core-schema.xsd"/>

	
	<system systemId="http://www.w3.org/2001/xml.xsd" uri="jar:file:D:/apache-cxf-2.0.3-incubator/lib/cxf-2.0.3-incubator.jar!/schemas/xml.xsd"/>
	<system systemId="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" uri="jar:file:D:/apache-cxf-2.0.3-incubator/lib/cxf-2.0.3-incubator.jar!/schemas/xmldsig-core-schema.xsd"/>
	<system systemId="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
uri="jar:file:D:/apache-cxf-2.0.3-incubator/lib/cxf-2.0.3-incubator.jar!/schemas/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
</catalog>

And the error is:

Caused by : WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema[2]/xsd:schema): faultCode=PARSER_ERROR:
Problem parsing 'jar:file:D:/
pache-cxf-2.0.3-incubator/lib/cxf-2.0.3-incubator.jar!/schemas/xmldsig-core-schema.xsd'.:
java.net.ConnectException: Connection timed out:
onnect
        at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:237)
        at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
        at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:102)
        at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:171)
Caused by: java.lang.RuntimeException: Fail to create wsdl definition from : file:/D:/CompilaWS/PrestacionesSOAP.wsdl
Caused by : WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema[2]/xsd:schema): faultCode=PARSER_ERROR:
Problem parsing 'jar:file:D:/
pache-cxf-2.0.3-incubator/lib/cxf-2.0.3-incubator.jar!/schemas/xmldsig-core-schema.xsd'.:
java.net.ConnectException: Connection timed out:
onnect
        at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.parseWSDL(WSDLDefinitionBuilder.java:156)
        at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.build(WSDLDefinitionBuilder.java:125)
        at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:89)
        at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:61)
        at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:122)
        at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:229)
        ... 3 more
Caused by: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema[2]/xsd:schema):
faultCode=PARSER_ERROR: Prob
em parsing 'jar:file:D:/apache-cxf-2.0.3-incubator/lib/cxf-2.0.3-incubator.jar!/schemas/xmldsig-core-schema.xsd'.:
java.net.ConnectExceptio
: Connection timed out: connect
        at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.parseWSDL(WSDLDefinitionBuilder.java:137)
        ... 8 more
Caused by: java.net.ConnectException: Connection timed out: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:382)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:509)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
        at sun.net.www.http.HttpClient.New(HttpClient.java:304)
        at sun.net.www.http.HttpClient.New(HttpClient.java:316)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:817)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:769)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:694)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:973)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:905)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:872)
        at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:282)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1021)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)

But, if you has internet conection,this error does not happen.

Thanks

> wsdltojava accepts targetnamespace with ':' in the name but generate code that does not
compile
> -----------------------------------------------------------------------------------------------
>
>                 Key: CXF-1200
>                 URL: https://issues.apache.org/jira/browse/CXF-1200
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.2
>            Reporter: maomaode
>            Assignee: maomaode
>             Fix For: 2.0.4
>
>
>  When using following target namespace with ':' in it ("targetNamespace of http://blahblah:8080/nasoap/services/urn:nasoap-server2),
the generated code by "wsdltojava" will contain a java package name with ':' on it, which
will fail at compilation. 
> "The reason I am saying it is a bug is that schemavalidator does not complain about it,
even if it is an invalid URL format.
> Even wsdltojava does not complain, but generates uncompilable code.
> So I think the fix should be put in schemavalidator to flag this as an error. "

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


Mime
View raw message