[jira] [Updated] (CXF-7495) Set EXPAND_XOP_INCLUDE for WSS4JOutInterceptor to 'false' in older version

2017-09-05 Thread Marco Tenti (JIRA)

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

Marco Tenti updated CXF-7495:
-
Description: 
I have a soap service . it support the mtom but not the xop include annotation 
, so it refused my request:

http://schemas.xmlsoap.org/soap/envelope/";>
  http://schemas.xmlsoap.org/soap/envelope/"/>
  
http://sip.receive.core.iris.eng.it"; 
xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
  
?
?
SHA-256
HEX

9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
  
  

  http://www.w3.org/2004/08/xop/include"; 
href="cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4-1@cxf.apache.org"/>

  

  



how can i set my request to this:

http://schemas.xmlsoap.org/soap/envelope/";>
  http://schemas.xmlsoap.org/soap/envelope/"/>
  
http://sip.receive.core.iris.eng.it"; 
xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
  
?
?
SHA-256
HEX

9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
  
  

cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4

  

  



how can obtain this result? in more recent version there is a paramter for this 
https://ws.apache.org/wss4j/apidocs/org/apache/wss4j/common/ConfigurationConstants.html#EXPAND_XOP_INCLUDE


{code:java}
  public static  T buildServerWsdl(String endpointWsdl,final String 
username,final String password,
final Class serviceClass,boolean 
ignoreSSLCertificate,boolean useAuthorizationBasic,Map 
supplierheaders) throws NoSuchAlgorithmException, KeyManagementException, 
MalformedURLException{

//Controllo wsdlurl
URL wsdlURL;
java.io.File wsdlFile = new java.io.File(endpointWsdl);

if (wsdlFile.exists()) {
wsdlURL = wsdlFile.toURI().toURL();
} else {
wsdlURL = new URL(endpointWsdl);
}
System.out.println(wsdlURL);


JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

factory.setServiceClass(serviceClass);  
factory.setAddress(endpointWsdl);
//factory.setServiceClass(javax.xml.ws.Service.class);
//factory.setAddress("http://server.service.core.eng.it/";);
//factory.setServiceBean(implementor);
//Abilita il loggin in ingresco ed uscita dei messaggi soap!
factory.getInInterceptors().add(new LoggingInInterceptor(4*1024));
factory.getOutInterceptors().add(new LoggingOutInterceptor(4*1024));
//factory.getInInterceptors().add(new LoggingInInterceptor());
//factory.getOutInterceptors().add(new LoggingOutInterceptor());

//  LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor();
//  loggingInInterceptor.setPrettyLogging(true);
//  LoggingOutInterceptor loggingOutInterceptor = new 
LoggingOutInterceptor();
//  loggingOutInterceptor.setPrettyLogging(true);
//  factory.getInInterceptors().add(loggingInInterceptor);
//  factory.getOutInterceptors().add(loggingOutInterceptor);

@SuppressWarnings("unchecked")
T server = (T) factory.create();

// The BindingProvider interface provides access to the protocol 
binding and
// to the associated context objects for request and response message 
processing.
BindingProvider prov = (BindingProvider)server;
Binding binding = prov.getBinding(); 
((SOAPBinding)binding).setMTOMEnabled(true);

//Add handlers to the binding jaxb 
java.util.List handlers = 
binding.getHandlerChain();
handlers.add(new JaxWsLoggingHandler());
binding.setHandlerChain(handlers);

Map req_ctx = prov.getRequestContext();
req_ctx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointWsdl);
Map> headers = new HashMap>();

if(username != null && password != null){   
headers.put("Username", Arrays.asList(username));
headers.put("Password", Arrays.asList(password));
//headers.put("Content-Type", Arrays.asList("text/xml")); 
//necessario specificare se si usa schema-core invece di XmlSchema

prov.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, 
username);
prov.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, 
password);

//FILE TO ELEMENT
//InputStream clientPolicy = 
serviceClass.getResourceAsStream("webservices-client.xml");
// DocumentBuilderFactory builderFactory = 
DocumentBuilderFactory.newInstance();
// builderFactory.setValidating(false);
// builderFactory.setNamespaceAware(true);
// builderFactory.setIgnoringElem

[jira] [Updated] (CXF-7495) Set EXPAND_XOP_INCLUDE for WSS4JOutInterceptor to 'false' in older version

2017-09-05 Thread Marco Tenti (JIRA)

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

Marco Tenti updated CXF-7495:
-
Description: 
I have a soap service . it support the mtom but not the xop include annotation 
, so it refused my request:

http://schemas.xmlsoap.org/soap/envelope/";>
  http://schemas.xmlsoap.org/soap/envelope/"/>
  
http://sip.receive.core.iris.eng.it"; 
xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
  
?
?
SHA-256
HEX

9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
  
  

  http://www.w3.org/2004/08/xop/include"; 
href="cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4-1@cxf.apache.org"/>

  

  



how can i set my request to this:

http://schemas.xmlsoap.org/soap/envelope/";>
  http://schemas.xmlsoap.org/soap/envelope/"/>
  
http://sip.receive.core.iris.eng.it"; 
xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
  
?
?
SHA-256
HEX

9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
  
  

cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4

  

  



how can obtain this result? in more recent version there is a paramter for this 
https://ws.apache.org/wss4j/apidocs/org/apache/wss4j/common/ConfigurationConstants.html#EXPAND_XOP_INCLUDE


{code:java}
  public static  T buildServerWsdl(String endpointWsdl,final String 
username,final String password,
final Class serviceClass,boolean 
ignoreSSLCertificate,boolean useAuthorizationBasic,Map 
supplierheaders) throws NoSuchAlgorithmException, KeyManagementException, 
MalformedURLException{

//Controllo wsdlurl
URL wsdlURL;
java.io.File wsdlFile = new java.io.File(endpointWsdl);

if (wsdlFile.exists()) {
wsdlURL = wsdlFile.toURI().toURL();
} else {
wsdlURL = new URL(endpointWsdl);
}
System.out.println(wsdlURL);


JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

factory.setServiceClass(serviceClass);  
factory.setAddress(endpointWsdl);
//factory.setServiceClass(javax.xml.ws.Service.class);
//factory.setAddress("http://server.service.core.eng.it/";);
//factory.setServiceBean(implementor);
//Abilita il loggin in ingresco ed uscita dei messaggi soap!
factory.getInInterceptors().add(new LoggingInInterceptor(4*1024));
factory.getOutInterceptors().add(new LoggingOutInterceptor(4*1024));
//factory.getInInterceptors().add(new LoggingInInterceptor());
//factory.getOutInterceptors().add(new LoggingOutInterceptor());

//  LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor();
//  loggingInInterceptor.setPrettyLogging(true);
//  LoggingOutInterceptor loggingOutInterceptor = new 
LoggingOutInterceptor();
//  loggingOutInterceptor.setPrettyLogging(true);
//  factory.getInInterceptors().add(loggingInInterceptor);
//  factory.getOutInterceptors().add(loggingOutInterceptor);

@SuppressWarnings("unchecked")
T server = (T) factory.create();

// The BindingProvider interface provides access to the protocol 
binding and
// to the associated context objects for request and response message 
processing.
BindingProvider prov = (BindingProvider)server;
Binding binding = prov.getBinding(); 
((SOAPBinding)binding).setMTOMEnabled(true);

//Add handlers to the binding jaxb 
java.util.List handlers = 
binding.getHandlerChain();
handlers.add(new JaxWsLoggingHandler());
binding.setHandlerChain(handlers);

Map req_ctx = prov.getRequestContext();
req_ctx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointWsdl);
Map> headers = new HashMap>();

