-
1. Re: migration issue : osgi.wiring.package=org.apache.cxf.ws.security.wss4j)(version>=3.1.0)(!(version>=4.0.0)
jaisha57 Aug 11, 2017 5:36 AM (in response to rdehond)Hi Raymond,
Try installing cxf-ws-security feature into the container. Hope this will solve the problem.
To add more, do check the link below:
Regards,
Jayashankar C
-
2. Re: migration issue : osgi.wiring.package=org.apache.cxf.ws.security.wss4j)(version>=3.1.0)(!(version>=4.0.0)
rdehond Aug 12, 2017 3:32 AM (in response to jaisha57)Hi,
Thanks for the repy! I did what you suggested. Now it looks like it's installed. The features:list shows:
[installed ] [3.1.5.redhat-630187 ] cxf-ws-security cxf-3.1.5.redhat-630187
Unfortunately I still get the error below:
Error executing command: Error starting bundles:
Unable to start bundle 610: Unresolved constraint in bundle com.javainuse.soap-example_blueprint [610]: Unable to resolve 610.0: missing requirement [610.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.cxf.ws.security.wss4j)(version>=3.1.0)(!(version>=4.0.0)))
I am new into this, could you please suggest what could be next to check?
Regards,
Raymond
-
3. Re: migration issue : osgi.wiring.package=org.apache.cxf.ws.security.wss4j)(version>=3.1.0)(!(version>=4.0.0)
rdehond Aug 12, 2017 5:59 AM (in response to rdehond)By the way, I also tried to install some bundles manually which I doubt is necessary.
[ 611] [Installed ] [ ] [ ] [ 80] Apache CXF Runtime WS Security (3.1.5.redhat-630187)
[ 612] [Installed ] [ ] [ ] [ 80] Apache CXF Runtime SAML Security functionality (3.1.5.redhat-630187)
[ 613] [Active ] [ ] [ ] [ 80] Apache CXF Runtime Security functionality (3.1.5.redhat-630187)
But if I do that I run into the next missing requirement:
org.opensaml.saml.common)(version>=3.1.0)(!(version>=4.0.0)))]
Is there a way to this right? installing for example something like a core module that pulls all those dependencies? I would except that cxf-rt-ws-sec should do that :-)
Regards,
Raymond
-
4. Re: migration issue : osgi.wiring.package=org.apache.cxf.ws.security.wss4j)(version>=3.1.0)(!(version>=4.0.0)
jaisha57 Aug 13, 2017 12:48 AM (in response to rdehond)Hi Raymond,
Can you share sample source to further analyze this issue.
Regards,
Jayashankar C
-
5. Re: migration issue : osgi.wiring.package=org.apache.cxf.ws.security.wss4j)(version>=3.1.0)(!(version>=4.0.0)
rdehond Aug 14, 2017 11:38 AM (in response to jaisha57)Hi,
This is my blueprint file. Without ws-security this project works like a charm. Below my pom file as well.
Regards,
Raymond
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<bean class="org.apache.cxf.interceptor.LoggingOutInterceptor" id="loggingOutInterceptor"/>
<bean class="org.apache.cxf.interceptor.LoggingInInterceptor" id="loggingInInterceptor"/>
<bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor" id="wss4jInInterceptor">
<argument>
<map>
<entry key="action" value="UsernameToken Timestamp"/>
<entry key="passwordCallbackClass" value="camelinaction.wssecurity.ServerPasswordCallback"/>
</map>
</argument>
</bean>
<cxf:cxfEndpoint address="/javainuse/test"
endpointName="a:SOATestEndpoint" id="CXFTest"
serviceClass="com.javainuse.SOATestEndpoint"
serviceName="a:SOATestEndpointService" wsdlURL="wsdl/test.wsdl" xmlns:a="http://javainuse.com">
<cxf:inInterceptors>
<ref component-id="loggingInInterceptor"/>
<ref component-id="wss4jInInterceptor"/>
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref component-id="loggingOutInterceptor"/>
</cxf:outInterceptors>
</cxf:cxfEndpoint>
<!-- serviceClass="org.tempuri.CalculatorSoap" -->
<cxf:cxfEndpoint address="http://127.0.0.1:8088/mockCalculatorSoap"
endpointName="s:CalculatorSoap" id="Calc"
serviceClass="org.tempuri.CalculatorSoap"
serviceName="s:Calculator" wsdlURL="wsdl/calc.wsdl" xmlns:s="http://tempuri.org/"/>
<bean class="com.javainuse.beans.CamelProcessor" id="processor"/>
<bean class="com.javainuse.beans.TransformBeanToAdd" id="TransformBeanToAdd"/>
<bean class="com.javainuse.beans.TransformBeanToSoaTestResponse" id="TransformBeanToSoaTestResponse"/>
<bean class="com.javainuse.beans.InsertResponseOutHeaderProcessor" id="InsertResponseOutHeaderProcessor"/>
<bean
class="org.apache.camel.component.cxf.common.header.CxfHeaderFilterStrategy" id="dropAllMessageHeadersStrategy">
<!-- Set relayHeaders to false to drop all SOAP headers -->
<property name="relayHeaders" value="false"/>
</bean>
<!-- The namespace for the camelContext element in Blueprint is 'https://camel.apache.org/schema/blueprint'.
While it is not required to assign id's to the <camelContext/> and <route/>
elements, it is a good idea to set those for runtime management purposes
(logging, JMX MBeans, ...) -->
<camelContext id="camelId" trace="true" xmlns="http://camel.apache.org/schema/blueprint">
<route id="bookTicket" streamCache="false">
<from id="_from1" uri="cxf:bean:CXFTest"/>
<setHeader headerName="operationName" id="_setHeader1">
<constant>Add</constant>
</setHeader>
<setHeader headerName="operationNamespace" id="_setHeader2">
<constant>http://tempuri.org/</constant>
</setHeader>
<bean id="TransformBeanToSoaTestResponse" ref="TransformBeanToSoaTestResponse"/>
<to id="_to1" uri="cxf:bean:Calc?loggingFeatureEnabled=true"/>
<convertBodyTo id="_convertBodyTo2" type="java.lang.String"/>
<bean id="TransformBeanToAdd" ref="TransformBeanToAdd"/>
<bean id="InsertResponseOutHeaderProcessor" ref="InsertResponseOutHeaderProcessor"/>
</route>
</camelContext>
</blueprint>
POM:
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.javainuse</groupId>
<artifactId>soap-example_blueprint</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<properties>
<camel.version>2.17.0.redhat-630187</camel.version>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<version.maven-bundle-plugin>3.2.0</version.maven-bundle-plugin>
<jboss.fuse.bom.version>6.3.0.redhat-187</jboss.fuse.bom.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.fuse.bom</groupId>
<artifactId>jboss-fuse-parent</artifactId>
<version>${jboss.fuse.bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-spring</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>fuse-public-repository</id>
<name>FuseSource Community Release Repository</name>
<url>https://repo.fusesource.com/nexus/content/groups/public</url>
</repository>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>red-hat-ga-repository</id>
<name>Red Hat GA Repository</name>
<url>https://maven.repository.redhat.com/ga</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>fuse-public-repository</id>
<name>FuseSource Community Release Repository</name>
<url>https://repo.fusesource.com/nexus/content/groups/public</url>
</pluginRepository>
<pluginRepository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>red-hat-ga-repository</id>
<name>Red Hat GA Repository</name>
<url>https://maven.repository.redhat.com/ga</url>
</pluginRepository>
</pluginRepositories>
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${version.maven-bundle-plugin}</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>*</Import-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<version>${camel.version}</version>
<configuration>
<fileApplicationContextUri>src/main/resources/META-INF/spring/camel-context.xml</fileApplicationContextUri>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2java</goal>
</goals>
<configuration>
<sourceRoot>${basedir}/src/main/java</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/test.wsdl</wsdl>
</wsdlOption>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/calc.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
-
6. Re: migration issue : osgi.wiring.package=org.apache.cxf.ws.security.wss4j)(version>=3.1.0)(!(version>=4.0.0)
chiochuan1 Aug 21, 2017 10:34 PM (in response to rdehond)Not sure if it help, did you try to add below dependency to your pom?
<dependency>
<groupId>org.apache.wss4j</groupId>
<artifactId>wss4j-ws-security-common</artifactId>
</dependency>