You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by atiato <om...@its.ws> on 2013/09/26 18:54:52 UTC

contentObjectId in XML Security (camel-xmlsecurity)

Dears , 

Please let me know how to fill contentObjectId  when signing XML messages.

Please example I already searched github and sources and didn't have the
luck to find any .

Thanks,
Omar Atia



--
View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: contentObjectId in XML Security (camel-xmlsecurity)- How to open JIRA?

Posted by Claus Ibsen <cl...@gmail.com>.
The first letter should be in lower case, eg

ContentObjectId=Body

should be

contentObjectId=Body

On Fri, Sep 27, 2013 at 1:25 PM, atiato <om...@its.ws> wrote:
> Dears Claus,
>
> the solution is as below when specifying the header
> CamelXmlSignatureContentReferenceUri with #Body , it raises the above
> exception , so as a work around we were unable to add the ContentObjectId to
> uri when signing because it has no setter method inside the
> camel-xmlsecurity jar file , so as an action download sources compiling and
> adding the setter in order to make it as option or parameter to signing uri
> as below :
>
>         <to
> uri="xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&amp;addKeyInfoReference=true&amp;transformMethods=#NoCommTrans&amp;ContentObjectId=Body"
> />
>
>
> camel-context.xml
> <http://camel.465427.n5.nabble.com/file/n5740288/camel-context.xml>
>
> XmlSignerConfiguration.java
> <http://camel.465427.n5.nabble.com/file/n5740288/XmlSignerConfiguration.java>
>
>  public void setContentObjectId(String contentObjectId) {
>
>         this.contentObjectId = contentObjectId;
>     }
>
>
> let me know if I have to open a JIRA for this issue .
>
> thanks,
> Omar Atia
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740288.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: contentObjectId in XML Security (camel-xmlsecurity)- How to open JIRA?

Posted by atiato <om...@its.ws>.
Dears Claus,

the solution is as below when specifying the header
CamelXmlSignatureContentReferenceUri with #Body , it raises the above
exception , so as a work around we were unable to add the ContentObjectId to
uri when signing because it has no setter method inside the
camel-xmlsecurity jar file , so as an action download sources compiling and
adding the setter in order to make it as option or parameter to signing uri
as below :

	<to
uri="xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&amp;addKeyInfoReference=true&amp;transformMethods=#NoCommTrans&amp;ContentObjectId=Body"
/>
		

camel-context.xml
<http://camel.465427.n5.nabble.com/file/n5740288/camel-context.xml>  

XmlSignerConfiguration.java
<http://camel.465427.n5.nabble.com/file/n5740288/XmlSignerConfiguration.java>  

 public void setContentObjectId(String contentObjectId) {
    
        this.contentObjectId = contentObjectId;
    }


let me know if I have to open a JIRA for this issue .

thanks,
Omar Atia





 



--
View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740288.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: contentObjectId in XML Security (camel-xmlsecurity)

Posted by Claus Ibsen <cl...@gmail.com>.
We did some changes try with latest source code

On Tue, Oct 1, 2013 at 6:55 PM, atiato <ta...@gmail.com> wrote:
> Hi Claus ,
>
> I didn't get any reply for this ? should we open this as JIRA ?
>
> thanks,
> Omar Atia
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740707.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: contentObjectId in XML Security (camel-xmlsecurity)

Posted by atiato <ta...@gmail.com>.
Hi Claus , 

I didn't get any reply for this ? should we open this as JIRA ?

thanks,
Omar Atia



--
View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740707.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: contentObjectId in XML Security (camel-xmlsecurity)

Posted by atiato <ta...@gmail.com>.
Dear Claus ,

Please check the above error message when setting the camel header for
Content reference URI ?

thanks,
Omar Atia



--
View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740536.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: contentObjectId in XML Security (camel-xmlsecurity)

Posted by atiato <ta...@gmail.com>.
Dear Claus ,

What about this error when setting the header to change Reference URI ?

<setHeader headerName="CamelXmlSignatureContentReferenceUri">
                        <constant>#Body</constant>
</setHeader>

        <to 
                               
uri="xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&amp;addKeyInfoReference=true&amp;transformMethods=#NoCommTrans"
/>
                        <convertBodyTo type="String" />



it raises the following exception : 