if(username != null && password != null){   
headers.put("Username", Arrays.asList(username));
headers.put("Password", Arrays.asList(password));
//headers.put("Content-Type", Arrays.asList("text/xml")); 
//necessario specificare se si usa schema-core invece di XmlSchema

prov.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, 
username);
prov.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, 
password);

//FILE TO ELEMENT
//InputStream clientPolicy = 
serviceClass.getResourceAsStream("webservices-client.xml");
// DocumentBuilderFactory builderFactory = 
DocumentBuilderFactory.newInstance();
// builderFactory.setValidating(false);
// builderFactory.setNamespaceAware(true);
// builderFactory.setIgnoringElem

[jira] [Updated] (CXF-7495) Set EXPAND_XOP_INCLUDE for WSS4JOutInterceptor to 'false' in older version

2017-09-05 Thread Marco Tenti (JIRA)

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

Marco Tenti updated CXF-7495:
-
Description: 
I have a soap service . it support the mtom but not the xop include annotation 
, so it refused my request:

http://schemas.xmlsoap.org/soap/envelope/";>
  http://schemas.xmlsoap.org/soap/envelope/"/>
  
http://sip.receive.core.iris.eng.it"; 
xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
  
?
?
SHA-256
HEX

9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
  
  

  http://www.w3.org/2004/08/xop/include"; 
href="cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4-1@cxf.apache.org"/>

  

  



how can i set my request to this:

http://schemas.xmlsoap.org/soap/envelope/";>
  http://schemas.xmlsoap.org/soap/envelope/"/>
  
http://sip.receive.core.iris.eng.it"; 
xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
  
?
?
SHA-256
HEX

9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
  
  

cid:940325888173

  

  


*so in the end i just want replace the:
 http://www.w3.org/2004/08/xop/include"; 
href="cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4-1@cxf.apache.org"/>
with
cid:940325888173*


how can obtain this result? in more recent version there is a paramter for this 
https://ws.apache.org/wss4j/apidocs/org/apache/wss4j/common/ConfigurationConstants.html#EXPAND_XOP_INCLUDE

Here the full code java i try to make it work:


{code:java}
  public static  T buildServerWsdl(String endpointWsdl,final String 
username,final String password,
final Class serviceClass,boolean 
ignoreSSLCertificate,boolean useAuthorizationBasic,Map 
supplierheaders) throws NoSuchAlgorithmException, KeyManagementException, 
MalformedURLException{

//Controllo wsdlurl
URL wsdlURL;
java.io.File wsdlFile = new java.io.File(endpointWsdl);

if (wsdlFile.exists()) {
wsdlURL = wsdlFile.toURI().toURL();
} else {
wsdlURL = new URL(endpointWsdl);
}
System.out.println(wsdlURL);


JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

factory.setServiceClass(serviceClass);  
factory.setAddress(endpointWsdl);
//factory.setServiceClass(javax.xml.ws.Service.class);
//factory.setAddress("http://server.service.core.eng.it/";);
//factory.setServiceBean(implementor);
//Abilita il loggin in ingresco ed uscita dei messaggi soap!
factory.getInInterceptors().add(new LoggingInInterceptor(4*1024));
factory.getOutInterceptors().add(new LoggingOutInterceptor(4*1024));
//factory.getInInterceptors().add(new LoggingInInterceptor());
//factory.getOutInterceptors().add(new LoggingOutInterceptor());

//  LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor();
//  loggingInInterceptor.setPrettyLogging(true);
//  LoggingOutInterceptor loggingOutInterceptor = new 
LoggingOutInterceptor();
//  loggingOutInterceptor.setPrettyLogging(true);
//  factory.getInInterceptors().add(loggingInInterceptor);
//  factory.getOutInterceptors().add(loggingOutInterceptor);

@SuppressWarnings("unchecked")
T server = (T) factory.create();

// The BindingProvider interface provides access to the protocol 
binding and
// to the associated context objects for request and response message 
processing.
BindingProvider prov = (BindingProvider)server;
Binding binding = prov.getBinding(); 
((SOAPBinding)binding).setMTOMEnabled(true);

//Add handlers to the binding jaxb 
java.util.List handlers = 
binding.getHandlerChain();
handlers.add(new JaxWsLoggingHandler());
binding.setHandlerChain(handlers);

Map req_ctx = prov.getRequestContext();
req_ctx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointWsdl);
Map> headers = new HashMap>();

if(username != null && password != null){   
headers.put("Username", Arrays.asList(username));
headers.put("Password", Arrays.asList(password));
//headers.put("Content-Type", Arrays.asList("text/xml")); 
//necessario specificare se si usa schema-core invece di XmlSchema

prov.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, 
username);
prov.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, 
password);

//FILE TO ELEMENT
//InputStream clientPolicy = 
serviceClass.getResourceAsStream("webservices-client.xml");
// DocumentBuilderFactory builderFact

[jira] [Commented] (CXF-7495) Set EXPAND_XOP_INCLUDE for WSS4JOutInterceptor to 'false' in older version

2017-09-05 Thread Marco Tenti (JIRA)

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

Marco Tenti commented on CXF-7495:
--

Hi ty for the response Colm , you can read the version i used on the "Affects 
Version/s" tag of this issue , the 2.2.12 e the 3.0.4 (so 2.2.X and 3.0.X) , 
now i have inserted the full code java i try to use, sorry about that i was 
sure to have put that too like in the external issue on stackoverflow.
I tried with your suggestion but it's seems not be the solution i'm looking .



