You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Arthur van Dorp <ar...@gmx.net> on 2012/04/18 09:23:09 UTC

2.6.0/wsdl2java: Exception when using binding file

Hi all

When switching from CXF 2.5.2 to 2.6.0 I encounter an IllegalArgumentException (stacktrace see below) when using wsdl2java with the following arguments:

wsdl2java -client -d D:\workspace\ClientCxf\src -classdir D:\workspace\msg\ClientCxf\build\classes -b defaultBinding.txt -impl -verbose http://localhost:8380/p/services/pAdapter?wsdl

All works well if I omit the "-b defaultBinding.txt" parameter. defaultBinding.txt has the following content:

<jaxb:bindings version="2.1"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <jaxb:globalBindings generateElementProperty="false"/>
</jaxb:bindings>

Probably I've overlooked something in the 2.6 migration guide.

Thanks and regards

Arthur


WSDLToJava Error: java.lang.IllegalArgumentException: URI is not hierarchical

org.apache.cxf.tools.common.ToolException: java.lang.IllegalArgumentException: URI is not hierarchical
        at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:293)
        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: java.lang.IllegalArgumentException: URI is not hierarchical
        at java.io.File.<init>(File.java:363)
        at org.apache.cxf.resource.URIResolver.tryFileSystem(URIResolver.java:144)
        at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:92)
        at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:75)
        at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:71)
        at org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.validate(JAXWSContainer.java:61)
        at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:147)
        at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:139)
        at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:285)
        ... 4 more
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Re: 2.6.0/wsdl2java: Exception when using binding file

Posted by Arthur van Dorp <ar...@gmx.net>.
Update: Going from 2.5.2 to 2.5.3 results in the same exception.

Kind regards

Arthur

> Hi all
> 
> When switching from CXF 2.5.2 to 2.6.0 I encounter an
> IllegalArgumentException (stacktrace see below) when using wsdl2java with the following
> arguments:
> 
> wsdl2java -client -d D:\workspace\ClientCxf\src -classdir
> D:\workspace\msg\ClientCxf\build\classes -b defaultBinding.txt -impl -verbose
> http://localhost:8380/p/services/pAdapter?wsdl
> 
> All works well if I omit the "-b defaultBinding.txt" parameter.
> defaultBinding.txt has the following content:
> 
> <jaxb:bindings version="2.1"
> xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
> xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
>    <jaxb:globalBindings generateElementProperty="false"/>
> </jaxb:bindings>
> 
> Probably I've overlooked something in the 2.6 migration guide.
> 
> Thanks and regards
> 
> Arthur
> 
> 
> WSDLToJava Error: java.lang.IllegalArgumentException: URI is not
> hierarchical
> 
> org.apache.cxf.tools.common.ToolException:
> java.lang.IllegalArgumentException: URI is not hierarchical
>         at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:293)
>         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: java.lang.IllegalArgumentException: URI is not hierarchical
>         at java.io.File.<init>(File.java:363)
>         at
> org.apache.cxf.resource.URIResolver.tryFileSystem(URIResolver.java:144)
>         at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:92)
>         at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:75)
>         at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:71)
>         at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.validate(JAXWSContainer.java:61)
>         at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:147)
>         at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:139)
>         at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:285)
>         ... 4 more
> -- 
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Re: 2.6.0/wsdl2java: Exception when using binding file

Posted by Arthur <ar...@gmx.net>.
Hello Dan

How embarrassing. All works fine now with the very same binding file. It 
looks like cxf wasn't able to access the binding file at all when I did 
my first tests (a local permission problem). When I artifically 
reproduce the permission problem I get the same stacktrace. Sorry for 
the unnecessary noise. Would it be useful to have a different exception 
thrown when a binding file can't be accessed?

Thanks and regards

Arthur

Am 23.04.2012 22:07, schrieb Arthur van Dorp:
> Hi Dan
>
> Thanks. It didn't happen today with an adapted binding and 2.5.3. I'll 
> try to make a minimal testcase within the next few days.
>
> Arthur
>
> Daniel Kulp wrote:
>>
>> I'm not able to reproduce this at all with 2.6.0.  I did a simple:
>>
>> wsdl2java -d /tmp/t2 -b binding.xml -impl -verbose
>> http://localhost:8080/...?wsdl
>>
>> using your binding file and a couple of local services and it worked 
>> fine
>> with no exception.   Not really sure what to suggest.  We may need a
>> testcase for this.  :-(
>>
>> Dan
>>
>>
>>
>> On Wednesday, April 18, 2012 09:23:09 AM Arthur van Dorp wrote:
>>> Hi all
>>>
>>> When switching from CXF 2.5.2 to 2.6.0 I encounter an
>>> IllegalArgumentException (stacktrace see below) when using wsdl2java 
>>> with
>>> the following arguments:
>>>
>>> wsdl2java -client -d D:\workspace\ClientCxf\src -classdir
>>> D:\workspace\msg\ClientCxf\build\classes -b defaultBinding.txt -impl
>>> -verbose http://localhost:8380/p/services/pAdapter?wsdl
>>>
>>> All works well if I omit the "-b defaultBinding.txt" parameter.
>>> defaultBinding.txt has the following content:
>>>
>>> <jaxb:bindings version="2.1"
>>> xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
>>> xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
>>> xmlns:xs="http://www.w3.org/2001/XMLSchema">
>>> <jaxb:globalBindings generateElementProperty="false"/>
>>> </jaxb:bindings>
>>>
>>> Probably I've overlooked something in the 2.6 migration guide.
>>>
>>> Thanks and regards
>>>
>>> Arthur
>>>
>>>
>>> WSDLToJava Error: java.lang.IllegalArgumentException: URI is not
>>> hierarchical
>>>
>>> org.apache.cxf.tools.common.ToolException:
>>> java.lang.IllegalArgumentException: URI is not hierarchical at
>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContain 
>>>
>>> er.java:293) at
>>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:1 
>>>
>>> 03) 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: java.lang.IllegalArgumentException: URI is not hierarchical at
>>> java.io.File.<init>(File.java:363)
>>>          at
>>> org.apache.cxf.resource.URIResolver.tryFileSystem(URIResolver.java:144)
>>> at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:92) at
>>> org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:75) at
>>> org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:71) at
>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.validate(JAXWSC 
>>>
>>> ontainer.java:61) at
>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaCon 
>>>
>>> tainer.java:147) at
>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContain 
>>>
>>> er.java:139) at
>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContain 
>>>
>>> er.java:285) ... 4 more


