You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ivan Vitoria Sanchez <iv...@grupoica.com> on 2011/04/11 17:43:37 UTC

Generating WSDL from JAX-RS server

Hello,

 

How can I generate a WSDL file from all the JAX-RS endpoints? Should I use
java2ws tool? I'm quite confused about this...

 

Cheers,

 

Ivan

 

 


RE: Generating WSDL from JAX-RS server

Posted by Ivan Vitoria Sanchez <iv...@grupoica.com>.
Hi Sergey,

 

Adding the 2.3.5 bundle jar instead of 2.3.4 SNAPSHOT doesn’t seem to solve
the issue:

 

11:30:04,440 ERROR http-8000-2 context.ContextLoader:220 - Context
initialization failed

org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Failed to import bean definitions from URL location
[classpath:META-INF/cxf/cxf.xml]

Offending resource: ServletContext resource
[/WEB-INF/applicationContext.xml]; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: IOException
parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested
exception is java.io.FileNotFoundException: class path resource
[META-INF/cxf/cxf.xml] cannot be opened because it does not exist

 

 

Cheers,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: lunes, 18 de abril de 2011 9:53
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi Ivan

 

Thanks for trying to build it - that can help in the future, when you decide
to apply a couple of patches :-)

 

The build for 2.3.5-SNAPSHOT succeeded, so may be some dependencies have to
be updated in your snapshot, you can download

the cxf bundle from here:

https://hudson.apache.org/hudson/view/A-F/view/CXF/job/CXF-2.3-deploy/lastBu
ild/org.apache.cxf$cxf-bundle/artifact/org.apache.cxf/cxf-bundle/2.3.5-SNAPS
HOT/cxf-bundle-2.3.5-SNAPSHOT.jar

 

You can also do a fast maven build:

svn up -r head

mvn -Pfastinstall,jaxws22

 

Cheers, Sergey

 



 

On Mon, Apr 18, 2011 at 8:29 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi Sergey,

 

The server seems to be broken, I can’t download any file because the browser
shows me either a proxy error or a IOException...

 

I’ve tried building CXF from
http://svn.apache.org/repos/asf/cxf/branches/2.3.x-fixes but Maven shows me
an error message related with CXF Runtime Core:

 

Tests run: 16, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.214 sec
<<< FAILURE!

testImport(org.apache.cxf.wsdl11.WSDLServiceBuilderTest)  Time elapsed:
0.054 sec  <<< FAILURE!

java.lang.AssertionError: 

        at org.junit.Assert.fail(Assert.java:91)

        at org.junit.Assert.assertTrue(Assert.java:43)

        at org.junit.Assert.assertNotNull(Assert.java:524)

        at org.junit.Assert.assertNotNull(Assert.java:535)

        at
org.apache.cxf.wsdl11.WSDLServiceBuilderTest.testImport(WSDLServiceBuilderTe
st.java:488)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.
java:44)

        at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.j
ava:15)

        at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.ja
va:41)

        at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.jav
a:20)

        at
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunne
r.java:79)

        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav
a:71)

        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav
a:49)

        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

        at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53
)

        at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provide
r.java:119)

        at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:1
01)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at
org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(Pro
viderFactory.java:103)

        at $Proxy0.invoke(Unknown Source)

        at
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStar
ter.java:150)

        at
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(Surefire
Starter.java:91)

        at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

 

Maybe I’m doing something wrong because I don’t usually use Maven…

 

Cheers,

 

Ivan

 

 

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: jueves, 14 de abril de 2011 13:30 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi

I've added the same code I did to the trunk earlier on, it's on
2.3.5-SNAPSHOT now. Please keep an eye on
https://hudson.apache.org/hudson/view/A-F/view/CXF/job/CXF-2.3-deploy/, try
the distribution once r1092139 changes are included. Building the 2.3.x
branch can be a much faster option

Cheers, Sergey

On Thu, Apr 14, 2011 at 8:28 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi,

 

I have no other libraries except those required by CXF… 

 

Sergey, would you want that I open a JIRA of the NPE against 2.3.4 anyway?  

 

Cheers,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 19:24


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi Ivan

 

I think I've seen it before. Looks like you have some conflicts on your
class path, has someone else seen this issue ?

 

thanks, Sergey

On Wed, Apr 13, 2011 at 2:47 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi Sergey,

 

Now, this exception is throwed…

 

org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw
exception; nested exception is java.lang.IncompatibleClassChangeError:
Implementing class at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)

 

 

 

Ivan

 

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 14:23 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi Ivan 

cxf-extension-jaxrs-binding.xml (and other similar extensions) are not
available in 2.4.0, just remove the import, keep only cxf.xml, and
cxf-servlet.xml (though it may be redundant)

 

Sergey


 

On Wed, Apr 13, 2011 at 12:34 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi,

 

I cannot try with 2.4.0 because there seems to be a problem related to the
integration with Spring!

 

org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Failed to import bean definitions from URL location
[classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml]