> Set EXPAND_XOP_INCLUDE for WSS4JOutInterceptor to 'false' in older version
> --
>
> Key: CXF-7495
> URL: https://issues.apache.org/jira/browse/CXF-7495
> Project: CXF
>  Issue Type: Task
>  Components: JAXB Databinding, Soap Binding
>Affects Versions: 2.2.12, 3.0.4
> Environment: Windows 10, java 1.8.0_131, Eclipse IE
>Reporter: Marco Tenti
>Priority: Minor
>  Labels: cxf, jaws, mtom, wss4j-configuration
>
> I have a soap service . it support the mtom but not the xop include 
> annotation , so it refused my request:
>  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/>
>   
> http://sip.receive.core.iris.eng.it"; 
> xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
>   
> ?
> ?
> SHA-256
> HEX
> 
> 9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
>   
>   
> 
>   http://www.w3.org/2004/08/xop/include"; 
> href="cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4-1@cxf.apache.org"/>
> 
>   
> 
>   
> 
> how can i set my request to this:
>  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/>
>   
> http://sip.receive.core.iris.eng.it"; 
> xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
>   
> ?
> ?
> SHA-256
> HEX
> 
> 9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
>   
>   
> 
> cid:940325888173
> 
>   
> 
>   
> 
> *so in the end i just want replace the:
>  http://www.w3.org/2004/08/xop/include"; 
> href="cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4-1@cxf.apache.org"/>
> with
> cid:940325888173*
> how can obtain this result? in more recent version there is a paramter for 
> this 
> https://ws.apache.org/wss4j/apidocs/org/apache/wss4j/common/ConfigurationConstants.html#EXPAND_XOP_INCLUDE
> Here the full code java i try to make it work:
> {code:java}
>   public static  T buildServerWsdl(String endpointWsdl,final String 
> username,final String password,
>   final Class serviceClass,boolean 
> ignoreSSLCertificate,boolean useAuthorizationBasic,Map 
> supplierheaders) throws NoSuchAlgorithmException, KeyManagementException, 
> MalformedURLException{
>   //Controllo wsdlurl
>   URL wsdlURL;
> java.io.File wsdlFile = new java.io.File(endpointWsdl);
> if (wsdlFile.exists()) {
> wsdlURL = wsdlFile.toURI().toURL();
> } else {
> wsdlURL = new URL(endpointWsdl);
> }
> System.out.println(wsdlURL);
>   
>   
>   JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
> 
>   factory.setServiceClass(serviceClass);  
>   factory.setAddress(endpointWsdl);
>   //factory.setServiceClass(javax.xml.ws.Service.class);
>   //factory.setAddress("http://server.service.core.eng.it/";);
>   //factory.setServiceBean(implementor);
>   //Abilita il loggin in ingresco ed uscita dei messaggi soap!
>   factory.getInInterceptors().add(new LoggingInInterceptor(4*1024));
>   factory.getOutInterceptors().add(new LoggingOutInterceptor(4*1024));
>   //factory.getInInterceptors().add(new LoggingInInterceptor());
>   //factory.getOutInterceptors().add(new LoggingOutInterceptor());
>   
> //LoggingInInterceptor loggingInInterceptor = new 
> LoggingInInterceptor();
> //loggingInInterceptor.setPrettyLogging(true);
> //LoggingOutInterceptor loggingOutInterceptor = new 
> LoggingOutInterceptor();
> //loggingOutInterceptor.setPrettyLogging(true);
> //factory.getInInterceptors().add(loggingInInterceptor);
> //factory.getOutInterceptors().add(loggingOutInterceptor);
>   @SuppressWarnings("unchecked")
>   T server = (T) factory.create();
>   // The BindingProvider interface provides access to the protocol 
> binding and
>   // to the associated context objects for request and response message 
> processing.
>   Binding

[jira] [Commented] (CXF-7473) ExceptionMapper class hierarchies: incompatible ExceptionMapper selected

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7473:
---

Sorry, please ignore those comments about the package check...
Can you please reformat a patch a bit, remove a types null check, so that I can 
spot what exactly has changed ? 

> ExceptionMapper class hierarchies: incompatible ExceptionMapper selected
> 
>
> Key: CXF-7473
> URL: https://issues.apache.org/jira/browse/CXF-7473
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.1.12
>Reporter: Jocelyn Lepage
> Fix For: 3.1.13
>
>
> CXF seems to select an incompatible ExceptionMapper when using class 
> hierarchies.
> More precisely, if I define an abstract exception class like following:
> {code:java}
> @Provider
> public abstract class AbstractExceptionMapper implements 
> ExceptionMapper {
> ...
> {code}
> Then I define a concrete one for IllegalArgumentExceptions:
> {code:java}
> public class IllegalArgumentExceptionMapper extends 
> AbstractExceptionMapper {
> ...
> {code}
> IllegalArgumentExceptionMapper will then be selected even for 
> RuntimeException subtypes unrelated to IllegalArgumentExceptions.
> See minimal project showing the problem 
> [here|https://github.com/jlepage-appdirect/cxf-exception-mapper-bug]
> Similar (if not same) problem seems to have been reported via CXF-6635, but I 
> do see this with 3.1.11 and 3.1.12.
> Thx!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7473) ExceptionMapper class hierarchies: incompatible ExceptionMapper selected

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7473:
---

Ignore that too please...

> ExceptionMapper class hierarchies: incompatible ExceptionMapper selected
> 
>
> Key: CXF-7473
> URL: https://issues.apache.org/jira/browse/CXF-7473
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.1.12
>Reporter: Jocelyn Lepage
> Fix For: 3.1.13
>
>
> CXF seems to select an incompatible ExceptionMapper when using class 
> hierarchies.
> More precisely, if I define an abstract exception class like following:
> {code:java}
> @Provider
> public abstract class AbstractExceptionMapper implements 
> ExceptionMapper {
> ...
> {code}
> Then I define a concrete one for IllegalArgumentExceptions:
> {code:java}
> public class IllegalArgumentExceptionMapper extends 
> AbstractExceptionMapper {
> ...
> {code}
> IllegalArgumentExceptionMapper will then be selected even for 
> RuntimeException subtypes unrelated to IllegalArgumentExceptions.
> See minimal project showing the problem 
> [here|https://github.com/jlepage-appdirect/cxf-exception-mapper-bug]
> Similar (if not same) problem seems to have been reported via CXF-6635, but I 
> do see this with 3.1.11 and 3.1.12.
> Thx!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7485) Reverse proxy url is not reflected in Swagger UI response

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7485:
---

I've tried locally a proxy and jaxrs/spring_boot demo, first accessing 
SwaggerUI via the proxy, and then directly, bypassing the proxy, and the 
basePath was correct, not cached.
CXF def does not cache it, so if you see it being cached in your case then it 
must be Swagger which caches it.
I'll have a look at your project but later on, in meantime you might want to 
try setting Swagger2Feature.usePathBasedConfig to true and let me know if it 
helps

> Reverse proxy url is not reflected in Swagger UI response
> -
>
> Key: CXF-7485
> URL: https://issues.apache.org/jira/browse/CXF-7485
> Project: CXF
>  Issue Type: Bug
>  Components: Documentation
>Affects Versions: 3.1.12
>Reporter: na sam 
>Assignee: Sergey Beryozkin
> Fix For: 3.1.13, 3.2.0
>
>
> I am using Swagger2Feature to generate the swagger out of my REST service 
> classes. 
> All the url's that is being generated are based on deployed server's web 
> path. Its working directly in my server. But If the request comes via reverse 
> proxy, then in my  swagger ui response I am seeing still same my local 
> server's webpath instead of one coming via reverse proxy.
> Need a way to support reverse proxy web path.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7473) ExceptionMapper class hierarchies: incompatible ExceptionMapper selected

2017-09-05 Thread Dennis Kieselhorst (JIRA)

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

Dennis Kieselhorst commented on CXF-7473:
-

I added the null check because I was actually returning null in this case. But 
I can change that to empty Type array.

Probably we should add more unittests first to ensure the cases from CXF-6635, 
CXF-5348, CXF-6067 are still working after the change.

> ExceptionMapper class hierarchies: incompatible ExceptionMapper selected
> 
>
> Key: CXF-7473
> URL: https://issues.apache.org/jira/browse/CXF-7473
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.1.12
>Reporter: Jocelyn Lepage
> Fix For: 3.1.13
>
>
> CXF seems to select an incompatible ExceptionMapper when using class 
> hierarchies.
> More precisely, if I define an abstract exception class like following:
> {code:java}
> @Provider
> public abstract class AbstractExceptionMapper implements 
> ExceptionMapper {
> ...
> {code}
> Then I define a concrete one for IllegalArgumentExceptions:
> {code:java}
> public class IllegalArgumentExceptionMapper extends 
> AbstractExceptionMapper {
> ...
> {code}
> IllegalArgumentExceptionMapper will then be selected even for 
> RuntimeException subtypes unrelated to IllegalArgumentExceptions.
> See minimal project showing the problem 
> [here|https://github.com/jlepage-appdirect/cxf-exception-mapper-bug]
> Similar (if not same) problem seems to have been reported via CXF-6635, but I 
> do see this with 3.1.11 and 3.1.12.
> Thx!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CXF-7495) Set EXPAND_XOP_INCLUDE for WSS4JOutInterceptor to 'false' in older version

2017-09-05 Thread Marco Tenti (JIRA)

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

Marco Tenti updated CXF-7495:
-
External issue URL: 
https://stackoverflow.com/questions/46038257/set-expand-xop-include-for-wss4joutinterceptor-in-apache-cxf-3-0-x
  (was: 
https://stackoverflow.com/questions/46038257/set-expand-xop-include-for-wss4joutinterceptor-to-false-in-older-version-of-ap)

> Set EXPAND_XOP_INCLUDE for WSS4JOutInterceptor to 'false' in older version
> --
>
> Key: CXF-7495
> URL: https://issues.apache.org/jira/browse/CXF-7495
> Project: CXF
>  Issue Type: Task
>  Components: JAXB Databinding, Soap Binding
>Affects Versions: 2.2.12, 3.0.4
> Environment: Windows 10, java 1.8.0_131, Eclipse IE
>Reporter: Marco Tenti
>Priority: Minor
>  Labels: cxf, jaws, mtom, wss4j-configuration
>
> I have a soap service . it support the mtom but not the xop include 
> annotation , so it refused my request:
>  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/>
>   
> http://sip.receive.core.iris.eng.it"; 
> xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
>   
> ?
> ?
> SHA-256
> HEX
> 
> 9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
>   
>   
> 
>   http://www.w3.org/2004/08/xop/include"; 
> href="cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4-1@cxf.apache.org"/>
> 
>   
> 
>   
> 
> how can i set my request to this:
>  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/>
>   
> http://sip.receive.core.iris.eng.it"; 
> xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
>   
> ?
> ?
> SHA-256
> HEX
> 
> 9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
>   
>   
> 
> cid:940325888173
> 
>   
> 
>   
> 
> *so in the end i just want replace the:
>  http://www.w3.org/2004/08/xop/include"; 
> href="cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4-1@cxf.apache.org"/>
> with
> cid:940325888173*
> how can obtain this result? in more recent version there is a paramter for 
> this 
> https://ws.apache.org/wss4j/apidocs/org/apache/wss4j/common/ConfigurationConstants.html#EXPAND_XOP_INCLUDE
> Here the full code java i try to make it work:
> {code:java}
>   public static  T buildServerWsdl(String endpointWsdl,final String 
> username,final String password,
>   final Class serviceClass,boolean 
> ignoreSSLCertificate,boolean useAuthorizationBasic,Map 
> supplierheaders) throws NoSuchAlgorithmException, KeyManagementException, 
> MalformedURLException{
>   //Controllo wsdlurl
>   URL wsdlURL;
> java.io.File wsdlFile = new java.io.File(endpointWsdl);
> if (wsdlFile.exists()) {
> wsdlURL = wsdlFile.toURI().toURL();
> } else {
> wsdlURL = new URL(endpointWsdl);
> }
> System.out.println(wsdlURL);
>   
>   
>   JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
> 
>   factory.setServiceClass(serviceClass);  
>   factory.setAddress(endpointWsdl);
>   //factory.setServiceClass(javax.xml.ws.Service.class);
>   //factory.setAddress("http://server.service.core.eng.it/";);
>   //factory.setServiceBean(implementor);
>   //Abilita il loggin in ingresco ed uscita dei messaggi soap!
>   factory.getInInterceptors().add(new LoggingInInterceptor(4*1024));
>   factory.getOutInterceptors().add(new LoggingOutInterceptor(4*1024));
>   //factory.getInInterceptors().add(new LoggingInInterceptor());
>   //factory.getOutInterceptors().add(new LoggingOutInterceptor());
>   
> //LoggingInInterceptor loggingInInterceptor = new 
> LoggingInInterceptor();
> //loggingInInterceptor.setPrettyLogging(true);
> //LoggingOutInterceptor loggingOutInterceptor = new 
> LoggingOutInterceptor();
> //loggingOutInterceptor.setPrettyLogging(true);
> //factory.getInInterceptors().add(loggingInInterceptor);
> //factory.getOutInterceptors().add(loggingOutInterceptor);
>   @SuppressWarnings("unchecked")
>   T server = (T) factory.create();
>   // The BindingProvider interface provides access to the protocol 
> binding and
>   // to the associated context objects for request and response message 
> processing.
>   BindingProvider prov = (BindingProvider)server;
>   Binding binding = prov.getBinding(); 
>   ((SOAPBinding)binding).setMTOMEnabled(true);
>   
>   //Add handlers 

[jira] [Commented] (CXF-7473) ExceptionMapper class hierarchies: incompatible ExceptionMapper selected

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7473:
---

Yes please; you are also right makes sense to add few more tests. Do all of 
JAXRS tests pass with this change, in rt/frontened/jaxrs and systests/jaxrs at 
least ?

> ExceptionMapper class hierarchies: incompatible ExceptionMapper selected
> 
>
> Key: CXF-7473
> URL: https://issues.apache.org/jira/browse/CXF-7473
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.1.12
>Reporter: Jocelyn Lepage
> Fix For: 3.1.13
>
>
> CXF seems to select an incompatible ExceptionMapper when using class 
> hierarchies.
> More precisely, if I define an abstract exception class like following:
> {code:java}
> @Provider
> public abstract class AbstractExceptionMapper implements 
> ExceptionMapper {
> ...
> {code}
> Then I define a concrete one for IllegalArgumentExceptions:
> {code:java}
> public class IllegalArgumentExceptionMapper extends 
> AbstractExceptionMapper {
> ...
> {code}
> IllegalArgumentExceptionMapper will then be selected even for 
> RuntimeException subtypes unrelated to IllegalArgumentExceptions.
> See minimal project showing the problem 
> [here|https://github.com/jlepage-appdirect/cxf-exception-mapper-bug]
> Similar (if not same) problem seems to have been reported via CXF-6635, but I 
> do see this with 3.1.11 and 3.1.12.
> Thx!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7495) Set EXPAND_XOP_INCLUDE for WSS4JOutInterceptor to 'false' in older version

2017-09-05 Thread Colm O hEigeartaigh (JIRA)

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

Colm O hEigeartaigh commented on CXF-7495:
--

Ah right. This is nothing to do with WS-Security actually, it is CXF itself 
that is adding in the xop:Include, so the title of the JIRA is a bit 
misleading. I don't know if there is a standard alternative to using 
xop:Include along the lines of what you want, if it is not standard then likely 
CXF does not support it.

> Set EXPAND_XOP_INCLUDE for WSS4JOutInterceptor to 'false' in older version
> --
>
> Key: CXF-7495
> URL: https://issues.apache.org/jira/browse/CXF-7495
> Project: CXF
>  Issue Type: Task
>  Components: JAXB Databinding, Soap Binding
>Affects Versions: 2.2.12, 3.0.4
> Environment: Windows 10, java 1.8.0_131, Eclipse IE
>Reporter: Marco Tenti
>Priority: Minor
>  Labels: cxf, jaws, mtom, wss4j-configuration
>
> I have a soap service . it support the mtom but not the xop include 
> annotation , so it refused my request:
>  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/>
>   
> http://sip.receive.core.iris.eng.it"; 
> xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
>   
> ?
> ?
> SHA-256
> HEX
> 
> 9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
>   
>   
> 
>   http://www.w3.org/2004/08/xop/include"; 
> href="cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4-1@cxf.apache.org"/>
> 
>   
> 
>   
> 
> how can i set my request to this:
>  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/>
>   
> http://sip.receive.core.iris.eng.it"; 
> xmlns:xmime="http://www.w3.org/2005/05/xmlmime";>
>   
> ?
> ?
> SHA-256
> HEX
> 
> 9e830c2ac56eca00023b17e3c17ed1014e055f960c3ee4778a84aa02c6dafcb9
>   
>   
> 
> cid:940325888173
> 
>   
> 
>   
> 
> *so in the end i just want replace the:
>  http://www.w3.org/2004/08/xop/include"; 
> href="cid:92dc39d3-e3d5-4aa2-a9cb-7582483934a4-1@cxf.apache.org"/>
> with
> cid:940325888173*
> how can obtain this result? in more recent version there is a paramter for 
> this 
> https://ws.apache.org/wss4j/apidocs/org/apache/wss4j/common/ConfigurationConstants.html#EXPAND_XOP_INCLUDE
> Here the full code java i try to make it work:
> {code:java}
>   public static  T buildServerWsdl(String endpointWsdl,final String 
> username,final String password,
>   final Class serviceClass,boolean 
> ignoreSSLCertificate,boolean useAuthorizationBasic,Map 
> supplierheaders) throws NoSuchAlgorithmException, KeyManagementException, 
> MalformedURLException{
>   //Controllo wsdlurl
>   URL wsdlURL;
> java.io.File wsdlFile = new java.io.File(endpointWsdl);
> if (wsdlFile.exists()) {
> wsdlURL = wsdlFile.toURI().toURL();
> } else {
> wsdlURL = new URL(endpointWsdl);
> }
> System.out.println(wsdlURL);
>   
>   
>   JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
> 
>   factory.setServiceClass(serviceClass);  
>   factory.setAddress(endpointWsdl);
>   //factory.setServiceClass(javax.xml.ws.Service.class);
>   //factory.setAddress("http://server.service.core.eng.it/";);
>   //factory.setServiceBean(implementor);
>   //Abilita il loggin in ingresco ed uscita dei messaggi soap!
>   factory.getInInterceptors().add(new LoggingInInterceptor(4*1024));
>   factory.getOutInterceptors().add(new LoggingOutInterceptor(4*1024));
>   //factory.getInInterceptors().add(new LoggingInInterceptor());
>   //factory.getOutInterceptors().add(new LoggingOutInterceptor());
>   
> //LoggingInInterceptor loggingInInterceptor = new 
> LoggingInInterceptor();
> //loggingInInterceptor.setPrettyLogging(true);
> //LoggingOutInterceptor loggingOutInterceptor = new 
> LoggingOutInterceptor();
> //loggingOutInterceptor.setPrettyLogging(true);
> //factory.getInInterceptors().add(loggingInInterceptor);
> //factory.getOutInterceptors().add(loggingOutInterceptor);
>   @SuppressWarnings("unchecked")
>   T server = (T) factory.create();
>   // The BindingProvider interface provides access to the protocol 
> binding and
>   // to the associated context objects for request and response message 
> processing.
>   BindingProvider prov = (BindingProvider)server;
>

[jira] [Commented] (CXF-7485) Reverse proxy url is not reflected in Swagger UI response

2017-09-05 Thread na sam (JIRA)

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

na sam  commented on CXF-7485:
--

Tested with Swagger2Feature.usePathBasedConfig = true and worked great.

[~sergey_beryozkin], thanks for your effort to fix this issue. 

Could you please let me know when this fix would go into release.

Thanks again.



> Reverse proxy url is not reflected in Swagger UI response
> -
>
> Key: CXF-7485
> URL: https://issues.apache.org/jira/browse/CXF-7485
> Project: CXF
>  Issue Type: Bug
>  Components: Documentation
>Affects Versions: 3.1.12
>Reporter: na sam 
>Assignee: Sergey Beryozkin
> Fix For: 3.1.13, 3.2.0
>
>
> I am using Swagger2Feature to generate the swagger out of my REST service 
> classes. 
> All the url's that is being generated are based on deployed server's web 
> path. Its working directly in my server. But If the request comes via reverse 
> proxy, then in my  swagger ui response I am seeing still same my local 
> server's webpath instead of one coming via reverse proxy.
> Need a way to support reverse proxy web path.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7485) Reverse proxy url is not reflected in Swagger UI response

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7485:
---

Great, thanks for the confirmation.
3.2.0 should be built this week, 3.1.13 quite soon too

> Reverse proxy url is not reflected in Swagger UI response
> -
>
> Key: CXF-7485
> URL: https://issues.apache.org/jira/browse/CXF-7485
> Project: CXF
>  Issue Type: Bug
>  Components: Documentation
>Affects Versions: 3.1.12
>Reporter: na sam 
>Assignee: Sergey Beryozkin
> Fix For: 3.1.13, 3.2.0
>
>
> I am using Swagger2Feature to generate the swagger out of my REST service 
> classes. 
> All the url's that is being generated are based on deployed server's web 
> path. Its working directly in my server. But If the request comes via reverse 
> proxy, then in my  swagger ui response I am seeing still same my local 
> server's webpath instead of one coming via reverse proxy.
> Need a way to support reverse proxy web path.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7496) Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: in-string "{"

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7496:
---

I have a fix for skipping both left and right curly brackets if they are inside 
strings, but I can't merge it into 3.2.0-SNAPSHOT which is due very soon, too 
sensitive...

> Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: 
> in-string "{"
> ---
>
> Key: CXF-7496
> URL: https://issues.apache.org/jira/browse/CXF-7496
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7, 3.1.12
> Environment: java version "1.8.0_25"
> Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
> Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
>Reporter: Alon Bar-Lev
>
> Hello,
> We have found incorrect parsing of "{" within JSON strings. It seems like the 
> parser searches for "{" and "}" regardless of string boundary.
> A reproduction program is attached, using latest 3.1.12 version.
> Thanks!
> h2. REPRODUCTION
> {code}
> import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
> public class JsonMapReaderNotWorking {
>   
>   public static void main(String args[]) throws Exception
>   {
>   JsonMapObjectReaderWriter jsonMapObjectReaderWriter = new 
> JsonMapObjectReaderWriter();
>   String s = "{\"x\":{\"y\":\"{\"}}";
>   System.out.println(s);
>   jsonMapObjectReaderWriter.fromJson(s);
>   }
> }
> {code}
> h2. RESULT
> {code}
>   {"x":{"y":"{"}}
>   Exception in thread "main" java.lang.StringIndexOutOfBoundsException: 
> String index out of range: -6
>   at java.lang.String.substring(String.java:1967)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.readJsonObjectAsSettable(JsonMapObjectReaderWriter.java:189)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.fromJson(JsonMapObjectReaderWriter.java:162)
>   at JsonMapReaderNotWorking.main(JsonMapReaderNotWorking.java:13)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7496) Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: in-string "{"

2017-09-05 Thread Alon Bar-Lev (JIRA)

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

Alon Bar-Lev commented on CXF-7496:
---

Thanks for the prompt action.

I wounder, what do you recommend? We are failing JWT validations because of 
this bug... What can we do in the mean time? This issue is severe, enough for 
us to consider which to a different library.

Thanks!

> Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: 
> in-string "{"
> ---
>
> Key: CXF-7496
> URL: https://issues.apache.org/jira/browse/CXF-7496
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7, 3.1.12
> Environment: java version "1.8.0_25"
> Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
> Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
>Reporter: Alon Bar-Lev
>
> Hello,
> We have found incorrect parsing of "{" within JSON strings. It seems like the 
> parser searches for "{" and "}" regardless of string boundary.
> A reproduction program is attached, using latest 3.1.12 version.
> Thanks!
> h2. REPRODUCTION
> {code}
> import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
> public class JsonMapReaderNotWorking {
>   
>   public static void main(String args[]) throws Exception
>   {
>   JsonMapObjectReaderWriter jsonMapObjectReaderWriter = new 
> JsonMapObjectReaderWriter();
>   String s = "{\"x\":{\"y\":\"{\"}}";
>   System.out.println(s);
>   jsonMapObjectReaderWriter.fromJson(s);
>   }
> }
> {code}
> h2. RESULT
> {code}
>   {"x":{"y":"{"}}
>   Exception in thread "main" java.lang.StringIndexOutOfBoundsException: 
> String index out of range: -6
>   at java.lang.String.substring(String.java:1967)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.readJsonObjectAsSettable(JsonMapObjectReaderWriter.java:189)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.fromJson(JsonMapObjectReaderWriter.java:162)
>   at JsonMapReaderNotWorking.main(JsonMapReaderNotWorking.java:13)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (CXF-7492) Add a new wadltojava user-password option

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin resolved CXF-7492.
---
   Resolution: Fixed
 Assignee: Sergey Beryozkin
Fix Version/s: 3.2.0
   3.1.13
   3.0.15

a 'namePassword' option added

> Add a new wadltojava user-password option
> -
>
> Key: CXF-7492
> URL: https://issues.apache.org/jira/browse/CXF-7492
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS, Tooling
>Reporter: Sergey Beryozkin
>Assignee: Sergey Beryozkin
> Fix For: 3.0.15, 3.1.13, 3.2.0
>
>
> In some cases the remote references may need a Basic authentication support;



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CXF-7492) Add a new wadltojava 'authorization' option

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin updated CXF-7492:
--
Summary: Add a new wadltojava 'authorization' option  (was: Add a new 
wadltojava user-password option)

> Add a new wadltojava 'authorization' option
> ---
>
> Key: CXF-7492
> URL: https://issues.apache.org/jira/browse/CXF-7492
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS, Tooling
>Reporter: Sergey Beryozkin
>Assignee: Sergey Beryozkin
> Fix For: 3.0.15, 3.1.13, 3.2.0
>
>
> In some cases the remote references may need a Basic authentication support;



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (CXF-7492) Add a new wadltojava 'authorization' option

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin edited comment on CXF-7492 at 9/5/17 12:34 PM:


'authorization' option added, by default a name:password pair as an input to 
BasicAuth is expected, other authorization types might be supported later 


was (Author: sergey_beryozkin):
a 'namePassword' option added

> Add a new wadltojava 'authorization' option
> ---
>
> Key: CXF-7492
> URL: https://issues.apache.org/jira/browse/CXF-7492
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS, Tooling
>Reporter: Sergey Beryozkin
>Assignee: Sergey Beryozkin
> Fix For: 3.0.15, 3.1.13, 3.2.0
>
>
> In some cases the remote references may need a Basic authentication support;



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7496) Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: in-string "{"

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7496:
---

Do the claim values contain escaped double quotes ?

> Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: 
> in-string "{"
> ---
>
> Key: CXF-7496
> URL: https://issues.apache.org/jira/browse/CXF-7496
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7, 3.1.12
> Environment: java version "1.8.0_25"
> Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
> Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
>Reporter: Alon Bar-Lev
>
> Hello,
> We have found incorrect parsing of "{" within JSON strings. It seems like the 
> parser searches for "{" and "}" regardless of string boundary.
> A reproduction program is attached, using latest 3.1.12 version.
> Thanks!
> h2. REPRODUCTION
> {code}
> import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
> public class JsonMapReaderNotWorking {
>   
>   public static void main(String args[]) throws Exception
>   {
>   JsonMapObjectReaderWriter jsonMapObjectReaderWriter = new 
> JsonMapObjectReaderWriter();
>   String s = "{\"x\":{\"y\":\"{\"}}";
>   System.out.println(s);
>   jsonMapObjectReaderWriter.fromJson(s);
>   }
> }
> {code}
> h2. RESULT
> {code}
>   {"x":{"y":"{"}}
>   Exception in thread "main" java.lang.StringIndexOutOfBoundsException: 
> String index out of range: -6
>   at java.lang.String.substring(String.java:1967)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.readJsonObjectAsSettable(JsonMapObjectReaderWriter.java:189)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.fromJson(JsonMapObjectReaderWriter.java:162)
>   at JsonMapReaderNotWorking.main(JsonMapReaderNotWorking.java:13)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CXF-7469) DocLiteralInInterceptor creates DataReader too soon

2017-09-05 Thread Daniel Kulp (JIRA)

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

Daniel Kulp updated CXF-7469:
-
Fix Version/s: (was: 3.0.15)
   (was: 3.1.13)

> DocLiteralInInterceptor creates DataReader too soon
> ---
>
> Key: CXF-7469
> URL: https://issues.apache.org/jira/browse/CXF-7469
> Project: CXF
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 3.1.11, 3.0.14
>Reporter: Daniel Kulp
>Assignee: Daniel Kulp
> Fix For: 3.2.0
>
>
> The DocLiteralInInterceptor creates the DataReader prior to determining the 
> BindingOperationInfo.   Thus, the SchemaValidation setting on the 
> operation/method level cannot take affect.   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (CXF-7469) DocLiteralInInterceptor creates DataReader too soon

2017-09-05 Thread Daniel Kulp (JIRA)

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

Daniel Kulp resolved CXF-7469.
--
Resolution: Fixed

> DocLiteralInInterceptor creates DataReader too soon
> ---
>
> Key: CXF-7469
> URL: https://issues.apache.org/jira/browse/CXF-7469
> Project: CXF
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 3.1.11, 3.0.14
>Reporter: Daniel Kulp
>Assignee: Daniel Kulp
> Fix For: 3.2.0
>
>
> The DocLiteralInInterceptor creates the DataReader prior to determining the 
> BindingOperationInfo.   Thus, the SchemaValidation setting on the 
> operation/method level cannot take affect.   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CXF-7473) ExceptionMapper class hierarchies: incompatible ExceptionMapper selected

2017-09-05 Thread Daniel Kulp (JIRA)

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

Daniel Kulp updated CXF-7473:
-
Fix Version/s: (was: 3.1.13)
   3.2.0

> ExceptionMapper class hierarchies: incompatible ExceptionMapper selected
> 
>
> Key: CXF-7473
> URL: https://issues.apache.org/jira/browse/CXF-7473
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.1.12
>Reporter: Jocelyn Lepage
> Fix For: 3.2.0
>
>
> CXF seems to select an incompatible ExceptionMapper when using class 
> hierarchies.
> More precisely, if I define an abstract exception class like following:
> {code:java}
> @Provider
> public abstract class AbstractExceptionMapper implements 
> ExceptionMapper {
> ...
> {code}
> Then I define a concrete one for IllegalArgumentExceptions:
> {code:java}
> public class IllegalArgumentExceptionMapper extends 
> AbstractExceptionMapper {
> ...
> {code}
> IllegalArgumentExceptionMapper will then be selected even for 
> RuntimeException subtypes unrelated to IllegalArgumentExceptions.
> See minimal project showing the problem 
> [here|https://github.com/jlepage-appdirect/cxf-exception-mapper-bug]
> Similar (if not same) problem seems to have been reported via CXF-6635, but I 
> do see this with 3.1.11 and 3.1.12.
> Thx!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7496) Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: in-string "{"

2017-09-05 Thread Alon Bar-Lev (JIRA)

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

Alon Bar-Lev commented on CXF-7496:
---

I do not understand the question... the following:

{code}
{"x":{"y":"{"}}
{code}

Has a plain string and by mistake has '{' character within... escape should not 
be done in this case.

> Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: 
> in-string "{"
> ---
>
> Key: CXF-7496
> URL: https://issues.apache.org/jira/browse/CXF-7496
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7, 3.1.12
> Environment: java version "1.8.0_25"
> Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
> Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
>Reporter: Alon Bar-Lev
>
> Hello,
> We have found incorrect parsing of "{" within JSON strings. It seems like the 
> parser searches for "{" and "}" regardless of string boundary.
> A reproduction program is attached, using latest 3.1.12 version.
> Thanks!
> h2. REPRODUCTION
> {code}
> import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
> public class JsonMapReaderNotWorking {
>   
>   public static void main(String args[]) throws Exception
>   {
>   JsonMapObjectReaderWriter jsonMapObjectReaderWriter = new 
> JsonMapObjectReaderWriter();
>   String s = "{\"x\":{\"y\":\"{\"}}";
>   System.out.println(s);
>   jsonMapObjectReaderWriter.fromJson(s);
>   }
> }
> {code}
> h2. RESULT
> {code}
>   {"x":{"y":"{"}}
>   Exception in thread "main" java.lang.StringIndexOutOfBoundsException: 
> String index out of range: -6
>   at java.lang.String.substring(String.java:1967)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.readJsonObjectAsSettable(JsonMapObjectReaderWriter.java:189)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.fromJson(JsonMapObjectReaderWriter.java:162)
>   at JsonMapReaderNotWorking.main(JsonMapReaderNotWorking.java:13)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7496) Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: in-string "{"

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7496:
---

Yes, curly brackets do not need to be escaped, the fix I did needed a bit more 
work though to handle escaped double quotes. Tests look OK, will try 
3.1.13-SNAPSHOT with Fediz, will commit if it stays green 

> Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: 
> in-string "{"
> ---
>
> Key: CXF-7496
> URL: https://issues.apache.org/jira/browse/CXF-7496
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7, 3.1.12
> Environment: java version "1.8.0_25"
> Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
> Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
>Reporter: Alon Bar-Lev
>
> Hello,
> We have found incorrect parsing of "{" within JSON strings. It seems like the 
> parser searches for "{" and "}" regardless of string boundary.
> A reproduction program is attached, using latest 3.1.12 version.
> Thanks!
> h2. REPRODUCTION
> {code}
> import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
> public class JsonMapReaderNotWorking {
>   
>   public static void main(String args[]) throws Exception
>   {
>   JsonMapObjectReaderWriter jsonMapObjectReaderWriter = new 
> JsonMapObjectReaderWriter();
>   String s = "{\"x\":{\"y\":\"{\"}}";
>   System.out.println(s);
>   jsonMapObjectReaderWriter.fromJson(s);
>   }
> }
> {code}
> h2. RESULT
> {code}
>   {"x":{"y":"{"}}
>   Exception in thread "main" java.lang.StringIndexOutOfBoundsException: 
> String index out of range: -6
>   at java.lang.String.substring(String.java:1967)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.readJsonObjectAsSettable(JsonMapObjectReaderWriter.java:189)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.fromJson(JsonMapObjectReaderWriter.java:162)
>   at JsonMapReaderNotWorking.main(JsonMapReaderNotWorking.java:13)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (CXF-7496) Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: in-string "{"

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin resolved CXF-7496.
---
   Resolution: Fixed
 Assignee: Sergey Beryozkin
Fix Version/s: 3.2.0
   3.1.13

> Parsing Bug in org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter: 
> in-string "{"
> ---
>
> Key: CXF-7496
> URL: https://issues.apache.org/jira/browse/CXF-7496
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7, 3.1.12
> Environment: java version "1.8.0_25"
> Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
> Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
>Reporter: Alon Bar-Lev
>Assignee: Sergey Beryozkin
> Fix For: 3.1.13, 3.2.0
>
>
> Hello,
> We have found incorrect parsing of "{" within JSON strings. It seems like the 
> parser searches for "{" and "}" regardless of string boundary.
> A reproduction program is attached, using latest 3.1.12 version.
> Thanks!
> h2. REPRODUCTION
> {code}
> import org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter;
> public class JsonMapReaderNotWorking {
>   
>   public static void main(String args[]) throws Exception
>   {
>   JsonMapObjectReaderWriter jsonMapObjectReaderWriter = new 
> JsonMapObjectReaderWriter();
>   String s = "{\"x\":{\"y\":\"{\"}}";
>   System.out.println(s);
>   jsonMapObjectReaderWriter.fromJson(s);
>   }
> }
> {code}
> h2. RESULT
> {code}
>   {"x":{"y":"{"}}
>   Exception in thread "main" java.lang.StringIndexOutOfBoundsException: 
> String index out of range: -6
>   at java.lang.String.substring(String.java:1967)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.readJsonObjectAsSettable(JsonMapObjectReaderWriter.java:189)
>   at 
> org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter.fromJson(JsonMapObjectReaderWriter.java:162)
>   at JsonMapReaderNotWorking.main(JsonMapReaderNotWorking.java:13)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (FEDIZ-207) FedizPrincipal interface needs to have getId() method

2017-09-05 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin resolved FEDIZ-207.

Resolution: Later

> FedizPrincipal interface needs to have getId() method
> -
>
> Key: FEDIZ-207
> URL: https://issues.apache.org/jira/browse/FEDIZ-207
> Project: CXF-Fediz
>  Issue Type: Improvement
>  Components: IDP, Plugin
>Reporter: Sergey Beryozkin
> Attachments: fediz207.txt
>
>
> OIDC IDToken generates a random IdToken SubjectId value when it converts the 
> values found in the FedizPrincipal's SAML token. The problem is that every 
> time the user comes in a new subjectId is generated for the id token - while 
> this value is actually expected to be identical for a given user. 
> The immediate problem we face is that every client application gets an 
> IdToken for a user 'alice' with the different subjectId, thus. during the 
> global logout, it is impossible for each of these client applications to 
> identify, from the logout token, which user to logout - because when OIDC 
> LogoutService creates a logout token it uses FedizSubjectCreator to create a 
> new IdToken with a newly generated subject id.
> One way to solve is to start hacking a solution involving saving it in a 
> session id and then take care of removing it from the session on the logout - 
> but given that every Fediz plugin takes care of dealing with FedizPrincipal 
> it is better to keep 'id' at the FedizPrincipal level.
> Updating the interface with getId() will only affect the plugins and not the 
> user code. Each plugin will use UUID to generate it 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (FEDIZ-208) Update CXF version to 3.1.13

2017-09-05 Thread Sergey Beryozkin (JIRA)
Sergey Beryozkin created FEDIZ-208:
--

 Summary: Update CXF version to 3.1.13
 Key: FEDIZ-208
 URL: https://issues.apache.org/jira/browse/FEDIZ-208
 Project: CXF-Fediz
  Issue Type: Task
Reporter: Sergey Beryozkin






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (FEDIZ-206) Revert FedizSubjectCreator changes

2017-09-05 Thread Colm O hEigeartaigh (JIRA)

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

Colm O hEigeartaigh resolved FEDIZ-206.
---
Resolution: Fixed

> Revert FedizSubjectCreator changes
> --
>
> Key: FEDIZ-206
> URL: https://issues.apache.org/jira/browse/FEDIZ-206
> Project: CXF-Fediz
>  Issue Type: Improvement
>Reporter: Colm O hEigeartaigh
>Assignee: Colm O hEigeartaigh
> Fix For: 1.4.2
>
>
> To get 1.4.1 out, I need to move the OidcUtils changes in CXF into the 
> FedizSubjectCreator. This task is to revert the change once we pick up CXF 
> 3.1.13.
> commit 8a1e688ec57a99d648316dafc989f65930a10d46
> Author: Colm O hEigeartaigh 
> Date:   Wed Aug 9 15:58:44 2017 +0100
> Temporarily revert to CXF 3.1.12



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)