org.apache.camel.component.xmlsecurity.api.XmlSignatureException:
javax.xml.crypto.dsig.XMLSignatureException:
javax.xml.crypto.URIReferenceException:
org.apache.xml.security.utils.resolver.ResourceResolverException: Cannot
resolve element with ID Body 
        at
org.apache.camel.component.xmlsecurity.processor.XmlSignerProcessor.sign(XmlSignerProcessor.java:269)[camel-xmlsecurity-2.12.1.jar:2.12.1] 
        at
org.apache.camel.component.xmlsecurity.processor.XmlSignerProcessor.process(XmlSignerProcessor.java:198)[camel-xmlsecurity-2.12.1.jar:2.12.1] 
        at
org.apache.camel.component.xmlsecurity.XmlSignatureProducer.process(XmlSignatureProducer.java:39)[camel-xmlsecurity-2.12.1.jar:2.12.1] 
        at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.12.1.jar:2.12.1] 
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)[camel-core-2.12.1.jar:2.12.1] 
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.1.jar:2.12.1] 
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.1.jar:2.12.1] 
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.1.jar:2.12.1] 



--
View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740401.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: contentObjectId in XML Security (camel-xmlsecurity)

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah some setters is missing on this. I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-6796

On Sat, Sep 28, 2013 at 12:20 PM, atiato <om...@its.ws> wrote:
> Dear Clause,,
>
> it raises the below error when using small letter.
>
> <to
>
> uri="xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&amp;addKeyInfoReference=true&amp;transformMethods=#NoCommTrans&amp;contentObjectId=Body"
> />
>
>                         <convertBodyTo type="String" />
>
> pom.xml :
>
> <dependency>
>     <groupId>org.apache.camel</groupId>
>     <artifactId>camel-xmlsecurity</artifactId>
>     <version>${camel.version}</version>
>
> </dependency>
>
> <camel.version>2.12.1</camel.version>
>
> I think we have to Open JIRA for this and for the error when when setting
> the header CamelXmlSignatureContentReferenceUri which I explained in the
> previous messages.
>
> Kindly find below stack error when using small letter contentObjectId :
>
>
> *************************************
> Error occurred while running main from: org.apache.camel.spring.Main
> java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:416)
>         at java.lang.Thread.run(Thread.java:722)
> Caused by: org.apache.camel.RuntimeCamelException:
> org.apache.camel.FailedToCreateRouteException: Failed to create route route1
> at: >>>
> To[xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&addKeyInfoReference=true&transformMethods=#NoCommTrans&contentObjectId=Body]
> <<< in route:
> Route(route1)[[From[mina:tcp://0.0.0.0:8899?textline=true&mi... because of
> Failed to resolve endpoint:
> xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
> due to: Failed to resolve endpoint:
> xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
> due to: *There are 1 parameters that couldn't be set on the endpoint. Check
> the uri if the parameters are spelt correctly and that they are properties
> of the endpoint. Unknown parameters=[{contentObjectId=Body}]*
>         at
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1344)
>         at
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)
>         at
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:301)
>         at
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
>         at
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
>         at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>         at
> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:186)
>         at org.apache.camel.spring.Main.doStart(Main.java:140)
>         at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
>         at org.apache.camel.main.MainSupport.run(MainSupport.java:148)
>         at org.apache.camel.main.MainSupport.run(MainSupport.java:343)
>         at org.apache.camel.spring.Main.main(Main.java:73)
>         ... 6 more
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
> route route1 at: >>>
> To[xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&addKeyInfoReference=true&transformMethods=#NoCommTrans&contentObjectId=Body]
> <<< in route:
> Route(route1)[[From[mina:tcp://0.0.0.0:8899?textline=true&mi... because of
> Failed to resolve endpoint:
> xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
> due to: Failed to resolve endpoint:
> xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
> due to: There are 1 parameters that couldn't be set on the endpoint. Check
> the uri if the parameters are spelt correctly and that they are properties
> of the endpoint. Unknown parameters=[{contentObjectId=Body}]
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:912)
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:177)
>         at
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
>         at
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
>         at
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1670)
>         at
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1544)
>         at
> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:179)
>         at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
>         at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1512)
>         at
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:228)
>         at
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:118)
>         ... 19 more
> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
> resolve endpoint:
> xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
> due to: Failed to resolve endpoint:
> xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
> due to: There are 1 parameters that couldn't be set on the endpoint. Check
> the uri if the parameters are spelt correctly and that they are properties
> of the endpoint. Unknown parameters=[{contentObjectId=Body}]
>         at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:528)
>         at
> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:63)
>         at
> org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:192)
>         at
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106)
>         at
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112)
>         at
> org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61)
>         at
> org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55)
>         at
> org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:500)
>         at
> org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:213)
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:909)
>         ... 29 more
> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
> resolve endpoint:
> xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
> due to: There are 1 parameters that couldn't be set on the endpoint. Check
> the uri if the parameters are spelt correctly and that they are properties
> of the endpoint. Unknown parameters=[{contentObjectId=Body}]
>         at
> org.apache.camel.impl.DefaultComponent.validateParameters(DefaultComponent.java:189)
>         at
> org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:134)
>         at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:508)
>         ... 38 more
> *************************************
> [INFO] Total time: 24.905s
> [INFO] Finished at: Sat Sep 28 13:09:50 EEST 2013
> [INFO] Final Memory: 26M/63M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.camel:camel-maven-plugin:2.9.0:run
> (default-cli) on project TABS2NTHLR: null: MojoExecutionException:
> InvocationTargetException: org.apache.camel.FailedToCreateRouteException:
> Failed to create route route1 at: >>>
> To[xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&addKeyInfoReference=true&transformMethods=#NoCommTrans&contentObjectId=Body]
> <<< in route:
> Route(route1)[[From[mina:tcp://0.0.0.0:8899?textline=true&mi... because of
> Failed to resolve endpoint:
> xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
> due to: Failed to resolve endpoint:
> xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
> due to: There are 1 parameters that couldn't be set on the endpoint. Check
> the uri if the parameters are spelt correctly and that they are properties
> of the endpoint. Unknown parameters=[{contentObjectId=Body}] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> [                      Thread-1] MainSupport$HangupInterceptor  INFO
> Received hang up - stopping the main instance.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740348.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: contentObjectId in XML Security (camel-xmlsecurity)

Posted by atiato <om...@its.ws>.
Dear Clause,,

it raises the below error when using small letter.

<to
			
uri="xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&amp;addKeyInfoReference=true&amp;transformMethods=#NoCommTrans&amp;contentObjectId=Body"
/>

			<convertBodyTo type="String" />

pom.xml :

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-xmlsecurity</artifactId>
    <version>${camel.version}</version>
    
</dependency>

<camel.version>2.12.1</camel.version>

I think we have to Open JIRA for this and for the error when when setting
the header CamelXmlSignatureContentReferenceUri which I explained in the
previous messages.

Kindly find below stack error when using small letter contentObjectId :


*************************************
Error occurred while running main from: org.apache.camel.spring.Main
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:416)
	at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route route1
at: >>>
To[xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&addKeyInfoReference=true&transformMethods=#NoCommTrans&contentObjectId=Body]
<<< in route:
Route(route1)[[From[mina:tcp://0.0.0.0:8899?textline=true&mi... because of
Failed to resolve endpoint:
xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
due to: Failed to resolve endpoint:
xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
due to: *There are 1 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown parameters=[{contentObjectId=Body}]*
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1344)
	at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)
	at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:301)
	at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
	at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
	at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:186)
	at org.apache.camel.spring.Main.doStart(Main.java:140)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at org.apache.camel.main.MainSupport.run(MainSupport.java:148)
	at org.apache.camel.main.MainSupport.run(MainSupport.java:343)
	at org.apache.camel.spring.Main.main(Main.java:73)
	... 6 more
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
route route1 at: >>>
To[xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&addKeyInfoReference=true&transformMethods=#NoCommTrans&contentObjectId=Body]
<<< in route:
Route(route1)[[From[mina:tcp://0.0.0.0:8899?textline=true&mi... because of
Failed to resolve endpoint:
xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
due to: Failed to resolve endpoint:
xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
due to: There are 1 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown parameters=[{contentObjectId=Body}]
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:912)
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:177)
	at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
	at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1670)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1544)
	at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:179)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1512)
	at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:228)
	at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:118)
	... 19 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint:
xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
due to: Failed to resolve endpoint:
xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
due to: There are 1 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown parameters=[{contentObjectId=Body}]
	at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:528)
	at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:63)
	at
org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:192)
	at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106)
	at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112)
	at
org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61)
	at
org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55)
	at
org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:500)
	at
org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:213)
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:909)
	... 29 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint:
xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
due to: There are 1 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown parameters=[{contentObjectId=Body}]
	at
org.apache.camel.impl.DefaultComponent.validateParameters(DefaultComponent.java:189)
	at
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:134)
	at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:508)
	... 38 more
*************************************
[INFO] Total time: 24.905s
[INFO] Finished at: Sat Sep 28 13:09:50 EEST 2013
[INFO] Final Memory: 26M/63M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.camel:camel-maven-plugin:2.9.0:run
(default-cli) on project TABS2NTHLR: null: MojoExecutionException:
InvocationTargetException: org.apache.camel.FailedToCreateRouteException:
Failed to create route route1 at: >>>
To[xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&addKeyInfoReference=true&transformMethods=#NoCommTrans&contentObjectId=Body]
<<< in route:
Route(route1)[[From[mina:tcp://0.0.0.0:8899?textline=true&mi... because of
Failed to resolve endpoint:
xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
due to: Failed to resolve endpoint:
xmlsecurity://sign://enveloped?addKeyInfoReference=true&contentObjectId=Body&keyAccessor=%23accessorRsa&transformMethods=%23NoCommTrans
due to: There are 1 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown parameters=[{contentObjectId=Body}] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[                      Thread-1] MainSupport$HangupInterceptor  INFO 
Received hang up - stopping the main instance.



--
View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740348.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: contentObjectId in XML Security (camel-xmlsecurity)

Posted by atiato <om...@its.ws>.
I will try again in small letter and get back to you ...I remember I did both
and it didn't work .



--
View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740346.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: contentObjectId in XML Security (camel-xmlsecurity)

Posted by atiato <om...@its.ws>.
contentObjectId is used to change the reference URI and apply it during
signing of the message .

Well I want to sign XML message using camel-xmlsecurity and I have change
the code for this component to Sign the message .

the Question should I open JIRA for the exception when using the Header of
Content reference URI ?

thanks,
Omar Atia



--
View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740307.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: contentObjectId in XML Security (camel-xmlsecurity)

Posted by Colm O hEigeartaigh <co...@apache.org>.
What is "contentObjectId"? What do you want to achieve?

Colm.


On Thu, Sep 26, 2013 at 5:54 PM, atiato <om...@its.ws> wrote:

> Dears ,
>
> Please let me know how to fill contentObjectId  when signing XML messages.
>
> Please example I already searched github and sources and didn't have the
> luck to find any .
>
> Thanks,
> Omar Atia
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

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

Re: contentObjectId in XML Security (camel-xmlsecurity)

Posted by atiato <om...@its.ws>.
I added the following :


 <setHeader headerName="CamelXmlSignatureContentReferenceUri">
			<constant>#Body</constant>
</setHeader>

	<to
			
uri="xmlsecurity:sign://enveloped?keyAccessor=#accessorRsa&amp;addKeyInfoReference=true&amp;transformMethods=#NoCommTrans"
/>
			<convertBodyTo type="String" />



it raises the following exception :

org.apache.camel.component.xmlsecurity.api.XmlSignatureException:
javax.xml.crypto.dsig.XMLSignatureException:
javax.xml.crypto.URIReferenceException:
org.apache.xml.security.utils.resolver.ResourceResolverException: Cannot
resolve element with ID Body
	at
org.apache.camel.component.xmlsecurity.processor.XmlSignerProcessor.sign(XmlSignerProcessor.java:269)[camel-xmlsecurity-2.12.1.jar:2.12.1]
	at
org.apache.camel.component.xmlsecurity.processor.XmlSignerProcessor.process(XmlSignerProcessor.java:198)[camel-xmlsecurity-2.12.1.jar:2.12.1]
	at
org.apache.camel.component.xmlsecurity.XmlSignatureProducer.process(XmlSignatureProducer.java:39)[camel-xmlsecurity-2.12.1.jar:2.12.1]
	at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.12.1.jar:2.12.1]
	at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)[camel-core-2.12.1.jar:2.12.1]
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.1.jar:2.12.1]
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.1.jar:2.12.1]
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.1.jar:2.12.1]








--
View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740268.html
Sent from the Camel - Users mailing list archive at Nabble.com.