Re: CXF3 - Annotations in the interface are not parsed

2016-08-18 Thread J. Fiala
That's exactly what I would like to do - if I remove the annotations from the implementing class methods, they vanish from the WADL. Best regards, Johannes Am 18.08.2016 um 15:54 schrieb Sergey Beryozkin: It's invalid per the JAX-RS spec - see its annotation inheritance section, you can not

Re: CXF3 - Annotations in the interface are not parsed

2016-08-18 Thread J. Fiala
Hi, I defined the implementing class in the spring configuration (as spring always require to define the implementing class - changing to the interface will result in "org.springframework.beans.BeanInstantiationException - Specified class is an interface"): and then defined in the

Page with list of all services

2016-08-18 Thread Maxim Solodovnik
Hello, recently I find out the list of all REST/SOAP services is not available anymore (CXF 3.1.7) It was working some time ago Should I make any changes to make it work again? I tried to add cxf-rt-rs-service-description-3.1.7.jar as dependency, but it doesn't help :( Thanks a lot for your

Re: CXF returns 404 + HTML for non-existing service-url

2016-08-18 Thread Sergey Beryozkin
Hi, this error is reported at a CXF Servlet level before the request reaches the JAX-RS endpoint, effective CXF can not find a handler - you can always make the JAX-RS endpoint address wildcard-wide enough to handle 404 there. Otheriwise the only way to customize it is to have a custom Servlet

Re: CXF3 - Annotations in the interface are not parsed

2016-08-18 Thread Vassilis Virvilis
Hi, jumping in and trying a lucky shot... Is your packaging information correct? Maybe you have specified the impl class and not the interface on the config file... Vassilis On 08/18/2016 05:01 PM, J. Fiala wrote: That's exactly what I would like to do - if I remove the annotations

Re: CXF3 - Annotations in the interface are not parsed

2016-08-18 Thread Sergey Beryozkin
So let me double check, are you saying of you have @Path("/helloWorld") public interface HelloWorldResource { @GET @Produces("application/json") @Path("/find") String sayHello(@QueryParam("name") String name); } public class HelloWorldServiceImpl implements HelloWorldResource

JAXRS How to define/use Multiparts with Json + xs:base64Binary

2016-08-18 Thread J. Fiala
Hello, I defined a Multipart in the WADL (I'd like to use a multipart with both json data + binary data): type="xs:string" required="true"/> element="mytypes:CreateMultipartRequestType"/>

Re: JAXRS How to define/use Multiparts with Json + xs:base64Binary

2016-08-18 Thread J. Fiala
p.s. a basic multipart like works, but then I only get the generic MultipartBody generated without any hint to the client how to assemble it correctly. Best regards, Johannes Am 18.08.2016 um 16:13 schrieb J. Fiala: Hello, I defined a Multipart in the WADL (I'd like to use a multipart

Re: CXF Exception-Handling: error message is not included in Response

2016-08-18 Thread Sergey Beryozkin
Hi On 18/08/16 14:32, J. Fiala wrote: Hi, I just came across the Exception handling behaviour of CXF 3 and was wondering if this is intended: 1.) Passing simply a string as message results in message is not included in the response. throw new InternalServerErrorException("message"); ==> will

Re: Page with list of all services

2016-08-18 Thread Maxim Solodovnik
Thanks for the quick answer Sergey :) I'll check SNAPSHOT and will write back here :) What additional dependencies need to be added to display the list of both SOAP and REST services? On Thu, Aug 18, 2016 at 10:38 PM, Sergey Beryozkin wrote: > Hi Max > > I updated CXF

Re: Page with list of all services