Offending resource: ServletContext resource
[/WEB-INF/applicationContext.xml]; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: IOException
parsing XML document from class path resource
[META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is
java.io.FileNotFoundException: class path resource
[META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it
does not exist

 

 

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 12:22 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi, thanks for the test.

 

Please open a JIRA against 2.3.4 only (with the 2.3.4 stacktrace). I'd
appreciate if you could try 2.4.0-SNAPSHOT as well, what may've happened I
did not merge the changes to 2.3.4, as I also committed the changes to do
with improving the auto-generated documentation, as part of the same commit,
but I can apply few minor updates tp 2.3.4 only to prevent NPE

 

thanks, Sergey

On Wed, Apr 13, 2011 at 11:15 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi,

 

I’ve seen the NPE with both CXF 2.3.2 and 2.3.3. I’ve tried upgrading to
2.3.4 SNAPSHOT from
https://repository.apache.org/content/groups/snapshots/org/apache/cxf/apache
-cxf/2.3.4-SNAPSHOT/apache-cxf-2.3.4-SNAPSHOT.zip but the result is still
the same…

 

Do you think that I should open a JIRA?

 

Regards,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 10:51 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
it is ?
Actually, in CXF 2.3.4, being released now, I did update the code to make
sure WADL is generated properly when the model is used, in some case a
current op info is used to get to the annotated method, which is null in
case of using models, can you try 2.3.4 SNAPSHOT please

thanks, Sergey 

On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Sergey, the custom WADL provider is quite interesting for me and I’ll
investigate if it’s possible to autogenerate the XSD from my code and
include it to the WADL.

 

Trying to get the WADL from my resources, I’ve added the flag
“staticSubresourceResolution” to my generic server:

 

    <jaxrs:server id="genericServer"
staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/Generic
Model.xml" abstract="true">…</jaxrs:server>

 

But a NullPointerException is thrown when accessing to the WADL
(http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl
<http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml>
&_type=xml)!

 

Interceptor for
{http://generic.service.mobile.mobility.ica.com/}IRestService
<http://generic.service.mobile.mobility.ica.com/%7DIRestService>  has thrown
exception, unwinding now

java.lang.NullPointerException

        at
org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.
java:310)

…

 

Let me know if you want the whole stacktrace…

 

Cheers,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 23:07
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org


Asunto: Re: Generating WSDL from JAX-RS server

 

XSD is good enough as it captures the service requirements to some extent,
WADL gives much more info, it shows the whole application graph/tree with
all the useful metadata (consumes/produces, etc). The only problem it won't
generate a schema for you if you have a generic service provider, but you
can customize the WADLGenerator to reference the external schemas:

http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDesc
ription-CustomWADLproviders

cheers, Sergey 

On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

I’m currently using soapUI and it’s a good tool for testing but,what about
non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
payloads and optionally the WADL if they want to be integrated with my
RESTful services?

 

Thanks again Sergey!

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 16:38


Para: users@cxf.apache.org

CC: Ivan Vitoria Sanchez


Asunto: Re: Generating WSDL from JAX-RS server

 

Hi

On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Benson.

I need to integrate my server with other system, which will provide me their
WSDL file (i guess i'll have to build a WS client). Do you think that WADL
contract should be enough if someone needs to integrate with JAX-RS server?


At the moment consumers like SOAPUi can use WADL to test endpoints - which
is a very useful thing.
Otherwise, one does not need WADL in order to integrate, HTTP centric
clients use the explicit knowledge of the endpoint's restful interface,
proxies get all the info they need from annotations.

However, we can use WADL to convey policies too, it is just a bit early for
this kind of advanced integration to occur, but stay tined, the WADL-related
will resume shortly in CXF.

thanks, Sergey
 

Cheers,

Ivan



-----Mensaje original-----
De: Benson Margulies [mailto:bimargulies@gmail.com]
Enviado el: lunes, 11 de abril de 2011 17:59
Para: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
JAX-RS Module can on the other hand generate a WADL file.


On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> How can I generate a WSDL file from all the JAX-RS endpoints? Should I use
> java2ws tool? I'm quite confused about this...
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
>
>
>




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 


Re: Generating WSDL from JAX-RS server

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Ivan

Thanks for trying to build it - that can help in the future, when you decide
to apply a couple of patches :-)

The build for 2.3.5-SNAPSHOT succeeded, so may be some dependencies have to
be updated in your snapshot, you can download
the cxf bundle from here:
https://hudson.apache.org/hudson/view/A-F/view/CXF/job/CXF-2.3-deploy/lastBuild/org.apache.cxf$cxf-bundle/artifact/org.apache.cxf/cxf-bundle/2.3.5-SNAPSHOT/cxf-bundle-2.3.5-SNAPSHOT.jar

You can also do a fast maven build:
svn up -r head
mvn -Pfastinstall,jaxws22

Cheers, Sergey




On Mon, Apr 18, 2011 at 8:29 AM, Ivan Vitoria Sanchez <ivitoria@grupoica.com
> wrote:

>  Hi Sergey,
>
>
>
> The server seems to be broken, I can’t download any file because the
> browser shows me either a proxy error or a IOException...
>
>
>
> I’ve tried building CXF from
> http://svn.apache.org/repos/asf/cxf/branches/2.3.x-fixes but Maven shows
> me an error message related with CXF Runtime Core:
>
>
>
> Tests run: 16, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.214 sec
> <<< FAILURE!
>
> testImport(org.apache.cxf.wsdl11.WSDLServiceBuilderTest)  Time elapsed:
> 0.054 sec  <<< FAILURE!
>
> java.lang.AssertionError:
>
>         at org.junit.Assert.fail(Assert.java:91)
>
>         at org.junit.Assert.assertTrue(Assert.java:43)
>
>         at org.junit.Assert.assertNotNull(Assert.java:524)
>
>         at org.junit.Assert.assertNotNull(Assert.java:535)
>
>         at
> org.apache.cxf.wsdl11.WSDLServiceBuilderTest.testImport(WSDLServiceBuilderTest.java:488)
>
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>         at java.lang.reflect.Method.invoke(Method.java:597)
>
>         at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>
>         at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>
>         at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>
>         at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>
>         at
> org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
>
>         at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
>
>         at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
>
>         at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>
>         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>
>         at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>
>         at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>
>         at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>
>         at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>
>         at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
>
>         at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
>
>         at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
>
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>         at java.lang.reflect.Method.invoke(Method.java:597)
>
>         at
> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>
>         at $Proxy0.invoke(Unknown Source)
>
>         at
> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>
>         at
> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>
>         at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>
>
>
> Maybe I’m doing something wrong because I don’t usually use Maven…
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
>
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* jueves, 14 de abril de 2011 13:30
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi
>
> I've added the same code I did to the trunk earlier on, it's on
> 2.3.5-SNAPSHOT now. Please keep an eye on
> https://hudson.apache.org/hudson/view/A-F/view/CXF/job/CXF-2.3-deploy/,
> try the distribution once r1092139 changes are included. Building the 2.3.x
> branch can be a much faster option
>
> Cheers, Sergey
>
> On Thu, Apr 14, 2011 at 8:28 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Hi,
>
>
>
> I have no other libraries except those required by CXF…
>
>
>
> Sergey, would you want that I open a JIRA of the NPE against 2.3.4 anyway?
>
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 19:24
>
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi Ivan
>
>
>
> I think I've seen it before. Looks like you have some conflicts on your
> class path, has someone else seen this issue ?
>
>
>
> thanks, Sergey
>
> On Wed, Apr 13, 2011 at 2:47 PM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Hi Sergey,
>
>
>
> Now, this exception is throwed…
>
>
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]:
> Instantiation of bean failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Could not instantiate
> bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw
> exception; nested exception is java.lang.IncompatibleClassChangeError:
> Implementing class at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
>
>
>
>
>
>
>
> Ivan
>
>
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 14:23
>
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi Ivan
>
> cxf-extension-jaxrs-binding.xml (and other similar extensions) are not
> available in 2.4.0, just remove the import, keep only cxf.xml, and
> cxf-servlet.xml (though it may be redundant)
>
>
>
> Sergey
>
>
>
>
> On Wed, Apr 13, 2011 at 12:34 PM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Hi,
>
>
>
> I cannot try with 2.4.0 because there seems to be a problem related to the
> integration with Spring!
>
>
>
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Failed to import bean definitions from URL location
> [classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml]
>
> Offending resource: ServletContext resource
> [/WEB-INF/applicationContext.xml]; nested exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: IOException
> parsing XML document from class path resource
> [META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is
> java.io.FileNotFoundException: class path resource
> [META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it
> does not exist
>
> * *
>
>
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 12:22
>
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi, thanks for the test.
>
>
>
> Please open a JIRA against 2.3.4 only (with the 2.3.4 stacktrace). I'd
> appreciate if you could try 2.4.0-SNAPSHOT as well, what may've happened I
> did not merge the changes to 2.3.4, as I also committed the changes to do
> with improving the auto-generated documentation, as part of the same commit,
> but I can apply few minor updates tp 2.3.4 only to prevent NPE
>
>
>
> thanks, Sergey
>
> On Wed, Apr 13, 2011 at 11:15 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Hi,
>
>
>
> I’ve seen the NPE with both CXF 2.3.2 and 2.3.3. I’ve tried upgrading to
> 2.3.4 SNAPSHOT from
> https://repository.apache.org/content/groups/snapshots/org/apache/cxf/apache-cxf/2.3.4-SNAPSHOT/apache-cxf-2.3.4-SNAPSHOT.zip but
> the result is still the same…
>
>
>
> Do you think that I should open a JIRA?
>
>
>
> Regards,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 10:51
>
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
> it is ?
> Actually, in CXF 2.3.4, being released now, I did update the code to make
> sure WADL is generated properly when the model is used, in some case a
> current op info is used to get to the annotated method, which is null in
> case of using models, can you try 2.3.4 SNAPSHOT please
>
> thanks, Sergey
>
> On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Sergey, the custom WADL provider is quite interesting for me and
> I’ll investigate if it’s possible to autogenerate the XSD from my code and
> include it to the WADL.
>
>
>
> Trying to get the WADL from my resources, I’ve added the flag
> “staticSubresourceResolution” to my generic server:
>
>
>
>     <jaxrs:server id="genericServer"
> staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/GenericModel.xml"
> abstract="true">…</jaxrs:server>
>
>
>
> But a NullPointerException is thrown when accessing to the WADL (
> http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml)!
>
>
>
> Interceptor for {
> http://generic.service.mobile.mobility.ica.com/}IRestService has thrown
> exception, unwinding now
>
> java.lang.NullPointerException
>
>         at
> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:310)
>
> …
>
>
>
> Let me know if you want the whole stacktrace…
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 23:07
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
>
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> XSD is good enough as it captures the service requirements to some extent,
> WADL gives much more info, it shows the whole application graph/tree with
> all the useful metadata (consumes/produces, etc). The only problem it won't
> generate a schema for you if you have a generic service provider, but you
> can customize the WADLGenerator to reference the external schemas:
>
>
> http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-CustomWADLproviders
>
> cheers, Sergey
>
> On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> I’m currently using soapUI and it’s a good tool for testing but,what about
> non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
> payloads and optionally the WADL if they want to be integrated with my
> RESTful services?
>
>
>
> Thanks again Sergey!
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 16:38
>
>
> *Para:* users@cxf.apache.org
>
> *CC:* Ivan Vitoria Sanchez
>
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi
>
> On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Benson.
>
> I need to integrate my server with other system, which will provide me
> their WSDL file (i guess i'll have to build a WS client). Do you think that
> WADL contract should be enough if someone needs to integrate with JAX-RS
> server?
>
>
> At the moment consumers like SOAPUi can use WADL to test endpoints - which
> is a very useful thing.
> Otherwise, one does not need WADL in order to integrate, HTTP centric
> clients use the explicit knowledge of the endpoint's restful interface,
> proxies get all the info they need from annotations.
>
> However, we can use WADL to convey policies too, it is just a bit early for
> this kind of advanced integration to occur, but stay tined, the WADL-related
> will resume shortly in CXF.
>
> thanks, Sergey
>
>
> Cheers,
>
> Ivan
>
>
>
> -----Mensaje original-----
> De: Benson Margulies [mailto:bimargulies@gmail.com]
> Enviado el: lunes, 11 de abril de 2011 17:59
> Para: users@cxf.apache.org
> Asunto: Re: Generating WSDL from JAX-RS server
>
> WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
> JAX-RS Module can on the other hand generate a WADL file.
>
>
> On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
> <iv...@grupoica.com> wrote:
> > Hello,
> >
> >
> >
> > How can I generate a WSDL file from all the JAX-RS endpoints? Should I
> use
> > java2ws tool? I'm quite confused about this...
> >
> >
> >
> > Cheers,
> >
> >
> >
> > Ivan
> >
> >
> >
> >
> >
> >
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/>
http://sberyozkin.blogspot.com

RE: Generating WSDL from JAX-RS server

Posted by Ivan Vitoria Sanchez <iv...@grupoica.com>.
Hi Sergey,

 

The server seems to be broken, I can’t download any file because the browser
shows me either a proxy error or a IOException...

 

I’ve tried building CXF from
http://svn.apache.org/repos/asf/cxf/branches/2.3.x-fixes but Maven shows me
an error message related with CXF Runtime Core:

 

Tests run: 16, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.214 sec
<<< FAILURE!

testImport(org.apache.cxf.wsdl11.WSDLServiceBuilderTest)  Time elapsed:
0.054 sec  <<< FAILURE!

java.lang.AssertionError: 

        at org.junit.Assert.fail(Assert.java:91)

        at org.junit.Assert.assertTrue(Assert.java:43)

        at org.junit.Assert.assertNotNull(Assert.java:524)

        at org.junit.Assert.assertNotNull(Assert.java:535)

        at
org.apache.cxf.wsdl11.WSDLServiceBuilderTest.testImport(WSDLServiceBuilderTe
st.java:488)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.
java:44)

        at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.j
ava:15)

        at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.ja
va:41)

        at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.jav
a:20)

        at
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunne
r.java:79)

        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav
a:71)

        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav
a:49)

        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

        at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53
)

        at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provide
r.java:119)

        at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:1
01)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at
org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(Pro
viderFactory.java:103)

        at $Proxy0.invoke(Unknown Source)

        at
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStar
ter.java:150)

        at
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(Surefire
Starter.java:91)

        at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

 

Maybe I’m doing something wrong because I don’t usually use Maven…

 

Cheers,

 

Ivan

 

 

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: jueves, 14 de abril de 2011 13:30
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi

I've added the same code I did to the trunk earlier on, it's on
2.3.5-SNAPSHOT now. Please keep an eye on
https://hudson.apache.org/hudson/view/A-F/view/CXF/job/CXF-2.3-deploy/, try
the distribution once r1092139 changes are included. Building the 2.3.x
branch can be a much faster option

