cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruben Lara (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-3278) Invalid Enum passed in WebMethod results to a null object
Date Fri, 15 May 2015 14:02:00 GMT

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

Ruben Lara commented on CXF-3278:
---------------------------------

Hi Daniel,

I'm facing the same problem. What do you mean with "you would need to turn on the schema validation"?
I already set the validation on

@SchemaValidation(type = SchemaValidationType.IN)
public class CarServiceEndpointImpl implements Car {
...
}
I'm working with spring boot and configuring cxf with java config. Everything but the enum
validation is working perfectly.

    @Bean
    public Endpoint carWebService(final Bus cxfBus, final LoggingInInterceptor inInterceptor,
final LoggingOutInterceptor outInterceptor,
	    final BasicAuthAuthorizationInterceptor authInInterceptor) {
	final Endpoint endpoint = new EndpointImpl(cxfBus, carServiceEnpointImpl());
	((EndpointImpl) endpoint).setAddress(carServiceName);
	
	((EndpointImpl) endpoint).getInInterceptors().add(authInInterceptor);
	((EndpointImpl) endpoint).getInInterceptors().add(inInterceptor);
	((EndpointImpl) endpoint).getOutInterceptors().add(outInterceptor);

	((EndpointImpl) endpoint).publish();
	return endpoint;
    }

    @Bean
    public Costs carServiceEnpointImpl() {
	return new CarServiceEnpointImpl();
    }

Or is there another setting I'm missing in my project?

> Invalid Enum passed in WebMethod results to a null object
> ---------------------------------------------------------
>
>                 Key: CXF-3278
>                 URL: https://issues.apache.org/jira/browse/CXF-3278
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>            Reporter: Ioannis Mavroukakis
>             Fix For: Invalid
>
>
> Given the following method
> {code}
>  @WebMethod
>     public BaseResponse removeDepositLimits(
>             @WebParam( name = SERVICE_AUTH ) @XmlElement( required = true ) final Authorisation
auth ,
>             @WebParam( name = TOKEN ) @XmlElement( required = true ) final String token
,
>             @WebParam( name = "timeFrame" ) @XmlElement( required = true ) final DepositLimit.TimeFrame
timeFrame )
> {code}
> when timeFrame is a value that's not in the TimeFrame enum, timeFrame is set to null,
this should return an error to the invoker instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message