2016-08-18 Thread Maxim Solodovnik
hmm, just have tested, not working :( details: libraries in classpath webapps/openmeetings/WEB-INF/lib/cxf-core-3.1.8-SNAPSHOT.jar webapps/openmeetings/WEB-INF/lib/cxf-rt-bindings-soap-3.1.8-SNAPSHOT.jar webapps/openmeetings/WEB-INF/lib/cxf-rt-bindings-xml-3.1.8-SNAPSHOT.jar

Re: CXF JAXRS wadl2java - ObjectFactory.java causes MarshalException

2016-08-18 Thread J. Fiala
Sergey, Correct, removed the jettison from the classpath and everything works without excluding...! Best regards, Johannes Am 18.08.2016 um 00:27 schrieb Sergey Beryozkin: Looks like you have CXF JSONProvider loaded... Sergey On 17/08/16 17:53, J. Fiala wrote: I'm using wadl2java to

Re: WadlGenerator - Bean validation support for complex types?

2016-08-18 Thread Sergey Beryozkin
Hi thanks for the explanation. On 18/08/16 11:57, J. Fiala wrote: Hi, If I'm using BeanValidation-annotations in my model classes, they are not picked up by the WADLGenerator and so are lost if I do code first and I have to look them up and model them in the WADL manually. At least @NotNull

Re: Spring Boot CXF JAX-RS and Jackson Provider

2016-08-18 Thread J. Fiala
Hi, Thank you, that did it, jettison was on the classpath - I removed it and now it works like a charm :). So CXF Spring Boot also works with the Spring XML configuration, no need to specify Jackson separately ( I already specified and associated it in the Spring XML configuration). This

Re: WadlGenerator - Bean validation support for complex types?

2016-08-18 Thread J. Fiala
Hi, If I'm using BeanValidation-annotations in my model classes, they are not picked up by the WADLGenerator and so are lost if I do code first and I have to look them up and model them in the WADL manually. At least @NotNull support would be nice, because this is really easy to do (see the

Re: CXF3 - Annotations in the interface are not parsed

2016-08-18 Thread J. Fiala
Hi, No, that has nothing to do with Swagger, I'm only working with the generated WADL here. The @Path-annotation on the implementing class can be removed, here picking up from the interface works correctly. However, if I remove @GET/@Path/@Consumes/@Produces from the method in the

Re: CXF3 - Annotations in the interface are not parsed

2016-08-18 Thread Sergey Beryozkin
Can you prototype here an interface and an impl class please thanks, Sergey On 18/08/16 12:11, J. Fiala wrote: Hi, No, that has nothing to do with Swagger, I'm only working with the generated WADL here. The @Path-annotation on the implementing class can be removed, here picking up from the

Re: CXF3 WadlGenerator @Description generates doc-tag

2016-08-18 Thread J. Fiala
Hi, Thank you for the hint, looked it up & yes that's fine (still schema editors mark it as an error). Best regards, Johannes Am 18.08.2016 um 00:34 schrieb Sergey Beryozkin: On 17/08/16 18:28, J. Fiala wrote: The WadlGenerator currently generates @Description comments as . These are

Re: CXF3 - Annotations in the interface are not parsed

2016-08-18 Thread J. Fiala
Sure: Interface (generated using wadl2java): @Path("/helloWorld") public interface HelloWorldResource { @GET @Produces("application/json") @Path("/find") String sayHello(@QueryParam("name") String name); } // @Path is read from the interface correctly public class

JAXRS - method consumes application/xml + application/json

2016-08-18 Thread J. Fiala
Hi, I have a WADL resource which should accept both xml + json: required="true"/> element="mytypes:MyRequest"/> element="mytypes:MyRequest"/>

Re: CXF3 - Annotations in the interface are not parsed

2016-08-18 Thread Sergey Beryozkin
It's invalid per the JAX-RS spec - see its annotation inheritance section, you can not have JAX-RS annotations spread over the interface and impl, just keep them all on the interface Cheers, Sergey On 18/08/16 14:18, J. Fiala wrote: Sure: Interface (generated using wadl2java):

CXF Exception-Handling: error message is not included in Response

2016-08-18 Thread J. Fiala
Hi, I just came across the Exception handling behaviour of CXF 3 and was wondering if this is intended: 1.) Passing simply a string as message results in message is not included in the response. throw new InternalServerErrorException("message"); ==> will return only Status: 500 Status :

CXF returns 404 + HTML for non-existing service-url