Cheers, Sergey

On Thu, Apr 14, 2011 at 8:28 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi,

 

I have no other libraries except those required by CXF… 

 

Sergey, would you want that I open a JIRA of the NPE against 2.3.4 anyway?  

 

Cheers,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 19:24


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi Ivan

 

I think I've seen it before. Looks like you have some conflicts on your
class path, has someone else seen this issue ?

 

thanks, Sergey

On Wed, Apr 13, 2011 at 2:47 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi Sergey,

 

Now, this exception is throwed…

 

org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw
exception; nested exception is java.lang.IncompatibleClassChangeError:
Implementing class at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)

 

 

 

Ivan

 

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 14:23 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi Ivan 

cxf-extension-jaxrs-binding.xml (and other similar extensions) are not
available in 2.4.0, just remove the import, keep only cxf.xml, and
cxf-servlet.xml (though it may be redundant)

 

Sergey


 

On Wed, Apr 13, 2011 at 12:34 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi,

 

I cannot try with 2.4.0 because there seems to be a problem related to the
integration with Spring!

 

org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Failed to import bean definitions from URL location
[classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml]

Offending resource: ServletContext resource
[/WEB-INF/applicationContext.xml]; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: IOException
parsing XML document from class path resource
[META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is
java.io.FileNotFoundException: class path resource
[META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it
does not exist

 

 

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 12:22 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi, thanks for the test.

 

Please open a JIRA against 2.3.4 only (with the 2.3.4 stacktrace). I'd
appreciate if you could try 2.4.0-SNAPSHOT as well, what may've happened I
did not merge the changes to 2.3.4, as I also committed the changes to do
with improving the auto-generated documentation, as part of the same commit,
but I can apply few minor updates tp 2.3.4 only to prevent NPE

 

thanks, Sergey

On Wed, Apr 13, 2011 at 11:15 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi,

 

I’ve seen the NPE with both CXF 2.3.2 and 2.3.3. I’ve tried upgrading to
2.3.4 SNAPSHOT from
https://repository.apache.org/content/groups/snapshots/org/apache/cxf/apache
-cxf/2.3.4-SNAPSHOT/apache-cxf-2.3.4-SNAPSHOT.zip but the result is still
the same…

 

Do you think that I should open a JIRA?

 

Regards,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 10:51 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
it is ?
Actually, in CXF 2.3.4, being released now, I did update the code to make
sure WADL is generated properly when the model is used, in some case a
current op info is used to get to the annotated method, which is null in
case of using models, can you try 2.3.4 SNAPSHOT please

thanks, Sergey 

On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Sergey, the custom WADL provider is quite interesting for me and I’ll
investigate if it’s possible to autogenerate the XSD from my code and
include it to the WADL.

 

Trying to get the WADL from my resources, I’ve added the flag
“staticSubresourceResolution” to my generic server:

 

    <jaxrs:server id="genericServer"
staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/Generic
Model.xml" abstract="true">…</jaxrs:server>

 

But a NullPointerException is thrown when accessing to the WADL
(http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl
<http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml>
&_type=xml)!

 

Interceptor for
{http://generic.service.mobile.mobility.ica.com/}IRestService
<http://generic.service.mobile.mobility.ica.com/%7DIRestService>  has thrown
exception, unwinding now

java.lang.NullPointerException

        at
org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.
java:310)

…

 

Let me know if you want the whole stacktrace…

 

Cheers,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 23:07
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org


Asunto: Re: Generating WSDL from JAX-RS server

 

XSD is good enough as it captures the service requirements to some extent,
WADL gives much more info, it shows the whole application graph/tree with
all the useful metadata (consumes/produces, etc). The only problem it won't
generate a schema for you if you have a generic service provider, but you
can customize the WADLGenerator to reference the external schemas:

http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDesc
ription-CustomWADLproviders

cheers, Sergey 

On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

I’m currently using soapUI and it’s a good tool for testing but,what about
non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
payloads and optionally the WADL if they want to be integrated with my
RESTful services?

 

Thanks again Sergey!

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 16:38


Para: users@cxf.apache.org

CC: Ivan Vitoria Sanchez


Asunto: Re: Generating WSDL from JAX-RS server

 

Hi

On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Benson.

I need to integrate my server with other system, which will provide me their
WSDL file (i guess i'll have to build a WS client). Do you think that WADL
contract should be enough if someone needs to integrate with JAX-RS server?


At the moment consumers like SOAPUi can use WADL to test endpoints - which
is a very useful thing.
Otherwise, one does not need WADL in order to integrate, HTTP centric
clients use the explicit knowledge of the endpoint's restful interface,
proxies get all the info they need from annotations.

However, we can use WADL to convey policies too, it is just a bit early for
this kind of advanced integration to occur, but stay tined, the WADL-related
will resume shortly in CXF.

thanks, Sergey
 

Cheers,

Ivan



-----Mensaje original-----
De: Benson Margulies [mailto:bimargulies@gmail.com]
Enviado el: lunes, 11 de abril de 2011 17:59
Para: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
JAX-RS Module can on the other hand generate a WADL file.


On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> How can I generate a WSDL file from all the JAX-RS endpoints? Should I use
> java2ws tool? I'm quite confused about this...
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
>
>
>




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com> 
http://sberyozkin.blogspot.com


Re: Generating WSDL from JAX-RS server

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

I've added the same code I did to the trunk earlier on, it's on
2.3.5-SNAPSHOT now. Please keep an eye on
https://hudson.apache.org/hudson/view/A-F/view/CXF/job/CXF-2.3-deploy/, try
the distribution once r1092139 changes are included. Building the 2.3.x
branch can be a much faster option

Cheers, Sergey

On Thu, Apr 14, 2011 at 8:28 AM, Ivan Vitoria Sanchez <ivitoria@grupoica.com
> wrote:

> Hi,
>
>
>
> I have no other libraries except those required by CXF…
>
>
>
> Sergey, would you want that I open a JIRA of the NPE against 2.3.4 anyway?
>
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 19:24
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi Ivan
>
>
>
> I think I've seen it before. Looks like you have some conflicts on your
> class path, has someone else seen this issue ?
>
>
>
> thanks, Sergey
>
> On Wed, Apr 13, 2011 at 2:47 PM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Hi Sergey,
>
>
>
> Now, this exception is throwed…
>
>
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]:
> Instantiation of bean failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Could not instantiate
> bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw
> exception; nested exception is java.lang.IncompatibleClassChangeError:
> Implementing class at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
>
>
>
>
>
>
>
> Ivan
>
>
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 14:23
>
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi Ivan
>
> cxf-extension-jaxrs-binding.xml (and other similar extensions) are not
> available in 2.4.0, just remove the import, keep only cxf.xml, and
> cxf-servlet.xml (though it may be redundant)
>
>
>
> Sergey
>
>
>
>
> On Wed, Apr 13, 2011 at 12:34 PM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Hi,
>
>
>
> I cannot try with 2.4.0 because there seems to be a problem related to the
> integration with Spring!
>
>
>
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Failed to import bean definitions from URL location
> [classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml]
>
> Offending resource: ServletContext resource
> [/WEB-INF/applicationContext.xml]; nested exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: IOException
> parsing XML document from class path resource
> [META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is
> java.io.FileNotFoundException: class path resource
> [META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it
> does not exist
>
> * *
>
>
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 12:22
>
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi, thanks for the test.
>
>
>
> Please open a JIRA against 2.3.4 only (with the 2.3.4 stacktrace). I'd
> appreciate if you could try 2.4.0-SNAPSHOT as well, what may've happened I
> did not merge the changes to 2.3.4, as I also committed the changes to do
> with improving the auto-generated documentation, as part of the same commit,
> but I can apply few minor updates tp 2.3.4 only to prevent NPE
>
>
>
> thanks, Sergey
>
> On Wed, Apr 13, 2011 at 11:15 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Hi,
>
>
>
> I’ve seen the NPE with both CXF 2.3.2 and 2.3.3. I’ve tried upgrading to
> 2.3.4 SNAPSHOT from
> https://repository.apache.org/content/groups/snapshots/org/apache/cxf/apache-cxf/2.3.4-SNAPSHOT/apache-cxf-2.3.4-SNAPSHOT.zip but
> the result is still the same…
>
>
>
> Do you think that I should open a JIRA?
>
>
>
> Regards,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 10:51
>
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
> it is ?
> Actually, in CXF 2.3.4, being released now, I did update the code to make
> sure WADL is generated properly when the model is used, in some case a
> current op info is used to get to the annotated method, which is null in
> case of using models, can you try 2.3.4 SNAPSHOT please
>
> thanks, Sergey
>
> On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Sergey, the custom WADL provider is quite interesting for me and
> I’ll investigate if it’s possible to autogenerate the XSD from my code and
> include it to the WADL.
>
>
>
> Trying to get the WADL from my resources, I’ve added the flag
> “staticSubresourceResolution” to my generic server:
>
>
>
>     <jaxrs:server id="genericServer"
> staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/GenericModel.xml"
> abstract="true">…</jaxrs:server>
>
>
>
> But a NullPointerException is thrown when accessing to the WADL (
> http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml)!
>
>
>
> Interceptor for {
> http://generic.service.mobile.mobility.ica.com/}IRestService has thrown
> exception, unwinding now
>
> java.lang.NullPointerException
>
>         at
> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:310)
>
> …
>
>
>
> Let me know if you want the whole stacktrace…
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 23:07
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
>
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> XSD is good enough as it captures the service requirements to some extent,
> WADL gives much more info, it shows the whole application graph/tree with
> all the useful metadata (consumes/produces, etc). The only problem it won't
> generate a schema for you if you have a generic service provider, but you
> can customize the WADLGenerator to reference the external schemas:
>
>
> http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-CustomWADLproviders
>
> cheers, Sergey
>
> On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> I’m currently using soapUI and it’s a good tool for testing but,what about
> non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
> payloads and optionally the WADL if they want to be integrated with my
> RESTful services?
>
>
>
> Thanks again Sergey!
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 16:38
>
>
> *Para:* users@cxf.apache.org
>
> *CC:* Ivan Vitoria Sanchez
>
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi
>
> On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Benson.
>
> I need to integrate my server with other system, which will provide me
> their WSDL file (i guess i'll have to build a WS client). Do you think that
> WADL contract should be enough if someone needs to integrate with JAX-RS
> server?
>
>
> At the moment consumers like SOAPUi can use WADL to test endpoints - which
> is a very useful thing.
> Otherwise, one does not need WADL in order to integrate, HTTP centric
> clients use the explicit knowledge of the endpoint's restful interface,
> proxies get all the info they need from annotations.
>
> However, we can use WADL to convey policies too, it is just a bit early for
> this kind of advanced integration to occur, but stay tined, the WADL-related
> will resume shortly in CXF.
>
> thanks, Sergey
>
>
> Cheers,
>
> Ivan
>
>
>
> -----Mensaje original-----
> De: Benson Margulies [mailto:bimargulies@gmail.com]
> Enviado el: lunes, 11 de abril de 2011 17:59
> Para: users@cxf.apache.org
> Asunto: Re: Generating WSDL from JAX-RS server
>
> WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
> JAX-RS Module can on the other hand generate a WADL file.
>
>
> On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
> <iv...@grupoica.com> wrote:
> > Hello,
> >
> >
> >
> > How can I generate a WSDL file from all the JAX-RS endpoints? Should I
> use
> > java2ws tool? I'm quite confused about this...
> >
> >
> >
> > Cheers,
> >
> >
> >
> > Ivan
> >
> >
> >
> >
> >
> >
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com

RE: Generating WSDL from JAX-RS server

Posted by Ivan Vitoria Sanchez <iv...@grupoica.com>.
Hi,

 

I have no other libraries except those required by CXF… 

 

Sergey, would you want that I open a JIRA of the NPE against 2.3.4 anyway?  

 

Cheers,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 19:24
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi Ivan

 

I think I've seen it before. Looks like you have some conflicts on your
class path, has someone else seen this issue ?

 

thanks, Sergey

On Wed, Apr 13, 2011 at 2:47 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi Sergey,

 

Now, this exception is throwed…

 

org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw
exception; nested exception is java.lang.IncompatibleClassChangeError:
Implementing class at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)

 

 

 

Ivan

 

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 14:23 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi Ivan 

cxf-extension-jaxrs-binding.xml (and other similar extensions) are not
available in 2.4.0, just remove the import, keep only cxf.xml, and
cxf-servlet.xml (though it may be redundant)

 

Sergey


 

On Wed, Apr 13, 2011 at 12:34 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi,

 

I cannot try with 2.4.0 because there seems to be a problem related to the
integration with Spring!

 

org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Failed to import bean definitions from URL location
[classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml]

Offending resource: ServletContext resource
[/WEB-INF/applicationContext.xml]; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: IOException
parsing XML document from class path resource
[META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is
java.io.FileNotFoundException: class path resource
[META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it
does not exist

 

 

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 12:22 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi, thanks for the test.

 

Please open a JIRA against 2.3.4 only (with the 2.3.4 stacktrace). I'd
appreciate if you could try 2.4.0-SNAPSHOT as well, what may've happened I
did not merge the changes to 2.3.4, as I also committed the changes to do
with improving the auto-generated documentation, as part of the same commit,
but I can apply few minor updates tp 2.3.4 only to prevent NPE

 

thanks, Sergey

On Wed, Apr 13, 2011 at 11:15 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi,

 

I’ve seen the NPE with both CXF 2.3.2 and 2.3.3. I’ve tried upgrading to
2.3.4 SNAPSHOT from
https://repository.apache.org/content/groups/snapshots/org/apache/cxf/apache
-cxf/2.3.4-SNAPSHOT/apache-cxf-2.3.4-SNAPSHOT.zip but the result is still
the same…

 

Do you think that I should open a JIRA?

 

Regards,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 10:51 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
it is ?
Actually, in CXF 2.3.4, being released now, I did update the code to make
sure WADL is generated properly when the model is used, in some case a
current op info is used to get to the annotated method, which is null in
case of using models, can you try 2.3.4 SNAPSHOT please

thanks, Sergey 

On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Sergey, the custom WADL provider is quite interesting for me and I’ll
investigate if it’s possible to autogenerate the XSD from my code and
include it to the WADL.

 

Trying to get the WADL from my resources, I’ve added the flag
“staticSubresourceResolution” to my generic server:

 

    <jaxrs:server id="genericServer"
staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/Generic
Model.xml" abstract="true">…</jaxrs:server>

 

But a NullPointerException is thrown when accessing to the WADL
(http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl
<http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml>
&_type=xml)!

 

Interceptor for
{http://generic.service.mobile.mobility.ica.com/}IRestService
<http://generic.service.mobile.mobility.ica.com/%7DIRestService>  has thrown
exception, unwinding now

java.lang.NullPointerException

        at
org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.
java:310)

…

 

Let me know if you want the whole stacktrace…

 

Cheers,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 23:07
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org


Asunto: Re: Generating WSDL from JAX-RS server

 

XSD is good enough as it captures the service requirements to some extent,
WADL gives much more info, it shows the whole application graph/tree with
all the useful metadata (consumes/produces, etc). The only problem it won't
generate a schema for you if you have a generic service provider, but you
can customize the WADLGenerator to reference the external schemas:

http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDesc
ription-CustomWADLproviders

cheers, Sergey 

On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

I’m currently using soapUI and it’s a good tool for testing but,what about
non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
payloads and optionally the WADL if they want to be integrated with my
RESTful services?

 

Thanks again Sergey!

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 16:38


Para: users@cxf.apache.org

CC: Ivan Vitoria Sanchez


Asunto: Re: Generating WSDL from JAX-RS server

 

Hi

On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Benson.

I need to integrate my server with other system, which will provide me their
WSDL file (i guess i'll have to build a WS client). Do you think that WADL
contract should be enough if someone needs to integrate with JAX-RS server?


At the moment consumers like SOAPUi can use WADL to test endpoints - which
is a very useful thing.
Otherwise, one does not need WADL in order to integrate, HTTP centric
clients use the explicit knowledge of the endpoint's restful interface,
proxies get all the info they need from annotations.

However, we can use WADL to convey policies too, it is just a bit early for
this kind of advanced integration to occur, but stay tined, the WADL-related
will resume shortly in CXF.

thanks, Sergey
 

Cheers,

Ivan



-----Mensaje original-----
De: Benson Margulies [mailto:bimargulies@gmail.com]
Enviado el: lunes, 11 de abril de 2011 17:59
Para: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
JAX-RS Module can on the other hand generate a WADL file.


On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> How can I generate a WSDL file from all the JAX-RS endpoints? Should I use
> java2ws tool? I'm quite confused about this...
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
>
>
>




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 


Re: Generating WSDL from JAX-RS server

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Ivan

I think I've seen it before. Looks like you have some conflicts on your
class path, has someone else seen this issue ?

thanks, Sergey

On Wed, Apr 13, 2011 at 2:47 PM, Ivan Vitoria Sanchez <ivitoria@grupoica.com
> wrote:

>  Hi Sergey,
>
>
>
> Now, this exception is throwed…
>
>
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]:
> Instantiation of bean failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Could not instantiate
> bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw
> exception; nested exception is java.lang.IncompatibleClassChangeError:
> Implementing class at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
>
>
>
>
>
>
>
> Ivan
>
>
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 14:23
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi Ivan
>
> cxf-extension-jaxrs-binding.xml (and other similar extensions) are not
> available in 2.4.0, just remove the import, keep only cxf.xml, and
> cxf-servlet.xml (though it may be redundant)
>
>
>
> Sergey
>
>
>
>
> On Wed, Apr 13, 2011 at 12:34 PM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Hi,
>
>
>
> I cannot try with 2.4.0 because there seems to be a problem related to the
> integration with Spring!
>
>
>
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Failed to import bean definitions from URL location
> [classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml]
>
> Offending resource: ServletContext resource
> [/WEB-INF/applicationContext.xml]; nested exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: IOException
> parsing XML document from class path resource
> [META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is
> java.io.FileNotFoundException: class path resource
> [META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it
> does not exist
>
> * *
>
>
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 12:22
>
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi, thanks for the test.
>
>
>
> Please open a JIRA against 2.3.4 only (with the 2.3.4 stacktrace). I'd
> appreciate if you could try 2.4.0-SNAPSHOT as well, what may've happened I
> did not merge the changes to 2.3.4, as I also committed the changes to do
> with improving the auto-generated documentation, as part of the same commit,
> but I can apply few minor updates tp 2.3.4 only to prevent NPE
>
>
>
> thanks, Sergey
>
> On Wed, Apr 13, 2011 at 11:15 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Hi,
>
>
>
> I’ve seen the NPE with both CXF 2.3.2 and 2.3.3. I’ve tried upgrading to
> 2.3.4 SNAPSHOT from
> https://repository.apache.org/content/groups/snapshots/org/apache/cxf/apache-cxf/2.3.4-SNAPSHOT/apache-cxf-2.3.4-SNAPSHOT.zip but
> the result is still the same…
>
>
>
> Do you think that I should open a JIRA?
>
>
>
> Regards,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 10:51
>
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
> it is ?
> Actually, in CXF 2.3.4, being released now, I did update the code to make
> sure WADL is generated properly when the model is used, in some case a
> current op info is used to get to the annotated method, which is null in
> case of using models, can you try 2.3.4 SNAPSHOT please
>
> thanks, Sergey
>
> On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Sergey, the custom WADL provider is quite interesting for me and
> I’ll investigate if it’s possible to autogenerate the XSD from my code and
> include it to the WADL.
>
>
>
> Trying to get the WADL from my resources, I’ve added the flag
> “staticSubresourceResolution” to my generic server:
>
>
>
>     <jaxrs:server id="genericServer"
> staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/GenericModel.xml"
> abstract="true">…</jaxrs:server>
>
>
>
> But a NullPointerException is thrown when accessing to the WADL (
> http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml)!
>
>
>
> Interceptor for {
> http://generic.service.mobile.mobility.ica.com/}IRestService has thrown
> exception, unwinding now
>
> java.lang.NullPointerException
>
>         at
> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:310)
>
> …
>
>
>
> Let me know if you want the whole stacktrace…
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 23:07
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
>
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> XSD is good enough as it captures the service requirements to some extent,
> WADL gives much more info, it shows the whole application graph/tree with
> all the useful metadata (consumes/produces, etc). The only problem it won't
> generate a schema for you if you have a generic service provider, but you
> can customize the WADLGenerator to reference the external schemas:
>
>
> http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-CustomWADLproviders
>
> cheers, Sergey
>
> On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> I’m currently using soapUI and it’s a good tool for testing but,what about
> non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
> payloads and optionally the WADL if they want to be integrated with my
> RESTful services?
>
>
>
> Thanks again Sergey!
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 16:38
>
>
> *Para:* users@cxf.apache.org
>
> *CC:* Ivan Vitoria Sanchez
>
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi
>
> On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Benson.
>
> I need to integrate my server with other system, which will provide me
> their WSDL file (i guess i'll have to build a WS client). Do you think that
> WADL contract should be enough if someone needs to integrate with JAX-RS
> server?
>
>
> At the moment consumers like SOAPUi can use WADL to test endpoints - which
> is a very useful thing.
> Otherwise, one does not need WADL in order to integrate, HTTP centric
> clients use the explicit knowledge of the endpoint's restful interface,
> proxies get all the info they need from annotations.
>
> However, we can use WADL to convey policies too, it is just a bit early for
> this kind of advanced integration to occur, but stay tined, the WADL-related
> will resume shortly in CXF.
>
> thanks, Sergey
>
>
> Cheers,
>
> Ivan
>
>
>
> -----Mensaje original-----
> De: Benson Margulies [mailto:bimargulies@gmail.com]
> Enviado el: lunes, 11 de abril de 2011 17:59
> Para: users@cxf.apache.org
> Asunto: Re: Generating WSDL from JAX-RS server
>
> WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
> JAX-RS Module can on the other hand generate a WADL file.
>
>
> On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
> <iv...@grupoica.com> wrote:
> > Hello,
> >
> >
> >
> > How can I generate a WSDL file from all the JAX-RS endpoints? Should I
> use
> > java2ws tool? I'm quite confused about this...
> >
> >
> >
> > Cheers,
> >
> >
> >
> > Ivan
> >
> >
> >
> >
> >
> >
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/>
http://sberyozkin.blogspot.com

RE: Generating WSDL from JAX-RS server

Posted by Ivan Vitoria Sanchez <iv...@grupoica.com>.
Hi Sergey,

 

Now, this exception is throwed…

 

org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw
exception; nested exception is java.lang.IncompatibleClassChangeError:
Implementing class at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)

 

 

 

Ivan

 

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 14:23
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi Ivan 

cxf-extension-jaxrs-binding.xml (and other similar extensions) are not
available in 2.4.0, just remove the import, keep only cxf.xml, and
cxf-servlet.xml (though it may be redundant)

 

Sergey


 

On Wed, Apr 13, 2011 at 12:34 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi,

 

I cannot try with 2.4.0 because there seems to be a problem related to the
integration with Spring!

 

org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Failed to import bean definitions from URL location
[classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml]

Offending resource: ServletContext resource
[/WEB-INF/applicationContext.xml]; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: IOException
parsing XML document from class path resource
[META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is
java.io.FileNotFoundException: class path resource
[META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it
does not exist

 

 

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 12:22 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi, thanks for the test.

 

Please open a JIRA against 2.3.4 only (with the 2.3.4 stacktrace). I'd
appreciate if you could try 2.4.0-SNAPSHOT as well, what may've happened I
did not merge the changes to 2.3.4, as I also committed the changes to do
with improving the auto-generated documentation, as part of the same commit,
but I can apply few minor updates tp 2.3.4 only to prevent NPE

 

thanks, Sergey

On Wed, Apr 13, 2011 at 11:15 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi,

 

I’ve seen the NPE with both CXF 2.3.2 and 2.3.3. I’ve tried upgrading to
2.3.4 SNAPSHOT from
https://repository.apache.org/content/groups/snapshots/org/apache/cxf/apache
-cxf/2.3.4-SNAPSHOT/apache-cxf-2.3.4-SNAPSHOT.zip but the result is still
the same…

 

Do you think that I should open a JIRA?

 

Regards,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 10:51 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
it is ?
Actually, in CXF 2.3.4, being released now, I did update the code to make
sure WADL is generated properly when the model is used, in some case a
current op info is used to get to the annotated method, which is null in
case of using models, can you try 2.3.4 SNAPSHOT please

thanks, Sergey 

On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Sergey, the custom WADL provider is quite interesting for me and I’ll
investigate if it’s possible to autogenerate the XSD from my code and
include it to the WADL.

 

Trying to get the WADL from my resources, I’ve added the flag
“staticSubresourceResolution” to my generic server:

 

    <jaxrs:server id="genericServer"
staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/Generic
Model.xml" abstract="true">…</jaxrs:server>

 

But a NullPointerException is thrown when accessing to the WADL
(http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl
<http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml>
&_type=xml)!

 

Interceptor for
{http://generic.service.mobile.mobility.ica.com/}IRestService
<http://generic.service.mobile.mobility.ica.com/%7DIRestService>  has thrown
exception, unwinding now

java.lang.NullPointerException

        at
org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.
java:310)

…

 

Let me know if you want the whole stacktrace…

 

Cheers,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 23:07
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org


Asunto: Re: Generating WSDL from JAX-RS server

 

XSD is good enough as it captures the service requirements to some extent,
WADL gives much more info, it shows the whole application graph/tree with
all the useful metadata (consumes/produces, etc). The only problem it won't
generate a schema for you if you have a generic service provider, but you
can customize the WADLGenerator to reference the external schemas:

http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDesc
ription-CustomWADLproviders

cheers, Sergey 

On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

I’m currently using soapUI and it’s a good tool for testing but,what about
non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
payloads and optionally the WADL if they want to be integrated with my
RESTful services?

 

Thanks again Sergey!

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 16:38


Para: users@cxf.apache.org

CC: Ivan Vitoria Sanchez


Asunto: Re: Generating WSDL from JAX-RS server

 

Hi

On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Benson.

I need to integrate my server with other system, which will provide me their
WSDL file (i guess i'll have to build a WS client). Do you think that WADL
contract should be enough if someone needs to integrate with JAX-RS server?


At the moment consumers like SOAPUi can use WADL to test endpoints - which
is a very useful thing.
Otherwise, one does not need WADL in order to integrate, HTTP centric
clients use the explicit knowledge of the endpoint's restful interface,
proxies get all the info they need from annotations.

However, we can use WADL to convey policies too, it is just a bit early for
this kind of advanced integration to occur, but stay tined, the WADL-related
will resume shortly in CXF.

thanks, Sergey
 

Cheers,

Ivan



-----Mensaje original-----
De: Benson Margulies [mailto:bimargulies@gmail.com]
Enviado el: lunes, 11 de abril de 2011 17:59
Para: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
JAX-RS Module can on the other hand generate a WADL file.


On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> How can I generate a WSDL file from all the JAX-RS endpoints? Should I use
> java2ws tool? I'm quite confused about this...
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
>
>
>




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 


Re: Generating WSDL from JAX-RS server

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Ivan
cxf-extension-jaxrs-binding.xml (and other similar extensions) are not
available in 2.4.0, just remove the import, keep only cxf.xml, and
cxf-servlet.xml (though it may be redundant)

Sergey


On Wed, Apr 13, 2011 at 12:34 PM, Ivan Vitoria Sanchez <
ivitoria@grupoica.com> wrote:

>  Hi,
>
>
>
> I cannot try with 2.4.0 because there seems to be a problem related to the
> integration with Spring!
>
>
>
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Failed to import bean definitions from URL location
> [classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml]
>
> Offending resource: ServletContext resource
> [/WEB-INF/applicationContext.xml]; nested exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: IOException
> parsing XML document from class path resource
> [META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is
> java.io.FileNotFoundException: class path resource
> [META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it
> does not exist
>
> * *
>
>
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 12:22
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi, thanks for the test.
>
>
>
> Please open a JIRA against 2.3.4 only (with the 2.3.4 stacktrace). I'd
> appreciate if you could try 2.4.0-SNAPSHOT as well, what may've happened I
> did not merge the changes to 2.3.4, as I also committed the changes to do
> with improving the auto-generated documentation, as part of the same commit,
> but I can apply few minor updates tp 2.3.4 only to prevent NPE
>
>
>
> thanks, Sergey
>
> On Wed, Apr 13, 2011 at 11:15 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Hi,
>
>
>
> I’ve seen the NPE with both CXF 2.3.2 and 2.3.3. I’ve tried upgrading to
> 2.3.4 SNAPSHOT from
> https://repository.apache.org/content/groups/snapshots/org/apache/cxf/apache-cxf/2.3.4-SNAPSHOT/apache-cxf-2.3.4-SNAPSHOT.zip but
> the result is still the same…
>
>
>
> Do you think that I should open a JIRA?
>
>
>
> Regards,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 10:51
>
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
> it is ?
> Actually, in CXF 2.3.4, being released now, I did update the code to make
> sure WADL is generated properly when the model is used, in some case a
> current op info is used to get to the annotated method, which is null in
> case of using models, can you try 2.3.4 SNAPSHOT please
>
> thanks, Sergey
>
> On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Sergey, the custom WADL provider is quite interesting for me and
> I’ll investigate if it’s possible to autogenerate the XSD from my code and
> include it to the WADL.
>
>
>
> Trying to get the WADL from my resources, I’ve added the flag
> “staticSubresourceResolution” to my generic server:
>
>
>
>     <jaxrs:server id="genericServer"
> staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/GenericModel.xml"
> abstract="true">…</jaxrs:server>
>
>
>
> But a NullPointerException is thrown when accessing to the WADL (
> http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml)!
>
>
>
> Interceptor for {
> http://generic.service.mobile.mobility.ica.com/}IRestService has thrown
> exception, unwinding now
>
> java.lang.NullPointerException
>
>         at
> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:310)
>
> …
>
>
>
> Let me know if you want the whole stacktrace…
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 23:07
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
>
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> XSD is good enough as it captures the service requirements to some extent,
> WADL gives much more info, it shows the whole application graph/tree with
> all the useful metadata (consumes/produces, etc). The only problem it won't
> generate a schema for you if you have a generic service provider, but you
> can customize the WADLGenerator to reference the external schemas:
>
>
> http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-CustomWADLproviders
>
> cheers, Sergey
>
> On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> I’m currently using soapUI and it’s a good tool for testing but,what about
> non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
> payloads and optionally the WADL if they want to be integrated with my
> RESTful services?
>
>
>
> Thanks again Sergey!
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 16:38
>
>
> *Para:* users@cxf.apache.org
>
> *CC:* Ivan Vitoria Sanchez
>
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi
>
> On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Benson.
>
> I need to integrate my server with other system, which will provide me
> their WSDL file (i guess i'll have to build a WS client). Do you think that
> WADL contract should be enough if someone needs to integrate with JAX-RS
> server?
>
>
> At the moment consumers like SOAPUi can use WADL to test endpoints - which
> is a very useful thing.
> Otherwise, one does not need WADL in order to integrate, HTTP centric
> clients use the explicit knowledge of the endpoint's restful interface,
> proxies get all the info they need from annotations.
>
> However, we can use WADL to convey policies too, it is just a bit early for
> this kind of advanced integration to occur, but stay tined, the WADL-related
> will resume shortly in CXF.
>
> thanks, Sergey
>
>
> Cheers,
>
> Ivan
>
>
>
> -----Mensaje original-----
> De: Benson Margulies [mailto:bimargulies@gmail.com]
> Enviado el: lunes, 11 de abril de 2011 17:59
> Para: users@cxf.apache.org
> Asunto: Re: Generating WSDL from JAX-RS server
>
> WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
> JAX-RS Module can on the other hand generate a WADL file.
>
>
> On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
> <iv...@grupoica.com> wrote:
> > Hello,
> >
> >
> >
> > How can I generate a WSDL file from all the JAX-RS endpoints? Should I
> use
> > java2ws tool? I'm quite confused about this...
> >
> >
> >
> > Cheers,
> >
> >
> >
> > Ivan
> >
> >
> >
> >
> >
> >
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/>
http://sberyozkin.blogspot.com

RE: Generating WSDL from JAX-RS server

Posted by Ivan Vitoria Sanchez <iv...@grupoica.com>.
Hi,

 

I cannot try with 2.4.0 because there seems to be a problem related to the
integration with Spring!

 

org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Failed to import bean definitions from URL location
[classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml]

Offending resource: ServletContext resource
[/WEB-INF/applicationContext.xml]; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: IOException
parsing XML document from class path resource
[META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is
java.io.FileNotFoundException: class path resource
[META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it
does not exist

 

 

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 12:22
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi, thanks for the test.

 

Please open a JIRA against 2.3.4 only (with the 2.3.4 stacktrace). I'd
appreciate if you could try 2.4.0-SNAPSHOT as well, what may've happened I
did not merge the changes to 2.3.4, as I also committed the changes to do
with improving the auto-generated documentation, as part of the same commit,
but I can apply few minor updates tp 2.3.4 only to prevent NPE

 

thanks, Sergey

On Wed, Apr 13, 2011 at 11:15 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Hi,

 

I’ve seen the NPE with both CXF 2.3.2 and 2.3.3. I’ve tried upgrading to
2.3.4 SNAPSHOT from
https://repository.apache.org/content/groups/snapshots/org/apache/cxf/apache
-cxf/2.3.4-SNAPSHOT/apache-cxf-2.3.4-SNAPSHOT.zip but the result is still
the same…

 

Do you think that I should open a JIRA?

 

Regards,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 10:51 


Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
it is ?
Actually, in CXF 2.3.4, being released now, I did update the code to make
sure WADL is generated properly when the model is used, in some case a
current op info is used to get to the annotated method, which is null in
case of using models, can you try 2.3.4 SNAPSHOT please

thanks, Sergey 

On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Sergey, the custom WADL provider is quite interesting for me and I’ll
investigate if it’s possible to autogenerate the XSD from my code and
include it to the WADL.

 

Trying to get the WADL from my resources, I’ve added the flag
“staticSubresourceResolution” to my generic server:

 

    <jaxrs:server id="genericServer"
staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/Generic
Model.xml" abstract="true">…</jaxrs:server>

 

But a NullPointerException is thrown when accessing to the WADL
(http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl
<http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml>
&_type=xml)!

 

Interceptor for
{http://generic.service.mobile.mobility.ica.com/}IRestService
<http://generic.service.mobile.mobility.ica.com/%7DIRestService>  has thrown
exception, unwinding now

java.lang.NullPointerException

        at
org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.
java:310)

…

 

Let me know if you want the whole stacktrace…

 

Cheers,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 23:07
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org


Asunto: Re: Generating WSDL from JAX-RS server

 

XSD is good enough as it captures the service requirements to some extent,
WADL gives much more info, it shows the whole application graph/tree with
all the useful metadata (consumes/produces, etc). The only problem it won't
generate a schema for you if you have a generic service provider, but you
can customize the WADLGenerator to reference the external schemas:

http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDesc
ription-CustomWADLproviders

cheers, Sergey 

On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

I’m currently using soapUI and it’s a good tool for testing but,what about
non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
payloads and optionally the WADL if they want to be integrated with my
RESTful services?

 

Thanks again Sergey!

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 16:38


Para: users@cxf.apache.org

CC: Ivan Vitoria Sanchez


Asunto: Re: Generating WSDL from JAX-RS server

 

Hi

On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Benson.

I need to integrate my server with other system, which will provide me their
WSDL file (i guess i'll have to build a WS client). Do you think that WADL
contract should be enough if someone needs to integrate with JAX-RS server?


At the moment consumers like SOAPUi can use WADL to test endpoints - which
is a very useful thing.
Otherwise, one does not need WADL in order to integrate, HTTP centric
clients use the explicit knowledge of the endpoint's restful interface,
proxies get all the info they need from annotations.

However, we can use WADL to convey policies too, it is just a bit early for
this kind of advanced integration to occur, but stay tined, the WADL-related
will resume shortly in CXF.

thanks, Sergey
 

Cheers,

Ivan



-----Mensaje original-----
De: Benson Margulies [mailto:bimargulies@gmail.com]
Enviado el: lunes, 11 de abril de 2011 17:59
Para: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
JAX-RS Module can on the other hand generate a WADL file.


On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> How can I generate a WSDL file from all the JAX-RS endpoints? Should I use
> java2ws tool? I'm quite confused about this...
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
>
>
>




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/> 
http://sberyozkin.blogspot.com <http://sberyozkin.blogspot.com/> 


Re: Generating WSDL from JAX-RS server

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi, thanks for the test.

Please open a JIRA against 2.3.4 only (with the 2.3.4 stacktrace). I'd
appreciate if you could try 2.4.0-SNAPSHOT as well, what may've happened I
did not merge the changes to 2.3.4, as I also committed the changes to do
with improving the auto-generated documentation, as part of the same commit,
but I can apply few minor updates tp 2.3.4 only to prevent NPE

thanks, Sergey

On Wed, Apr 13, 2011 at 11:15 AM, Ivan Vitoria Sanchez <
ivitoria@grupoica.com> wrote:

>  Hi,
>
>
>
> I’ve seen the NPE with both CXF 2.3.2 and 2.3.3. I’ve tried upgrading to
> 2.3.4 SNAPSHOT from
> https://repository.apache.org/content/groups/snapshots/org/apache/cxf/apache-cxf/2.3.4-SNAPSHOT/apache-cxf-2.3.4-SNAPSHOT.zip but
> the result is still the same…
>
>
>
> Do you think that I should open a JIRA?
>
>
>
> Regards,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* miércoles, 13 de abril de 2011 10:51
>
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
> it is ?
> Actually, in CXF 2.3.4, being released now, I did update the code to make
> sure WADL is generated properly when the model is used, in some case a
> current op info is used to get to the annotated method, which is null in
> case of using models, can you try 2.3.4 SNAPSHOT please
>
> thanks, Sergey
>
> On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Sergey, the custom WADL provider is quite interesting for me and
> I’ll investigate if it’s possible to autogenerate the XSD from my code and
> include it to the WADL.
>
>
>
> Trying to get the WADL from my resources, I’ve added the flag
> “staticSubresourceResolution” to my generic server:
>
>
>
>     <jaxrs:server id="genericServer"
> staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/GenericModel.xml"
> abstract="true">…</jaxrs:server>
>
>
>
> But a NullPointerException is thrown when accessing to the WADL (
> http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml)!
>
>
>
> Interceptor for {
> http://generic.service.mobile.mobility.ica.com/}IRestService has thrown
> exception, unwinding now
>
> java.lang.NullPointerException
>
>         at
> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:310)
>
> …
>
>
>
> Let me know if you want the whole stacktrace…
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 23:07
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
>
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> XSD is good enough as it captures the service requirements to some extent,
> WADL gives much more info, it shows the whole application graph/tree with
> all the useful metadata (consumes/produces, etc). The only problem it won't
> generate a schema for you if you have a generic service provider, but you
> can customize the WADLGenerator to reference the external schemas:
>
>
> http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-CustomWADLproviders
>
> cheers, Sergey
>
> On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> I’m currently using soapUI and it’s a good tool for testing but,what about
> non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
> payloads and optionally the WADL if they want to be integrated with my
> RESTful services?
>
>
>
> Thanks again Sergey!
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 16:38
>
>
> *Para:* users@cxf.apache.org
>
> *CC:* Ivan Vitoria Sanchez
>
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi
>
> On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Benson.
>
> I need to integrate my server with other system, which will provide me
> their WSDL file (i guess i'll have to build a WS client). Do you think that
> WADL contract should be enough if someone needs to integrate with JAX-RS
> server?
>
>
> At the moment consumers like SOAPUi can use WADL to test endpoints - which
> is a very useful thing.
> Otherwise, one does not need WADL in order to integrate, HTTP centric
> clients use the explicit knowledge of the endpoint's restful interface,
> proxies get all the info they need from annotations.
>
> However, we can use WADL to convey policies too, it is just a bit early for
> this kind of advanced integration to occur, but stay tined, the WADL-related
> will resume shortly in CXF.
>
> thanks, Sergey
>
>
> Cheers,
>
> Ivan
>
>
>
> -----Mensaje original-----
> De: Benson Margulies [mailto:bimargulies@gmail.com]
> Enviado el: lunes, 11 de abril de 2011 17:59
> Para: users@cxf.apache.org
> Asunto: Re: Generating WSDL from JAX-RS server
>
> WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
> JAX-RS Module can on the other hand generate a WADL file.
>
>
> On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
> <iv...@grupoica.com> wrote:
> > Hello,
> >
> >
> >
> > How can I generate a WSDL file from all the JAX-RS endpoints? Should I
> use
> > java2ws tool? I'm quite confused about this...
> >
> >
> >
> > Cheers,
> >
> >
> >
> > Ivan
> >
> >
> >
> >
> >
> >
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com/>
> http://sberyozkin.blogspot.com
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/>
http://sberyozkin.blogspot.com

RE: Generating WSDL from JAX-RS server

Posted by Ivan Vitoria Sanchez <iv...@grupoica.com>.
Hi,

 

I’ve seen the NPE with both CXF 2.3.2 and 2.3.3. I’ve tried upgrading to
2.3.4 SNAPSHOT from
https://repository.apache.org/content/groups/snapshots/org/apache/cxf/apache
-cxf/2.3.4-SNAPSHOT/apache-cxf-2.3.4-SNAPSHOT.zip but the result is still
the same…

 

Do you think that I should open a JIRA?

 

Regards,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: miércoles, 13 de abril de 2011 10:51
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
it is ?
Actually, in CXF 2.3.4, being released now, I did update the code to make
sure WADL is generated properly when the model is used, in some case a
current op info is used to get to the annotated method, which is null in
case of using models, can you try 2.3.4 SNAPSHOT please

thanks, Sergey 

On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Sergey, the custom WADL provider is quite interesting for me and I’ll
investigate if it’s possible to autogenerate the XSD from my code and
include it to the WADL.

 

Trying to get the WADL from my resources, I’ve added the flag
“staticSubresourceResolution” to my generic server:

 

    <jaxrs:server id="genericServer"
staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/Generic
Model.xml" abstract="true">…</jaxrs:server>

 

But a NullPointerException is thrown when accessing to the WADL
(http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl
<http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml>
&_type=xml)!

 

Interceptor for
{http://generic.service.mobile.mobility.ica.com/}IRestService
<http://generic.service.mobile.mobility.ica.com/%7DIRestService>  has thrown
exception, unwinding now

java.lang.NullPointerException

        at
org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.
java:310)

…

 

Let me know if you want the whole stacktrace…

 

Cheers,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 23:07
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org


Asunto: Re: Generating WSDL from JAX-RS server

 

XSD is good enough as it captures the service requirements to some extent,
WADL gives much more info, it shows the whole application graph/tree with
all the useful metadata (consumes/produces, etc). The only problem it won't
generate a schema for you if you have a generic service provider, but you
can customize the WADLGenerator to reference the external schemas:

http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDesc
ription-CustomWADLproviders

cheers, Sergey 

On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

I’m currently using soapUI and it’s a good tool for testing but,what about
non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
payloads and optionally the WADL if they want to be integrated with my
RESTful services?

 

Thanks again Sergey!

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 16:38


Para: users@cxf.apache.org

CC: Ivan Vitoria Sanchez


Asunto: Re: Generating WSDL from JAX-RS server

 

Hi

On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Benson.

I need to integrate my server with other system, which will provide me their
WSDL file (i guess i'll have to build a WS client). Do you think that WADL
contract should be enough if someone needs to integrate with JAX-RS server?


At the moment consumers like SOAPUi can use WADL to test endpoints - which
is a very useful thing.
Otherwise, one does not need WADL in order to integrate, HTTP centric
clients use the explicit knowledge of the endpoint's restful interface,
proxies get all the info they need from annotations.

However, we can use WADL to convey policies too, it is just a bit early for
this kind of advanced integration to occur, but stay tined, the WADL-related
will resume shortly in CXF.

thanks, Sergey
 

Cheers,

Ivan



-----Mensaje original-----
De: Benson Margulies [mailto:bimargulies@gmail.com]
Enviado el: lunes, 11 de abril de 2011 17:59
Para: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
JAX-RS Module can on the other hand generate a WADL file.


On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> How can I generate a WSDL file from all the JAX-RS endpoints? Should I use
> java2ws tool? I'm quite confused about this...
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
>
>
>




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com> 
http://sberyozkin.blogspot.com




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com> 
http://sberyozkin.blogspot.com




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com> 
http://sberyozkin.blogspot.com


Re: Generating WSDL from JAX-RS server

Posted by Sergey Beryozkin <sb...@gmail.com>.
Ouch...I've never seen NPE thrown by the WADL generator, which CXF version
it is ?
Actually, in CXF 2.3.4, being released now, I did update the code to make
sure WADL is generated properly when the model is used, in some case a
current op info is used to get to the annotated method, which is null in
case of using models, can you try 2.3.4 SNAPSHOT please

thanks, Sergey

On Wed, Apr 13, 2011 at 8:57 AM, Ivan Vitoria Sanchez <ivitoria@grupoica.com
> wrote:

> Thanks Sergey, the custom WADL provider is quite interesting for me and
> I’ll investigate if it’s possible to autogenerate the XSD from my code and
> include it to the WADL.
>
>
>
> Trying to get the WADL from my resources, I’ve added the flag
> “staticSubresourceResolution” to my generic server:
>
>
>
>     <jaxrs:server id="genericServer"
> staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/GenericModel.xml"
> abstract="true">…</jaxrs:server>
>
>
>
> But a NullPointerException is thrown when accessing to the WADL (
> http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml)!
>
>
>
> Interceptor for {
> http://generic.service.mobile.mobility.ica.com/}IRestService has thrown
> exception, unwinding now
>
> java.lang.NullPointerException
>
>         at
> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:310)
>
> …
>
>
>
> Let me know if you want the whole stacktrace…
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 23:07
> *Para:* Ivan Vitoria Sanchez
> *CC:* users@cxf.apache.org
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> XSD is good enough as it captures the service requirements to some extent,
> WADL gives much more info, it shows the whole application graph/tree with
> all the useful metadata (consumes/produces, etc). The only problem it won't
> generate a schema for you if you have a generic service provider, but you
> can customize the WADLGenerator to reference the external schemas:
>
>
> http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-CustomWADLproviders
>
> cheers, Sergey
>
> On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> I’m currently using soapUI and it’s a good tool for testing but,what about
> non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
> payloads and optionally the WADL if they want to be integrated with my
> RESTful services?
>
>
>
> Thanks again Sergey!
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 16:38
>
>
> *Para:* users@cxf.apache.org
>
> *CC:* Ivan Vitoria Sanchez
>
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi
>
> On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Benson.
>
> I need to integrate my server with other system, which will provide me
> their WSDL file (i guess i'll have to build a WS client). Do you think that
> WADL contract should be enough if someone needs to integrate with JAX-RS
> server?
>
>
> At the moment consumers like SOAPUi can use WADL to test endpoints - which
> is a very useful thing.
> Otherwise, one does not need WADL in order to integrate, HTTP centric
> clients use the explicit knowledge of the endpoint's restful interface,
> proxies get all the info they need from annotations.
>
> However, we can use WADL to convey policies too, it is just a bit early for
> this kind of advanced integration to occur, but stay tined, the WADL-related
> will resume shortly in CXF.
>
> thanks, Sergey
>
>
> Cheers,
>
> Ivan
>
>
>
> -----Mensaje original-----
> De: Benson Margulies [mailto:bimargulies@gmail.com]
> Enviado el: lunes, 11 de abril de 2011 17:59
> Para: users@cxf.apache.org
> Asunto: Re: Generating WSDL from JAX-RS server
>
> WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
> JAX-RS Module can on the other hand generate a WADL file.
>
>
> On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
> <iv...@grupoica.com> wrote:
> > Hello,
> >
> >
> >
> > How can I generate a WSDL file from all the JAX-RS endpoints? Should I
> use
> > java2ws tool? I'm quite confused about this...
> >
> >
> >
> > Cheers,
> >
> >
> >
> > Ivan
> >
> >
> >
> >
> >
> >
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com>
> http://sberyozkin.blogspot.com
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com>
> http://sberyozkin.blogspot.com
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com

RE: Generating WSDL from JAX-RS server

Posted by Ivan Vitoria Sanchez <iv...@grupoica.com>.
Thanks Sergey, the custom WADL provider is quite interesting for me and I'll
investigate if it's possible to autogenerate the XSD from my code and
include it to the WADL.

 

Trying to get the WADL from my resources, I've added the flag
"staticSubresourceResolution" to my generic server:

 

    <jaxrs:server id="genericServer"
staticSubresourceResolution="true"modelRef="classpath:/WEB-INF/model/Generic
Model.xml" abstract="true">.</jaxrs:server>

 

But a NullPointerException is thrown when accessing to the WADL
(http://localhost:8000/JaxrsTransactional/mobile/fields?_wadl&_type=xml)!

 

Interceptor for
{http://generic.service.mobile.mobility.ica.com/}IRestService has thrown
exception, unwinding now

java.lang.NullPointerException

        at
org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.
java:310)

.

 

Let me know if you want the whole stacktrace.

 

Cheers,

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 23:07
Para: Ivan Vitoria Sanchez
CC: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

 

XSD is good enough as it captures the service requirements to some extent,
WADL gives much more info, it shows the whole application graph/tree with
all the useful metadata (consumes/produces, etc). The only problem it won't
generate a schema for you if you have a generic service provider, but you
can customize the WADLGenerator to reference the external schemas:

http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDesc
ription-CustomWADLproviders

cheers, Sergey 

On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

I'm currently using soapUI and it's a good tool for testing but,what about
non-java plataforms (such as SAP or .NET.)? should I send them the XSD of my
payloads and optionally the WADL if they want to be integrated with my
RESTful services?

 

Thanks again Sergey!

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 16:38


Para: users@cxf.apache.org

CC: Ivan Vitoria Sanchez


Asunto: Re: Generating WSDL from JAX-RS server

 

Hi

On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Benson.

I need to integrate my server with other system, which will provide me their
WSDL file (i guess i'll have to build a WS client). Do you think that WADL
contract should be enough if someone needs to integrate with JAX-RS server?


At the moment consumers like SOAPUi can use WADL to test endpoints - which
is a very useful thing.
Otherwise, one does not need WADL in order to integrate, HTTP centric
clients use the explicit knowledge of the endpoint's restful interface,
proxies get all the info they need from annotations.

However, we can use WADL to convey policies too, it is just a bit early for
this kind of advanced integration to occur, but stay tined, the WADL-related
will resume shortly in CXF.

thanks, Sergey
 

Cheers,

Ivan



-----Mensaje original-----
De: Benson Margulies [mailto:bimargulies@gmail.com]
Enviado el: lunes, 11 de abril de 2011 17:59
Para: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
JAX-RS Module can on the other hand generate a WADL file.


On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> How can I generate a WSDL file from all the JAX-RS endpoints? Should I use
> java2ws tool? I'm quite confused about this...
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
>
>
>




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com> 
http://sberyozkin.blogspot.com




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com> 
http://sberyozkin.blogspot.com


Re: Generating WSDL from JAX-RS server

Posted by Sergey Beryozkin <sb...@gmail.com>.
XSD is good enough as it captures the service requirements to some extent,
WADL gives much more info, it shows the whole application graph/tree with
all the useful metadata (consumes/produces, etc). The only problem it won't
generate a schema for you if you have a generic service provider, but you
can customize the WADLGenerator to reference the external schemas:

http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-CustomWADLproviders

cheers, Sergey

On Tue, Apr 12, 2011 at 4:41 PM, Ivan Vitoria Sanchez <ivitoria@grupoica.com
> wrote:

> I’m currently using soapUI and it’s a good tool for testing but,what about
> non-java plataforms (such as SAP or .NET…)? should I send them the XSD of my
> payloads and optionally the WADL if they want to be integrated with my
> RESTful services?
>
>
>
> Thanks again Sergey!
>
>
>
> Ivan
>
>
>
> *De:* Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> *Enviado el:* martes, 12 de abril de 2011 16:38
>
> *Para:* users@cxf.apache.org
> *CC:* Ivan Vitoria Sanchez
>
> *Asunto:* Re: Generating WSDL from JAX-RS server
>
>
>
> Hi
>
> On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez <
> ivitoria@grupoica.com> wrote:
>
> Thanks Benson.
>
> I need to integrate my server with other system, which will provide me
> their WSDL file (i guess i'll have to build a WS client). Do you think that
> WADL contract should be enough if someone needs to integrate with JAX-RS
> server?
>
>
> At the moment consumers like SOAPUi can use WADL to test endpoints - which
> is a very useful thing.
> Otherwise, one does not need WADL in order to integrate, HTTP centric
> clients use the explicit knowledge of the endpoint's restful interface,
> proxies get all the info they need from annotations.
>
> However, we can use WADL to convey policies too, it is just a bit early for
> this kind of advanced integration to occur, but stay tined, the WADL-related
> will resume shortly in CXF.
>
> thanks, Sergey
>
>
> Cheers,
>
> Ivan
>
>
>
> -----Mensaje original-----
> De: Benson Margulies [mailto:bimargulies@gmail.com]
> Enviado el: lunes, 11 de abril de 2011 17:59
> Para: users@cxf.apache.org
> Asunto: Re: Generating WSDL from JAX-RS server
>
> WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
> JAX-RS Module can on the other hand generate a WADL file.
>
>
> On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
> <iv...@grupoica.com> wrote:
> > Hello,
> >
> >
> >
> > How can I generate a WSDL file from all the JAX-RS endpoints? Should I
> use
> > java2ws tool? I'm quite confused about this...
> >
> >
> >
> > Cheers,
> >
> >
> >
> > Ivan
> >
> >
> >
> >
> >
> >
>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com>
> http://sberyozkin.blogspot.com
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com

RE: Generating WSDL from JAX-RS server

Posted by Ivan Vitoria Sanchez <iv...@grupoica.com>.
I'm currently using soapUI and it's a good tool for testing but,what about
non-java plataforms (such as SAP or .NET.)? should I send them the XSD of my
payloads and optionally the WADL if they want to be integrated with my
RESTful services?

 

Thanks again Sergey!

 

Ivan

 

De: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Enviado el: martes, 12 de abril de 2011 16:38
Para: users@cxf.apache.org
CC: Ivan Vitoria Sanchez
Asunto: Re: Generating WSDL from JAX-RS server

 

Hi

On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:

Thanks Benson.

I need to integrate my server with other system, which will provide me their
WSDL file (i guess i'll have to build a WS client). Do you think that WADL
contract should be enough if someone needs to integrate with JAX-RS server?


At the moment consumers like SOAPUi can use WADL to test endpoints - which
is a very useful thing.
Otherwise, one does not need WADL in order to integrate, HTTP centric
clients use the explicit knowledge of the endpoint's restful interface,
proxies get all the info they need from annotations.

However, we can use WADL to convey policies too, it is just a bit early for
this kind of advanced integration to occur, but stay tined, the WADL-related
will resume shortly in CXF.

thanks, Sergey
 

Cheers,

Ivan



-----Mensaje original-----
De: Benson Margulies [mailto:bimargulies@gmail.com]
Enviado el: lunes, 11 de abril de 2011 17:59
Para: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
JAX-RS Module can on the other hand generate a WADL file.


On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> How can I generate a WSDL file from all the JAX-RS endpoints? Should I use
> java2ws tool? I'm quite confused about this...
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
>
>
>




-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com> 
http://sberyozkin.blogspot.com


Re: Generating WSDL from JAX-RS server

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

On Tue, Apr 12, 2011 at 8:02 AM, Ivan Vitoria Sanchez <ivitoria@grupoica.com
> wrote:

> Thanks Benson.
>
> I need to integrate my server with other system, which will provide me
> their WSDL file (i guess i'll have to build a WS client). Do you think that
> WADL contract should be enough if someone needs to integrate with JAX-RS
> server?
>
>
At the moment consumers like SOAPUi can use WADL to test endpoints - which
is a very useful thing.
Otherwise, one does not need WADL in order to integrate, HTTP centric
clients use the explicit knowledge of the endpoint's restful interface,
proxies get all the info they need from annotations.

However, we can use WADL to convey policies too, it is just a bit early for
this kind of advanced integration to occur, but stay tined, the WADL-related
will resume shortly in CXF.

thanks, Sergey


> Cheers,
>
> Ivan
>
>
>
> -----Mensaje original-----
> De: Benson Margulies [mailto:bimargulies@gmail.com]
> Enviado el: lunes, 11 de abril de 2011 17:59
> Para: users@cxf.apache.org
> Asunto: Re: Generating WSDL from JAX-RS server
>
> WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
> JAX-RS Module can on the other hand generate a WADL file.
>
>
> On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
> <iv...@grupoica.com> wrote:
> > Hello,
> >
> >
> >
> > How can I generate a WSDL file from all the JAX-RS endpoints? Should I
> use
> > java2ws tool? I'm quite confused about this...
> >
> >
> >
> > Cheers,
> >
> >
> >
> > Ivan
> >
> >
> >
> >
> >
> >
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com

RE: Generating WSDL from JAX-RS server

Posted by Ivan Vitoria Sanchez <iv...@grupoica.com>.
Thanks Benson.

I need to integrate my server with other system, which will provide me their WSDL file (i guess i'll have to build a WS client). Do you think that WADL contract should be enough if someone needs to integrate with JAX-RS server?

Cheers,

Ivan 



-----Mensaje original-----
De: Benson Margulies [mailto:bimargulies@gmail.com] 
Enviado el: lunes, 11 de abril de 2011 17:59
Para: users@cxf.apache.org
Asunto: Re: Generating WSDL from JAX-RS server

WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
JAX-RS Module can on the other hand generate a WADL file.


On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> How can I generate a WSDL file from all the JAX-RS endpoints? Should I use
> java2ws tool? I'm quite confused about this...
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
>
>
>

Re: Generating WSDL from JAX-RS server

Posted by Benson Margulies <bi...@gmail.com>.
WSDL 1.x does not support JAX-RS, and CXF only supports WSDL 1.x. The
JAX-RS Module can on the other hand generate a WADL file.


On Mon, Apr 11, 2011 at 11:43 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> How can I generate a WSDL file from all the JAX-RS endpoints? Should I use
> java2ws tool? I'm quite confused about this...
>
>
>
> Cheers,
>
>
>
> Ivan
>
>
>
>
>
>