STS: Attributes in the SubjectConfirmationData

2018-02-28 Thread Tóth Csaba
Hello!

I need an Attribute in the
Subject/NameID/SubjectConfirmation/SubjectConfirmationData in the response.

I check the code, and in the openSAML 3.3 not supported this.

I put the SAML2ComponentBuilder.createSubjectConfirmationData() some
line, what create as a Attribute class, but I can only add to the list:

subjectConfirmationData.getUnknownXMLObjects()

My questions is: this will be signed? or I need to do some extra?

Thanx

Csaba



Compound projects with XSDs, WSDLs - how to suppress duplicate classes

2018-02-28 Thread Morein, Arnie
I have serveral web service projects that I am converting from AXIS to CXF. 
When they were first written, the core types defined in the XSD files where 
copied into each other project; I have removed those duplications, as defined 
below.

The first project, ws-dls-cps, is just two fairly large XSD files which via the 
jaxb2-maven-plugin, generates the classes used by the other projects.

The second project, ws-dls-ics has three WSDLs that need to use the types 
defined in the XSDs of the ws-dls-cps project as the generate-sources and 
compile-time source of the aforementioned types/classes.

Each of the three WSDLs define local types that use or extend types from the 
CPS project. But I want to use the CPS project as the master/ancestor of the 
base types so I use maven-dependency-plugin / unpack execution to extract the 
two XSD files from the CPS project into a specific folder in the ICS project, 
separate from the local  XSDs. Then the three local XSDs just reference them:





The WSDLs in ICS then reference the local XSD files:


http://www.w3.org/2001/XMLSchema;>


http://www.digimarc.com/TXCaptureWebService/;
schemaLocation="../xsd/ImageCaptureService.xsd" />
http://www.digimarc.com/TXCaptureWebServiceResponse/;
schemaLocation="../xsd/ImagingResponseTypes.xsd" />



Everything validates in Eclipse and the Maven clean|package works file too. 
With one problem:

The types imported from "../xsd/ImagingResponseTypes.xsd" (see above) - which 
in turn is importing the ancestor types via their now local XSD files:





Are getting generated again to a new package 
(com.digimarc.txcapturewebserviceresponse), which is a complete duplication of 
the classes from the CPS project.

If I add the -nexclude parameter to exclude that namespace/package, it is NOT 
generated, but the related ObjectFactory classes of two of the WSDL packages 
that use the ImagingResponseTypes.xsd file, still refer to the missing package 
and the related ObjectFactory class:

@XmlSeeAlso({com.digimarc.txcapturewebservice.ObjectFactory.class, 
com.digimarc.txcapturewebserviceresponse.ObjectFactory.class, 
com.digimarc.schematypes.ObjectFactory.class, 
com.digimarc.imaging.ObjectFactory.class})

So, the question is, how do I tell wsdl2java to ignore that namespace/package 
and to use the ones from the CPS package?

Or is that impossible?



muting org.apache.cxf.service.factory.ReflectionServerFactoryBean

2018-02-28 Thread Alex O'Ree
Using log4j2 in tomcat 8 with cxf 2.7.11 with a war file

Whenever i create a web service client, i get the following log message
INFO
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWsdl
Creating Service(mynamespace)MyService from WSDL:
jar:file:/path/to/myservice.jar!my.wsdl

is there any way to mute this? I've tried the normal log4j2 appender
configure but it doesn't seem to have any affect.


cxf 3.2 with tomcat 7

2018-02-28 Thread Thibaut Robert
Hi,

When deploying cxf 3.2 on tomcat 7, it breaks because of a hard dependency
on Servlet 3.1 classes in Servlet3ContinuationProvider
(javax.servlet.WriteListener), which results in ClassNotFound at runtime.

Is it expected behavior, or should there be a check for servlet 3.1
availability like there is for servlet 3 ?

Note this was introduced by [CXF-6882] Initial JAX-RS NIO Write support.

Regards,
Thibaut


Re: PhaseInterceptorChain Interceptor for {service} has thrown exception, unwinding now java.lang.NullPointerException

2018-02-28 Thread Colm O hEigeartaigh
This question would probably be better sent to the Camel Users mailing
list, as the NPE is in Camel itself. I'm not sure if this is the cause, but
"redeliveryPolicy" is not prefixed with "camel:" like the other components
of your route.

Colm.

On Tue, Feb 27, 2018 at 4:22 PM, m_ali1991  wrote:

> Hello,
>
> I am using windows 10, ServiceMix 7.0.1 and Java version 1.7.0_80.
>
> In the below code If the maximumRedeliveries count is greather than 1. I am
> getting the exception  *Interceptor for {ABC} has thrown exception,
> unwinding now
> java.lang.NullPointerExceptionbelow*. Full Stack trace is in the end. Why
> I
> can not set the maximumRedeliveries greather than 1. Any help would be
> highly appreciated.
>
> 
> java.net.ConnectException
>  redeliveryDelay="1000"
> logRetryAttempted="true" retryAttemptedLogLevel="DEBUG" />
> 
> true
> 
> 
> 
>  uri="log:onConnectException?level=ERRORmultiline=
> trueshowBody=trueshowProperties=true"
> />
> 
>
>
> 2018-02-27 13:47:34,198 | WARN  | qtp10571396-601  | PhaseInterceptorChain
> | 62 - org.apache.cxf.cxf-core - 3.1.9 | Interceptor for
> {http://nsn.com/ossbss/charge.once/wsdl/entity/Tis/wsdl/1}
> TisService#{http://nsn.com/ossbss/charge.once/wsdl/entity/Tis/wsdl/1}
> ExecuteCommand
> has thrown exception, unwinding now
> java.lang.NullPointerException
> at
> org.apache.camel.impl.DefaultConsumer.doneUoW(
> DefaultConsumer.java:107)[43:org.apache.camel.camel-core:2.16.5]
> at
> org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.
> asyncInvoke(CxfConsumer.java:171)[44:org.apache.camel.camel-cxf:2.16.5]
> at
> org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.invoke(
> CxfConsumer.java:133)[44:org.apache.camel.camel-cxf:2.16.5]
> at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.
> run(ServiceInvokerInterceptor.java:59)[62:org.apache.cxf.cxf-core:3.1.9]
> at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(
> ServiceInvokerInterceptor.java:96)[62:org.apache.cxf.cxf-core:3.1.9]
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:308)[62:org.apache.cxf.cxf-core:3.1.9]
> at
> org.apache.cxf.phase.PhaseInterceptorChain.resume(
> PhaseInterceptorChain.java:278)[62:org.apache.cxf.cxf-core:3.1.9]
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(
> ChainInitiationObserver.java:78)[62:org.apache.cxf.cxf-core:3.1.9]
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(
> AbstractHTTPDestination.java:252)[87:org.apache.cxf.cxf-rt-
> transports-http:3.1.9]
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(
> JettyHTTPDestination.java:234)[88:org.apache.cxf.cxf-rt-
> transports-http-jetty:3.1.9]
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(
> JettyHTTPHandler.java:76)[88:org.apache.cxf.cxf-rt-
> transports-http-jetty:3.1.9]
> at
> org.eclipse.jetty.server.handler.ContextHandler.
> doHandle(ContextHandler.java:1129)[194:org.eclipse.jetty.
> server:9.2.19.v20160908]
> at
> org.eclipse.jetty.server.handler.ContextHandler.
> doScope(ContextHandler.java:1065)[194:org.eclipse.jetty.
> server:9.2.19.v20160908]
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:141)[194:org.eclipse.jetty.server:9.2.19.v20160908]
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
> ContextHandlerCollection.java:189)[194:org.eclipse.jetty.
> server:9.2.19.v20160908]
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> HandlerWrapper.java:97)[194:org.eclipse.jetty.server:9.2.19.v20160908]
> at
> org.eclipse.jetty.server.Server.handleAsync(Server.
> java:549)[194:org.eclipse.jetty.server:9.2.19.v20160908]
> at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:318)[194:org.
> eclipse.jetty.server:9.2.19.v20160908]
> at
> org.eclipse.jetty.server.HttpChannel.run(HttpChannel.
> java:262)[194:org.eclipse.jetty.server:9.2.19.v20160908]
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> QueuedThreadPool.java:635)[197:org.eclipse.jetty.util:9.2.19.v20160908]
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
> QueuedThreadPool.java:555)[197:org.eclipse.jetty.util:9.2.19.v20160908]
> at java.lang.Thread.run(Thread.java:745)[:1.7.0_80]
>
>
>
> --
> Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com


Re: how to remove XML linebreaks from signatures

2018-02-28 Thread Colm O hEigeartaigh
FYI I've decided to add a way of disabling line breaks in BASE-64 output:

https://issues.apache.org/jira/browse/SANTUARIO-482

Colm.

On Mon, Feb 26, 2018 at 11:33 AM, Colm O hEigeartaigh 
wrote:

> Have you tried just using the latest CXF 3.1.x instead? That uses the
> "old" signature line break functionality, and so you should be able to turn
> off the line breaks via either "org.apache.xml.security.ignoreLineBreaks"
> and/or "com.sun.org.apache.xml.internal.security.ignoreLineBreaks".
>
> Colm.
>
> On Fri, Feb 23, 2018 at 11:43 PM, Guy Ridley 
> wrote:
>
>> Hello Colm,
>>
>> Thank you for this explanation!  It sounds like the system I'm sending to
>> does not follow the current standards about line feeds in the Signature &
>> Keyinfo tags, or perhaps their support team is just guessing about why it
>> thinks I have threatening characters in the payload.
>>
>> Either way, they are not going to change their system this year so I have
>> to
>> humor them, before they will look deeper.  I think it should be possible
>> to
>> remove the characters using an Interceptor, in the USER or POST_STREAM
>> Phase, without invalidating the signature, since they are not in the
>> SignedInfo tag?  (Am studying http://cxf.apache.org/docs/int
>> erceptors.html).
>>
>> Thanks again,
>> Guy
>>
>>
>>
>>
>>
>>
>>
>> --
>> Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html
>>
>
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com