Re: 2.6.0/wsdl2java: Exception when using binding file

Posted by Arthur van Dorp <ar...@gmx.net>.
Hi Dan

Thanks. It didn't happen today with an adapted binding and 2.5.3. I'll 
try to make a minimal testcase within the next few days.

Arthur

Daniel Kulp wrote:
>
> I'm not able to reproduce this at all with 2.6.0.  I did a simple:
>
> wsdl2java -d /tmp/t2 -b binding.xml -impl -verbose
> http://localhost:8080/...?wsdl
>
> using your binding file and a couple of local services and it worked fine
> with no exception.   Not really sure what to suggest.  We may need a
> testcase for this.  :-(
>
> Dan
>
>
>
> On Wednesday, April 18, 2012 09:23:09 AM Arthur van Dorp wrote:
>> Hi all
>>
>> When switching from CXF 2.5.2 to 2.6.0 I encounter an
>> IllegalArgumentException (stacktrace see below) when using wsdl2java with
>> the following arguments:
>>
>> wsdl2java -client -d D:\workspace\ClientCxf\src -classdir
>> D:\workspace\msg\ClientCxf\build\classes -b defaultBinding.txt -impl
>> -verbose http://localhost:8380/p/services/pAdapter?wsdl
>>
>> All works well if I omit the "-b defaultBinding.txt" parameter.
>> defaultBinding.txt has the following content:
>>
>> <jaxb:bindings version="2.1"
>> xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
>> xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
>> xmlns:xs="http://www.w3.org/2001/XMLSchema">
>>     <jaxb:globalBindings generateElementProperty="false"/>
>> </jaxb:bindings>
>>
>> Probably I've overlooked something in the 2.6 migration guide.
>>
>> Thanks and regards
>>
>> Arthur
>>
>>
>> WSDLToJava Error: java.lang.IllegalArgumentException: URI is not
>> hierarchical
>>
>> org.apache.cxf.tools.common.ToolException:
>> java.lang.IllegalArgumentException: URI is not hierarchical at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContain
>> er.java:293) at
>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:1
>> 03) 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: java.lang.IllegalArgumentException: URI is not hierarchical at
>> java.io.File.<init>(File.java:363)
>>          at
>> org.apache.cxf.resource.URIResolver.tryFileSystem(URIResolver.java:144)
>> at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:92) at
>> org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:75) at
>> org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:71) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.validate(JAXWSC
>> ontainer.java:61) at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaCon
>> tainer.java:147) at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContain
>> er.java:139) at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContain
>> er.java:285) ... 4 more

Re: 2.6.0/wsdl2java: Exception when using binding file

Posted by Daniel Kulp <dk...@apache.org>.
I'm not able to reproduce this at all with 2.6.0.  I did a simple:

wsdl2java -d /tmp/t2 -b binding.xml -impl -verbose 
http://localhost:8080/...?wsdl

using your binding file and a couple of local services and it worked fine 
with no exception.   Not really sure what to suggest.  We may need a 
testcase for this.  :-(

Dan



On Wednesday, April 18, 2012 09:23:09 AM Arthur van Dorp wrote:
> Hi all
> 
> When switching from CXF 2.5.2 to 2.6.0 I encounter an
> IllegalArgumentException (stacktrace see below) when using wsdl2java with
> the following arguments:
> 
> wsdl2java -client -d D:\workspace\ClientCxf\src -classdir
> D:\workspace\msg\ClientCxf\build\classes -b defaultBinding.txt -impl
> -verbose http://localhost:8380/p/services/pAdapter?wsdl
> 
> All works well if I omit the "-b defaultBinding.txt" parameter.
> defaultBinding.txt has the following content:
> 
> <jaxb:bindings version="2.1"
> xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
> xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
>    <jaxb:globalBindings generateElementProperty="false"/>
> </jaxb:bindings>
> 
> Probably I've overlooked something in the 2.6 migration guide.
> 
> Thanks and regards
> 
> Arthur
> 
> 
> WSDLToJava Error: java.lang.IllegalArgumentException: URI is not
> hierarchical
> 
> org.apache.cxf.tools.common.ToolException:
> java.lang.IllegalArgumentException: URI is not hierarchical at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContain
> er.java:293) at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:1
> 03) 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: java.lang.IllegalArgumentException: URI is not hierarchical at
> java.io.File.<init>(File.java:363)
>         at
> org.apache.cxf.resource.URIResolver.tryFileSystem(URIResolver.java:144)
> at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:92) at
> org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:75) at
> org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:71) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.validate(JAXWSC
> ontainer.java:61) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaCon
> tainer.java:147) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContain
> er.java:139) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContain
> er.java:285) ... 4 more
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com