2016-08-18 Thread J. Fiala
Hi, A minor detail: If the service URL doesn't exist inside the CXF application, CXF will return 404 + HTML, although Json was sent + accepted: WebClient.client(api) .type(MediaType.APPLICATION_JSON_TYPE) .accept(MediaType.APPLICATION_JSON_TYPE); Result: No service

Re: JAXRS - method consumes application/xml + application/json

2016-08-18 Thread Sergey Beryozkin
Thanks, yes _ just forwarded an explanation Sergey On 18/08/16 16:43, J. Fiala wrote: Sorry I switched to JacksonXMLProvider (I thought XML is handled behind the scenes as fallback), but I receive the same result: WARNING: javax.xml.bind.MarshalException - with linked exception:

Re: JAXRS - method consumes application/xml + application/json

2016-08-18 Thread Sergey Beryozkin
Hey, I'm happy trying to help but let me ask you in return, do you think 'JacksonJsonProvider' can handle XML ? Cheers, Sergey On 18/08/16 14:54, J. Fiala wrote: Hi, I have a WADL resource which should accept both xml + json:

Re: JAXRS - method consumes application/xml + application/json

2016-08-18 Thread Sergey Beryozkin
That said, I looked at the exception below, and I know how to fix it. So yes, Jackson is obviously not used and what happens now is that a default JAXB provider is asked to handle it - but it does not know what the root element of XmlType-only annotated bean is - it does not wrap

Re: JAXRS How to define/use Multiparts with Json + xs:base64Binary

2016-08-18 Thread Sergey Beryozkin
WADL is currently underspecified with respect to handling complex multiparts, that is why MultipartBody is generated. In some simple cases @Multipart parameters can be generated to repesent simple multiparts, or have InputStream as a parameter Sergey On 18/08/16 15:21, J. Fiala wrote: p.s. a

Re: CXF3 - Annotations in the interface are not parsed

2016-08-18 Thread Sergey Beryozkin
Hi On 18/08/16 16:02, J. Fiala wrote: Sergey, Sorry I found the cause - one of the parameters were still annotated. So if the method/parameters are all clean, it works as expected (it's also possible to have a mix - any clean or fully annotated method at the implementing class works as

Re: Page with list of all services

2016-08-18 Thread Sergey Beryozkin
Hi Max I updated CXF 3.1.7 to show the available endpoints if they exist, previously, if you only used either JAXWS or JAXRS you could get for example: SOAP endpoints: (empty space) REST endpoints: some endpoints listed here or SOAP endpoints: some endpoints listed here REST endpoints:

Re: JAXRS - method consumes application/xml + application/json

2016-08-18 Thread J. Fiala
Sorry I switched to JacksonXMLProvider (I thought XML is handled behind the scenes as fallback), but I receive the same result: WARNING: javax.xml.bind.MarshalException - with linked exception: [com.sun.istack.internal.SAXException2: unable to marshal type "at.hello.MyRequest" as an element

Re: JAXRS How to define/use Multiparts with Json + xs:base64Binary

2016-08-18 Thread J. Fiala
Sergey, Do you maybe have any example of a WADL including such multiparts which do not only generate as MultipartBody? Best regards, Johannes Am 18.08.2016 um 17:05 schrieb Sergey Beryozkin: WADL is currently underspecified with respect to handling complex multiparts, that is why

Re: JAXRS How to define/use Multiparts with Json + xs:base64Binary

2016-08-18 Thread Sergey Beryozkin
On 18/08/16 16:51, J. Fiala wrote: Sergey, Do you maybe have any example of a WADL including such multiparts which do not only generate as MultipartBody? I've only worked with my colleague on supporting wadl-to-java to do a bit better representation of simple multipart payloads and to be

Re: CXF3 - Annotations in the interface are not parsed

2016-08-18 Thread v . virvilis
I can't really help because I have a spring configuration xml for SOAP services not REST. In case you can draw any parallels or just rule out this path of debugging here how it looks like: serviceClass="com.biovista.lib.ws.iface.BEAService"