[jira] [Issue Comment Deleted] (CXF-6843) http 406 not acceptable should be returned if query parameter value can't be converted

2016-03-26 Thread Sergey Beryozkin (JIRA)

 [ 
https://issues.apache.org/jira/browse/CXF-6843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Beryozkin updated CXF-6843:
--
Comment: was deleted

(was: Section 3.2:
"if the field or property is annotated with
@MatrixParam , @QueryParam or @PathParam then an implementation MUST generate 
an instance of
1
Due to limitations of the built-in valueOf method that is part of all Java 
enumerations, a fromString method is often
defined by the enum writers. Consequently, the fromString method is preferred 
when available.
12
JAX-RS
May 22, 20133.3. Resource Methods
NotFoundException (404 status)")

> http 406 not acceptable should be returned if query parameter value can't be 
> converted 
> ---
>
> Key: CXF-6843
> URL: https://issues.apache.org/jira/browse/CXF-6843
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.5
>Reporter: Jim Ma
> Fix For: 3.2.0, 3.1.6
>
>
> For query parameter conversion exception, it  should return 406 http status 
> in response.



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


[jira] [Commented] (CXF-6843) http 406 not acceptable should be returned if query parameter value can't be converted

2016-03-26 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-6843:
---

Section 3.2:
"if the field or property is annotated with
@MatrixParam , @QueryParam or @PathParam then an implementation MUST generate 
an instance of
1
Due to limitations of the built-in valueOf method that is part of all Java 
enumerations, a fromString method is often
defined by the enum writers. Consequently, the fromString method is preferred 
when available.
12
JAX-RS
May 22, 20133.3. Resource Methods
NotFoundException (404 status)"

> http 406 not acceptable should be returned if query parameter value can't be 
> converted 
> ---
>
> Key: CXF-6843
> URL: https://issues.apache.org/jira/browse/CXF-6843
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.5
>Reporter: Jim Ma
> Fix For: 3.2.0, 3.1.6
>
>
> For query parameter conversion exception, it  should return 406 http status 
> in response.



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


[jira] [Commented] (CXF-6843) http 406 not acceptable should be returned if query parameter value can't be converted

2016-03-26 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-6843:
---

Section 3.2: "if the field or property is annotated with
@MatrixParam , @QueryParam or @PathParam then an implementation MUST generate 
an instance of
NotFoundException (404 status) that wraps the thrown exception and no entity"

> http 406 not acceptable should be returned if query parameter value can't be 
> converted 
> ---
>
> Key: CXF-6843
> URL: https://issues.apache.org/jira/browse/CXF-6843
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.5
>Reporter: Jim Ma
> Fix For: 3.2.0, 3.1.6
>
>
> For query parameter conversion exception, it  should return 406 http status 
> in response.



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


[jira] [Resolved] (CXF-6843) http 406 not acceptable should be returned if query parameter value can't be converted

2016-03-26 Thread Sergey Beryozkin (JIRA)

 [ 
https://issues.apache.org/jira/browse/CXF-6843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Beryozkin resolved CXF-6843.
---
Resolution: Won't Fix
  Assignee: Sergey Beryozkin

Jim, please have the tests failures supported by the specification before 
changing the code

> http 406 not acceptable should be returned if query parameter value can't be 
> converted 
> ---
>
> Key: CXF-6843
> URL: https://issues.apache.org/jira/browse/CXF-6843
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.5
>Reporter: Jim Ma
>Assignee: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.6
>
>
> For query parameter conversion exception, it  should return 406 http status 
> in response.



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


[jira] [Comment Edited] (CXF-6843) http 406 not acceptable should be returned if query parameter value can't be converted

2016-03-26 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin edited comment on CXF-6843 at 3/26/16 12:59 PM:
-

Jim, please have the fixes for test failures supported by the specification 
text before changing the code


was (Author: sergey_beryozkin):
Jim, please have the tests failures supported by the specification before 
changing the code

> http 406 not acceptable should be returned if query parameter value can't be 
> converted 
> ---
>
> Key: CXF-6843
> URL: https://issues.apache.org/jira/browse/CXF-6843
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.5
>Reporter: Jim Ma
>Assignee: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.6
>
>
> For query parameter conversion exception, it  should return 406 http status 
> in response.



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


[jira] [Commented] (CXF-6837) Add cache for MessageBodyReader/Writer

2016-03-26 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-6837:
---

Neal, selection of the providers is probably one of the most tricky/sensitive 
parts of JAX-RS.
I'd like to suggest that you complete the patch work such that indeed tests do 
pass. 
Look at the failing test, understand why it works without your changes, then 
see why applying your changes causes the test to fail.
As I said, the fact MediaType matches is not enough, the provider is 
isReadable/isWriteable must return true. Therefore the key should be the 
composite one, and the provider should only be added to the cache if its 
isReadable/isWriteable returns true. The caching should be optional too, but I 
can take care if it later on.

Thanks

> Add cache for MessageBodyReader/Writer
> --
>
> Key: CXF-6837
> URL: https://issues.apache.org/jira/browse/CXF-6837
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS
>Affects Versions: 3.1.5, 3.0.8
> Environment: windows
>Reporter: Neal Hu
> Fix For: 3.2.0
>
> Attachments: ProviderCache.java, ProviderFactory.patch
>
>
> CXF selects the msgBodyReader/writer in the reader/writer list for every 
> request, which has big impact to the performance. Jersey also has the cache 
> in 
> org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(...).
>  I have tried add the cache for CXF in ProviderFactory and been proved that 
> it has improved 7-8% for json requests in JMeter. Please let me know if you'd 
> like me to add the enhancement for CXF. Thanks. 
> http://cxf.547215.n5.nabble.com/MessageBodyReader-Writer-cache-td5767091.html



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


[jira] [Comment Edited] (CXF-6837) Add cache for MessageBodyReader/Writer

2016-03-26 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin edited comment on CXF-6837 at 3/26/16 1:07 PM:


Neal, selection of the providers is probably one of the most sensitive parts of 
JAX-RS.
I'd like to suggest that you complete the patch work such that indeed tests do 
pass. 
Look at the failing test, understand why it works without your changes, then 
see why applying your changes causes the test to fail.
As I said, the fact MediaType matches is not enough, the provider 
isReadable/isWriteable must return true. Therefore the key should be the 
composite one, and the provider should only be added to the cache if its 
isReadable/isWriteable returns true. The caching should be optional too, but I 
can take care of it later on.

Thanks


was (Author: sergey_beryozkin):
Neal, selection of the providers is probably one of the most sensitive parts of 
JAX-RS.
I'd like to suggest that you complete the patch work such that indeed tests do 
pass. 
Look at the failing test, understand why it works without your changes, then 
see why applying your changes causes the test to fail.
As I said, the fact MediaType matches is not enough, the provider is 
isReadable/isWriteable must return true. Therefore the key should be the 
composite one, and the provider should only be added to the cache if its 
isReadable/isWriteable returns true. The caching should be optional too, but I 
can take care if it later on.

Thanks

> Add cache for MessageBodyReader/Writer
> --
>
> Key: CXF-6837
> URL: https://issues.apache.org/jira/browse/CXF-6837
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS
>Affects Versions: 3.1.5, 3.0.8
> Environment: windows
>Reporter: Neal Hu
> Fix For: 3.2.0
>
> Attachments: ProviderCache.java, ProviderFactory.patch
>
>
> CXF selects the msgBodyReader/writer in the reader/writer list for every 
> request, which has big impact to the performance. Jersey also has the cache 
> in 
> org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(...).
>  I have tried add the cache for CXF in ProviderFactory and been proved that 
> it has improved 7-8% for json requests in JMeter. Please let me know if you'd 
> like me to add the enhancement for CXF. Thanks. 
> http://cxf.547215.n5.nabble.com/MessageBodyReader-Writer-cache-td5767091.html



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


[jira] [Comment Edited] (CXF-6837) Add cache for MessageBodyReader/Writer

2016-03-26 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin edited comment on CXF-6837 at 3/26/16 1:06 PM:


Neal, selection of the providers is probably one of the most sensitive parts of 
JAX-RS.
I'd like to suggest that you complete the patch work such that indeed tests do 
pass. 
Look at the failing test, understand why it works without your changes, then 
see why applying your changes causes the test to fail.
As I said, the fact MediaType matches is not enough, the provider is 
isReadable/isWriteable must return true. Therefore the key should be the 
composite one, and the provider should only be added to the cache if its 
isReadable/isWriteable returns true. The caching should be optional too, but I 
can take care if it later on.

Thanks


was (Author: sergey_beryozkin):
Neal, selection of the providers is probably one of the most tricky/sensitive 
parts of JAX-RS.
I'd like to suggest that you complete the patch work such that indeed tests do 
pass. 
Look at the failing test, understand why it works without your changes, then 
see why applying your changes causes the test to fail.
As I said, the fact MediaType matches is not enough, the provider is 
isReadable/isWriteable must return true. Therefore the key should be the 
composite one, and the provider should only be added to the cache if its 
isReadable/isWriteable returns true. The caching should be optional too, but I 
can take care if it later on.

Thanks

> Add cache for MessageBodyReader/Writer
> --
>
> Key: CXF-6837
> URL: https://issues.apache.org/jira/browse/CXF-6837
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS
>Affects Versions: 3.1.5, 3.0.8
> Environment: windows
>Reporter: Neal Hu
> Fix For: 3.2.0
>
> Attachments: ProviderCache.java, ProviderFactory.patch
>
>
> CXF selects the msgBodyReader/writer in the reader/writer list for every 
> request, which has big impact to the performance. Jersey also has the cache 
> in 
> org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(...).
>  I have tried add the cache for CXF in ProviderFactory and been proved that 
> it has improved 7-8% for json requests in JMeter. Please let me know if you'd 
> like me to add the enhancement for CXF. Thanks. 
> http://cxf.547215.n5.nabble.com/MessageBodyReader-Writer-cache-td5767091.html



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


[jira] [Commented] (CXF-6842) Unwrap exception nested with WebApplicationException

2016-03-26 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-6842:
---

Hi Jim, I see nothing in the section 3.3.4 that the unmapped exceptions should 
have the causes checked for WebApplicationException (have a look please), looks 
like it is RI specific, but the change seems all right, the systests are OK.
I did a minor update to make sure that if the response has CT then it is made 
immediately available to the exchange
Thanks

> Unwrap exception nested with WebApplicationException
> 
>
> Key: CXF-6842
> URL: https://issues.apache.org/jira/browse/CXF-6842
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.5
>Reporter: Jim Ma
>Assignee: Jim Ma
> Fix For: 3.2.0, 3.1.6
>
>
> In a resource class, if an exception is thrown which is nested with 
> WebApplicationException, cxf can try to get the cause and create response 
> from WebApplicationException



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


[jira] [Commented] (CXF-6837) Add cache for MessageBodyReader/Writer

2016-03-26 Thread Neal Hu (JIRA)

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

Neal Hu commented on CXF-6837:
--

Sergey, the isReadable/isWritable can not be the key as the result of the 
isReadable/isWritable will be changed during caching when the provider is from 
custom. We cache  all reader/writer candidates who matches the mediaType and 
Java type. For the failed system test, I have not found the RS resource for the 
tests. Will look next week. Any help will be appreciated!
Thanks.
Neal

> Add cache for MessageBodyReader/Writer
> --
>
> Key: CXF-6837
> URL: https://issues.apache.org/jira/browse/CXF-6837
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS
>Affects Versions: 3.1.5, 3.0.8
> Environment: windows
>Reporter: Neal Hu
> Fix For: 3.2.0
>
> Attachments: ProviderCache.java, ProviderFactory.patch
>
>
> CXF selects the msgBodyReader/writer in the reader/writer list for every 
> request, which has big impact to the performance. Jersey also has the cache 
> in 
> org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(...).
>  I have tried add the cache for CXF in ProviderFactory and been proved that 
> it has improved 7-8% for json requests in JMeter. Please let me know if you'd 
> like me to add the enhancement for CXF. Thanks. 
> http://cxf.547215.n5.nabble.com/MessageBodyReader-Writer-cache-td5767091.html



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


[jira] [Comment Edited] (CXF-6837) Add cache for MessageBodyReader/Writer

2016-03-26 Thread Neal Hu (JIRA)

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

Neal Hu edited comment on CXF-6837 at 3/26/16 1:26 PM:
---

Sergey, the isReadable/isWritable can not be the key as the result of the 
isReadable/isWritable will be changed during caching when the provider is from 
custom. We cache  all reader/writer candidates who matches the mediaType and 
Java type. When get from cache, iterate all candidates's isReadable/isWritable 
until return true. For the failed system test, I have not found the RS resource 
for the tests. Will look next week. Any help will be appreciated!
Thanks.
Neal


was (Author: nbq...@163.com):
Sergey, the isReadable/isWritable can not be the key as the result of the 
isReadable/isWritable will be changed during caching when the provider is from 
custom. We cache  all reader/writer candidates who matches the mediaType and 
Java type. For the failed system test, I have not found the RS resource for the 
tests. Will look next week. Any help will be appreciated!
Thanks.
Neal

> Add cache for MessageBodyReader/Writer
> --
>
> Key: CXF-6837
> URL: https://issues.apache.org/jira/browse/CXF-6837
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS
>Affects Versions: 3.1.5, 3.0.8
> Environment: windows
>Reporter: Neal Hu
> Fix For: 3.2.0
>
> Attachments: ProviderCache.java, ProviderFactory.patch
>
>
> CXF selects the msgBodyReader/writer in the reader/writer list for every 
> request, which has big impact to the performance. Jersey also has the cache 
> in 
> org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(...).
>  I have tried add the cache for CXF in ProviderFactory and been proved that 
> it has improved 7-8% for json requests in JMeter. Please let me know if you'd 
> like me to add the enhancement for CXF. Thanks. 
> http://cxf.547215.n5.nabble.com/MessageBodyReader-Writer-cache-td5767091.html



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


[jira] [Created] (CXF-6844) Cannot assign 'part name' in SOAP WSDL for document-wrapped style

2016-03-26 Thread Andrey Nikolov (JIRA)
Andrey Nikolov created CXF-6844:
---

 Summary: Cannot assign 'part name' in SOAP WSDL for 
document-wrapped style
 Key: CXF-6844
 URL: https://issues.apache.org/jira/browse/CXF-6844
 Project: CXF
  Issue Type: Bug
  Components: Soap Binding, WS-* Components
Affects Versions: 3.1.5
 Environment: Java 1.8.0 Update 74, Mac OSX 10.11.4
Reporter: Andrey Nikolov
Priority: Minor


I am developing a code-first SOAP service WSDL of style Document-Literal 
(Wrapped).

Cannot assign proper message part names using partName argument in @WebParam 
and @WebResult annotations since the resulting WSDL always defaults to 
.

The assignment works for header message parts, as well as for Document-Literal 
(Bare) WSDL style.



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