Grails-Plugin-Consortium / grails-cxf

CXF Plugin for the Grails web framework
http://grails.org/plugin/cxf
38 stars 46 forks source link

Cannot create SSL handshake after install CXF plugin #41

Closed Manas101 closed 8 years ago

Manas101 commented 10 years ago

Hi, I have a problem after install cxf plugin (v2.0.1). We use a standard java jar file from lib folder. In java source code we connect to WS via certificate. Everything is fine until we installed cxf plugin.

We have unit test and just call one static method from jar file. Complete ssl settings (cert, keystore) is configured in jar (that's mean there is ). Call unit test without installed cxf plugin is OK, after install cxf plugin got an error:

Caused by: javax.net.ssl.SSLHandshakeException: SSLHandshakeException invoking https://some_url Received fatal alert: handshake_failure What is difference between call our method from external jar with and without installed cxf plugin? Some keystore settings?

Thanks a lot. Jiri Sojka

ctoestreich commented 10 years ago

More than likely it is a version conflict with the security jars. I would look at the WSS jar that gets pulled in and see if you are on a newer or older version of that or one of it's deps. You should be able to generate a dep graph from grails command grails dependency-report

Manas101 commented 10 years ago

Hi, here is my complete dep graph

|Environment set to development . build - Dependencies for the build system only (total: 34) +--- xalan:serializer:2.7.1 +--- org.grails:grails-bootstrap:2.3.11 | --- org.slf4j:jcl-over-slf4j:1.7.5 | --- org.slf4j:slf4j-api:1.7.5 | --- jline:jline:2.12 | --- org.apache.ant:ant:1.8.4 | --- org.apache.ant:ant-launcher:1.8.4 | --- org.apache.ant:ant-trax:1.7.1 | --- net.java.dev.jna:jna:4.0.0 | --- org.apache.ant:ant-junit:1.8.4 | --- org.codehaus.gant:gant_groovy1.8:1.9.6 | --- org.apache.ivy:ivy:2.3.0 | --- org.fusesource.jansi:jansi:1.11 +--- org.grails:grails-scripts:2.3.11 | --- org.spockframework:spock-core:0.7-groovy-2.0 | --- org.hamcrest:hamcrest-core:1.3 | --- junit:junit:4.11 +--- org.grails:grails-docs:2.3.11 | --- org.xhtmlrenderer:core-renderer:R8 | --- org.yaml:snakeyaml:1.8 | --- org.grails:grails-gdoc-engine:1.0.1 | --- com.lowagie:itext:2.0.8 | --- bouncycastle:bcmail-jdk14:138 | --- bouncycastle:bcprov-jdk14:138 | --- commons-lang:commons-lang:2.6 +--- org.grails.plugins:tomcat8:8.0.5 | --- org.apache.tomcat.embed:tomcat-embed-el:8.0.5 | --- org.apache.tomcat.embed:tomcat-embed-jasper:8.0.5 | --- org.apache.tomcat.embed:tomcat-embed-logging-log4j:8.0.5 | --- org.apache.tomcat.embed:tomcat-embed-logging-juli:8.0.5 | --- org.apache.tomcat.embed:tomcat-embed-websocket:8.0.5 | --- org.eclipse.jdt.core.compiler:ecj:4.2.2 | --- org.apache.tomcat.embed:tomcat-embed-core:8.0.5 | --- javax.servlet:javax.servlet-api:3.1.0

provided - Dependencies needed at development time, but not during deployment (total: 1) +--- javax.servlet:javax.servlet-api:3.0.1

compile - Dependencies placed on the classpath for compilation (total: 109) +--- org.codehaus.groovy:groovy-all:2.1.9 +--- org.grails:grails-plugin-rest:2.3.11 | --- org.slf4j:jcl-over-slf4j:1.7.5 | --- org.slf4j:slf4j-api:1.7.5 | --- org.grails:grails-plugin-datasource:2.3.11 | --- org.springframework:spring-jdbc:3.2.9.RELEASE | --- org.apache.tomcat:tomcat-jdbc:7.0.50 | --- org.apache.tomcat:tomcat-juli:7.0.50 | --- org.springframework:spring-context:3.2.9.RELEASE | --- org.grails:grails-web:2.3.11 | --- org.springframework:spring-webmvc:3.2.9.RELEASE | --- org.grails:grails-databinding:2.3.11 | --- commons-fileupload:commons-fileupload:1.3.1 | --- opensymphony:sitemesh:2.4 | --- org.springframework:spring-context-support:3.2.9.RELEASE | --- xpp3:xpp3_min:1.1.4c | --- commons-el:commons-el:1.0 | --- commons-beanutils:commons-beanutils:1.8.3 | --- org.objenesis:objenesis:1.4 | --- org.grails:grails-spring:2.3.11 | --- com.google.code.gson:gson:2.2.4 | --- org.grails:grails-plugin-controllers:2.3.11 | --- org.grails:grails-plugin-validation:2.3.11 +--- org.grails:grails-plugin-databinding:2.3.11 | --- org.grails:grails-core:2.3.11 | --- org.springframework:spring-web:3.2.9.RELEASE | --- aopalliance:aopalliance:1.0 | --- asm:asm:3.3.1 | --- commons-validator:commons-validator:1.3.1 | --- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final | --- org.grails:grails-bootstrap:2.3.11 | --- org.springframework:spring-core:3.2.9.RELEASE | --- org.springframework:spring-beans:3.2.9.RELEASE +--- org.grails:grails-plugin-i18n:2.3.11 | --- commons-lang:commons-lang:2.6 +--- org.grails:grails-plugin-filters:2.3.11 +--- org.grails:grails-plugin-gsp:2.3.11 | --- org.grails:grails-logging:2.3.11 | --- org.grails:grails-plugin-codecs:2.3.11 | --- commons-codec:commons-codec:1.6 +--- org.grails:grails-plugin-log4j:2.3.11 | --- org.slf4j:jul-to-slf4j:1.7.5 +--- org.grails:grails-plugin-services:2.3.11 | --- org.springframework:spring-tx:3.2.9.RELEASE +--- org.grails:grails-plugin-servlets:2.3.11 +--- org.grails:grails-plugin-url-mappings:2.3.11 | --- commons-io:commons-io:2.2 | --- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.3.1 +--- org.grails:grails-plugin-async:2.3.11 | --- org.grails:grails-async:2.3.11 | --- org.codehaus.gpars:gpars:1.1.0 | --- org.multiverse:multiverse-core:0.7.0 | --- org.codehaus.jsr166-mirror:jsr166y:1.7.0 +--- org.grails.plugins:scaffolding:2.0.3 +--- org.grails.plugins:cache:1.1.7 | --- org.javassist:javassist:3.17.1-GA | --- org.grails.plugins:webxml:1.4.1 +--- org.grails.plugins:camunda:0.2.0 | --- org.camunda.bpm:camunda-engine:7.1.0-Final | --- org.apache.commons:commons-email:1.2 | --- javax.mail:mail:1.4.1 | --- javax.activation:activation:1.1 | --- org.mybatis:mybatis:3.1.1 | --- joda-time:joda-time:2.1 | --- org.camunda.bpm.model:camunda-bpmn-model:7.1.0-Final | --- org.camunda.bpm.model:camunda-xml-model:7.1.0-Final +--- org.grails.plugins:spring-security-core:2.0-RC3 | --- org.springframework.security:spring-security-core:3.2.3.RELEASE | --- org.springframework.security:spring-security-web:3.2.3.RELEASE +--- org.grails.plugins:fixtures:1.3 +--- org.grails.plugins:build-test-data:2.1.2 | --- dk.brics.automaton:automaton:1.11-8 +--- org.grails.plugins:cxf:2.0.1 | --- com.sun.xml.bind:jaxb-impl:2.2.6 | --- com.sun.xml.bind:jaxb-xjc:2.2.6 | --- org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:2.6.6 | --- org.apache.cxf:cxf-tools-common:2.6.6 | --- org.apache.cxf:cxf-tools-wsdlto-core:2.6.6 | --- org.apache.cxf:cxf-tools-validator:2.6.6 | --- org.apache.ws.xmlschema:xmlschema-core:2.0.3 | --- org.apache.cxf:cxf-rt-core:2.6.6 | --- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1 | --- org.apache.cxf:cxf-api:2.6.6 | --- org.apache.velocity:velocity:1.7 | --- wsdl4j:wsdl4j:1.6.2 | --- org.apache.cxf:cxf-rt-frontend-jaxws:2.6.6 | --- xml-resolver:xml-resolver:1.2 | --- org.apache.cxf:cxf-rt-bindings-soap:2.6.6 | --- org.apache.cxf:cxf-rt-databinding-jaxb:2.6.6 | --- org.apache.cxf:cxf-rt-bindings-xml:2.6.6 | --- org.apache.cxf:cxf-rt-frontend-simple:2.6.6 | --- org.apache.cxf:cxf-rt-transports-http:2.6.6 | --- org.apache.cxf:cxf-rt-ws-addr:2.6.6 | --- org.apache.cxf:cxf-rt-ws-policy:2.6.6 | --- org.apache.neethi:neethi:3.0.2 | --- org.springframework:spring-expression:4.0.5.RELEASE | --- commons-cli:commons-cli:1.2 | --- org.apache.cxf:cxf-rt-frontend-jaxrs:2.6.6 | --- javax.ws.rs:jsr311-api:1.1.1 | --- org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:2.6.6 | --- org.springframework:spring-aop:4.0.5.RELEASE

runtime - Dependencies needed at runtime but not for compilation (total: 144) +--- org.codehaus.groovy:groovy-all:2.1.9 +--- org.grails:grails-plugin-rest:2.3.11 | --- org.slf4j:jcl-over-slf4j:1.7.5 | --- org.slf4j:slf4j-api:1.7.5 | --- org.grails:grails-plugin-datasource:2.3.11 | --- org.springframework:spring-jdbc:3.2.9.RELEASE | --- org.apache.tomcat.embed:tomcat-embed-logging-log4j:7.0.50 | --- org.apache.tomcat:tomcat-jdbc:7.0.50 | --- org.apache.tomcat:tomcat-juli:7.0.50 | --- org.springframework:spring-context:3.2.9.RELEASE | --- org.grails:grails-web:2.3.11 | --- taglibs:standard:1.1.2 | --- org.aspectj:aspectjweaver:1.7.4 | --- org.springframework:spring-webmvc:3.2.9.RELEASE | --- org.grails:grails-databinding:2.3.11 | --- commons-fileupload:commons-fileupload:1.3.1 | --- opensymphony:sitemesh:2.4 | --- org.springframework:spring-aspects:3.2.9.RELEASE | --- org.aspectj:aspectjrt:1.7.4 | --- org.springframework:spring-context-support:3.2.9.RELEASE | --- xpp3:xpp3_min:1.1.4c | --- javax.servlet:jstl:1.1.2 | --- commons-el:commons-el:1.0 | --- commons-beanutils:commons-beanutils:1.8.3 | --- org.objenesis:objenesis:1.4 | --- org.grails:grails-spring:2.3.11 | --- com.google.code.gson:gson:2.2.4 | --- org.grails:grails-plugin-controllers:2.3.11 | --- org.grails:grails-plugin-validation:2.3.11 +--- org.grails:grails-plugin-databinding:2.3.11 | --- org.grails:grails-core:2.3.11 | --- xalan:serializer:2.7.1 | --- oro:oro:2.0.8 | --- org.springframework:spring-web:3.2.9.RELEASE | --- aopalliance:aopalliance:1.0 | --- asm:asm:3.3.1 | --- commons-validator:commons-validator:1.3.1 | --- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final | --- cglib:cglib:2.2.2 | --- org.grails:grails-bootstrap:2.3.11 | --- org.springframework:spring-core:3.2.9.RELEASE | --- org.springframework:spring-beans:3.2.9.RELEASE +--- org.grails:grails-plugin-i18n:2.3.11 | --- commons-lang:commons-lang:2.6 +--- org.grails:grails-plugin-filters:2.3.11 +--- org.grails:grails-plugin-gsp:2.3.11 | --- org.grails:grails-logging:2.3.11 | --- org.grails:grails-plugin-codecs:2.3.11 | --- commons-codec:commons-codec:1.6 +--- org.grails:grails-plugin-log4j:2.3.11 | --- org.slf4j:jul-to-slf4j:1.7.5 +--- org.grails:grails-plugin-services:2.3.11 | --- org.springframework:spring-tx:3.2.9.RELEASE +--- org.grails:grails-plugin-servlets:2.3.11 +--- org.grails:grails-plugin-url-mappings:2.3.11 | --- commons-io:commons-io:2.2 | --- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.3.1 +--- org.grails:grails-plugin-async:2.3.11 | --- org.grails:grails-async:2.3.11 | --- org.codehaus.gpars:gpars:1.1.0 | --- org.multiverse:multiverse-core:0.7.0 | --- org.codehaus.jsr166-mirror:jsr166y:1.7.0 +--- com.h2database:h2:1.3.176 +--- log4j:log4j:1.2.17 +--- org.grails:grails-resources:2.3.11 +--- org.grails.plugins:scaffolding:2.0.3 +--- org.grails.plugins:cache:1.1.7 | --- org.javassist:javassist:3.17.1-GA | --- org.grails.plugins:webxml:1.4.1 +--- org.grails.plugins:camunda:0.2.0 | --- org.camunda.bpm:camunda-engine-spring:7.1.0-Final | --- commons-dbcp:commons-dbcp:1.4 | --- commons-pool:commons-pool:1.5.4 | --- org.camunda.bpm:camunda-engine:7.1.0-Final | --- org.apache.commons:commons-email:1.2 | --- javax.mail:mail:1.4.1 | --- javax.activation:activation:1.1 | --- org.mybatis:mybatis:3.1.1 | --- joda-time:joda-time:2.1 | --- org.camunda.bpm.model:camunda-bpmn-model:7.1.0-Final | --- org.camunda.bpm.model:camunda-xml-model:7.1.0-Final +--- org.grails.plugins:hibernate:3.6.10.16 | --- org.hibernate:hibernate-ehcache:3.6.10.Final | --- net.sf.ehcache:ehcache-core:2.4.8 | --- org.grails:grails-datastore-core:3.1.1.RELEASE | --- javax.transaction:jta:1.1 | --- org.grails:grails-datastore-gorm:3.1.1.RELEASE | --- org.grails:grails-datastore-gorm-hibernate:3.1.1.RELEASE | --- org.grails:grails-datastore-gorm-hibernate-core:3.1.1.RELEASE | --- antlr:antlr:2.7.7 | --- dom4j:dom4j:1.6.1 | --- org.grails:grails-datastore-gorm-plugin-support:3.1.1.RELEASE | --- org.springframework:spring-orm:3.2.8.RELEASE | --- org.grails:grails-datastore-simple:3.1.1.RELEASE | --- commons-collections:commons-collections:3.2.1 | --- org.hibernate:hibernate-core:3.6.10.Final | --- javax.validation:validation-api:1.0.0.GA | --- org.hibernate:hibernate-validator:4.1.0.Final | --- org.hibernate:hibernate-entitymanager:3.6.10.Final | --- org.hibernate:hibernate-commons-annotations:3.2.0.Final +--- org.grails.plugins:database-migration:1.4.0 | --- org.liquibase:liquibase-core:2.0.5 +--- org.grails.plugins:jquery:1.11.1 +--- org.grails.plugins:resources:1.2.8 +--- org.grails.plugins:spring-security-core:2.0-RC3 | --- org.springframework.security:spring-security-core:3.2.3.RELEASE | --- org.springframework.security:spring-security-web:3.2.3.RELEASE +--- org.grails.plugins:fixtures:1.3 +--- org.grails.plugins:build-test-data:2.1.2 | --- dk.brics.automaton:automaton:1.11-8 +--- org.grails.plugins:cxf:2.0.1 | --- com.sun.xml.bind:jaxb-impl:2.2.6 | --- com.sun.xml.bind:jaxb-xjc:2.2.6 | --- org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:2.6.6 | --- org.apache.cxf:cxf-tools-common:2.6.6 | --- org.apache.cxf:cxf-tools-wsdlto-core:2.6.6 | --- org.apache.cxf:cxf-tools-validator:2.6.6 | --- org.apache.ws.xmlschema:xmlschema-core:2.0.3 | --- org.apache.cxf:cxf-rt-core:2.6.6 | --- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1 | --- org.apache.cxf:cxf-api:2.6.6 | --- org.codehaus.woodstox:woodstox-core-asl:4.1.4 | --- org.codehaus.woodstox:stax2-api:3.1.1 | --- org.apache.velocity:velocity:1.7 | --- wsdl4j:wsdl4j:1.6.2 | --- org.apache.cxf:cxf-rt-frontend-jaxws:2.6.6 | --- xml-resolver:xml-resolver:1.2 | --- org.apache.cxf:cxf-rt-bindings-soap:2.6.6 | --- org.apache.cxf:cxf-rt-databinding-jaxb:2.6.6 | --- org.apache.cxf:cxf-rt-bindings-xml:2.6.6 | --- org.apache.cxf:cxf-rt-frontend-simple:2.6.6 | --- org.apache.cxf:cxf-rt-transports-http:2.6.6 | --- org.apache.cxf:cxf-rt-ws-addr:2.6.6 | --- org.apache.cxf:cxf-rt-ws-policy:2.6.6 | --- org.apache.neethi:neethi:3.0.2 | --- org.springframework:spring-expression:4.0.5.RELEASE | --- commons-cli:commons-cli:1.2 | --- org.apache.cxf:cxf-rt-frontend-jaxrs:2.6.6 | --- javax.ws.rs:jsr311-api:1.1.1 | --- org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:2.6.6 | --- org.springframework:spring-aop:4.0.5.RELEASE

test - Dependencies needed for test compilation and execution but not at runtime (total: 152) +--- javax.servlet:javax.servlet-api:3.0.1 +--- org.codehaus.groovy:groovy-all:2.1.9 +--- org.grails:grails-plugin-rest:2.3.11 | --- org.slf4j:jcl-over-slf4j:1.7.5 | --- org.slf4j:slf4j-api:1.7.5 | --- org.grails:grails-plugin-datasource:2.3.11 | --- org.springframework:spring-jdbc:3.2.9.RELEASE | --- org.apache.tomcat.embed:tomcat-embed-logging-log4j:7.0.50 | --- org.apache.tomcat:tomcat-jdbc:7.0.50 | --- org.apache.tomcat:tomcat-juli:7.0.50 | --- org.springframework:spring-context:3.2.9.RELEASE | --- org.grails:grails-web:2.3.11 | --- taglibs:standard:1.1.2 | --- org.aspectj:aspectjweaver:1.7.4 | --- org.springframework:spring-webmvc:3.2.9.RELEASE | --- org.grails:grails-databinding:2.3.11 | --- commons-fileupload:commons-fileupload:1.3.1 | --- opensymphony:sitemesh:2.4 | --- org.springframework:spring-aspects:3.2.9.RELEASE | --- org.aspectj:aspectjrt:1.7.4 | --- org.springframework:spring-context-support:3.2.9.RELEASE | --- xpp3:xpp3_min:1.1.4c | --- javax.servlet:jstl:1.1.2 | --- commons-el:commons-el:1.0 | --- commons-beanutils:commons-beanutils:1.8.3 | --- org.objenesis:objenesis:1.4 | --- org.grails:grails-spring:2.3.11 | --- com.google.code.gson:gson:2.2.4 | --- org.grails:grails-plugin-controllers:2.3.11 | --- org.grails:grails-plugin-validation:2.3.11 +--- org.grails:grails-plugin-databinding:2.3.11 | --- org.grails:grails-core:2.3.11 | --- xalan:serializer:2.7.1 | --- oro:oro:2.0.8 | --- org.springframework:spring-web:3.2.9.RELEASE | --- aopalliance:aopalliance:1.0 | --- asm:asm:3.3.1 | --- commons-validator:commons-validator:1.3.1 | --- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final | --- cglib:cglib:2.2.2 | --- org.grails:grails-bootstrap:2.3.11 | --- org.springframework:spring-core:3.2.9.RELEASE | --- org.springframework:spring-beans:3.2.9.RELEASE +--- org.grails:grails-plugin-i18n:2.3.11 | --- commons-lang:commons-lang:2.6 +--- org.grails:grails-plugin-filters:2.3.11 +--- org.grails:grails-plugin-gsp:2.3.11 | --- org.grails:grails-logging:2.3.11 | --- org.grails:grails-plugin-codecs:2.3.11 | --- commons-codec:commons-codec:1.6 +--- org.grails:grails-plugin-log4j:2.3.11 | --- org.slf4j:jul-to-slf4j:1.7.5 +--- org.grails:grails-plugin-services:2.3.11 | --- org.springframework:spring-tx:3.2.9.RELEASE +--- org.grails:grails-plugin-servlets:2.3.11 +--- org.grails:grails-plugin-url-mappings:2.3.11 | --- commons-io:commons-io:2.2 | --- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.3.1 +--- org.grails:grails-plugin-async:2.3.11 | --- org.grails:grails-async:2.3.11 | --- org.codehaus.gpars:gpars:1.1.0 | --- org.multiverse:multiverse-core:0.7.0 | --- org.codehaus.jsr166-mirror:jsr166y:1.7.0 +--- org.grails:grails-plugin-testing:2.3.11 | --- org.grails:grails-plugin-domain-class:2.3.11 | --- org.grails:grails-plugin-mimetypes:2.3.11 | --- org.grails:grails-plugin-converters:2.3.11 | --- org.grails:grails-test:2.3.11 | --- org.springframework:spring-test:3.2.9.RELEASE +--- org.spockframework:spock-core:0.7-groovy-2.0 | --- org.hamcrest:hamcrest-core:1.3 +--- junit:junit:4.11 +--- com.h2database:h2:1.3.176 +--- log4j:log4j:1.2.17 +--- org.grails:grails-resources:2.3.11 +--- org.grails:grails-datastore-test-support:1.0-grails-2.3 +--- org.grails.plugins:scaffolding:2.0.3 +--- org.grails.plugins:cache:1.1.7 | --- org.javassist:javassist:3.17.1-GA | --- org.grails.plugins:webxml:1.4.1 +--- org.grails.plugins:camunda:0.2.0 | --- org.camunda.bpm:camunda-engine-spring:7.1.0-Final | --- commons-dbcp:commons-dbcp:1.4 | --- commons-pool:commons-pool:1.5.4 | --- org.camunda.bpm:camunda-engine:7.1.0-Final | --- org.apache.commons:commons-email:1.2 | --- javax.mail:mail:1.4.1 | --- javax.activation:activation:1.1 | --- org.mybatis:mybatis:3.1.1 | --- joda-time:joda-time:2.1 | --- org.camunda.bpm.model:camunda-bpmn-model:7.1.0-Final | --- org.camunda.bpm.model:camunda-xml-model:7.1.0-Final +--- org.grails.plugins:hibernate:3.6.10.16 | --- org.hibernate:hibernate-ehcache:3.6.10.Final | --- net.sf.ehcache:ehcache-core:2.4.8 | --- org.grails:grails-datastore-core:3.1.1.RELEASE | --- javax.transaction:jta:1.1 | --- org.grails:grails-datastore-gorm:3.1.1.RELEASE | --- org.grails:grails-datastore-gorm-hibernate:3.1.1.RELEASE | --- org.grails:grails-datastore-gorm-hibernate-core:3.1.1.RELEASE | --- antlr:antlr:2.7.7 | --- dom4j:dom4j:1.6.1 | --- org.grails:grails-datastore-gorm-plugin-support:3.1.1.RELEASE | --- org.springframework:spring-orm:3.2.8.RELEASE | --- org.grails:grails-datastore-simple:3.1.1.RELEASE | --- commons-collections:commons-collections:3.2.1 | --- org.hibernate:hibernate-core:3.6.10.Final | --- javax.validation:validation-api:1.0.0.GA | --- org.hibernate:hibernate-validator:4.1.0.Final | --- org.hibernate:hibernate-entitymanager:3.6.10.Final | --- org.hibernate:hibernate-commons-annotations:3.2.0.Final +--- org.grails.plugins:database-migration:1.4.0 | --- org.liquibase:liquibase-core:2.0.5 +--- org.grails.plugins:jquery:1.11.1 +--- org.grails.plugins:resources:1.2.8 +--- org.grails.plugins:spring-security-core:2.0-RC3 | --- org.springframework.security:spring-security-core:3.2.3.RELEASE | --- org.springframework.security:spring-security-web:3.2.3.RELEASE +--- org.grails.plugins:fixtures:1.3 +--- org.grails.plugins:build-test-data:2.1.2 | --- dk.brics.automaton:automaton:1.11-8 +--- org.grails.plugins:cxf:2.0.1 | --- com.sun.xml.bind:jaxb-impl:2.2.6 | --- com.sun.xml.bind:jaxb-xjc:2.2.6 | --- org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:2.6.6 | --- org.apache.cxf:cxf-tools-common:2.6.6 | --- org.apache.cxf:cxf-tools-wsdlto-core:2.6.6 | --- org.apache.cxf:cxf-tools-validator:2.6.6 | --- org.apache.ws.xmlschema:xmlschema-core:2.0.3 | --- org.apache.cxf:cxf-rt-core:2.6.6 | --- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1 | --- org.apache.cxf:cxf-api:2.6.6 | --- org.codehaus.woodstox:woodstox-core-asl:4.1.4 | --- org.codehaus.woodstox:stax2-api:3.1.1 | --- org.apache.velocity:velocity:1.7 | --- wsdl4j:wsdl4j:1.6.2 | --- org.apache.cxf:cxf-rt-frontend-jaxws:2.6.6 | --- xml-resolver:xml-resolver:1.2 | --- org.apache.cxf:cxf-rt-bindings-soap:2.6.6 | --- org.apache.cxf:cxf-rt-databinding-jaxb:2.6.6 | --- org.apache.cxf:cxf-rt-bindings-xml:2.6.6 | --- org.apache.cxf:cxf-rt-frontend-simple:2.6.6 | --- org.apache.cxf:cxf-rt-transports-http:2.6.6 | --- org.apache.cxf:cxf-rt-ws-addr:2.6.6 | --- org.apache.cxf:cxf-rt-ws-policy:2.6.6 | --- org.apache.neethi:neethi:3.0.2 | --- org.springframework:spring-expression:4.0.5.RELEASE | --- commons-cli:commons-cli:1.2 | --- org.apache.cxf:cxf-rt-frontend-jaxrs:2.6.6 | --- javax.ws.rs:jsr311-api:1.1.1 | --- org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:2.6.6 | --- org.springframework:spring-aop:4.0.5.RELEASE

Manas101 commented 10 years ago

OK so i compared graph with and without cxf plugin. There are two jars more without cxf plugin: --- org.springframework:spring-expression:3.2.8.RELEASE --- org.springframework:spring-aop:3.2.9.RELEASE

With installed cxf plugin there are all from cxf part: +--- org.grails.plugins:cxf:2.0.1 | --- com.sun.xml.bind:jaxb-impl:2.2.6 | --- com.sun.xml.bind:jaxb-xjc:2.2.6 | --- org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:2.6.6 | --- org.apache.cxf:cxf-tools-common:2.6.6 | --- org.apache.cxf:cxf-tools-wsdlto-core:2.6.6 | --- org.apache.cxf:cxf-tools-validator:2.6.6 | --- org.apache.ws.xmlschema:xmlschema-core:2.0.3 | --- org.apache.cxf:cxf-rt-core:2.6.6 | --- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1 | --- org.apache.cxf:cxf-api:2.6.6 | --- org.codehaus.woodstox:woodstox-core-asl:4.1.4 | --- org.codehaus.woodstox:stax2-api:3.1.1 | --- org.apache.velocity:velocity:1.7 | --- wsdl4j:wsdl4j:1.6.2 | --- org.apache.cxf:cxf-rt-frontend-jaxws:2.6.6 | --- xml-resolver:xml-resolver:1.2 | --- org.apache.cxf:cxf-rt-bindings-soap:2.6.6 | --- org.apache.cxf:cxf-rt-databinding-jaxb:2.6.6 | --- org.apache.cxf:cxf-rt-bindings-xml:2.6.6 | --- org.apache.cxf:cxf-rt-frontend-simple:2.6.6 | --- org.apache.cxf:cxf-rt-transports-http:2.6.6 | --- org.apache.cxf:cxf-rt-ws-addr:2.6.6 | --- org.apache.cxf:cxf-rt-ws-policy:2.6.6 | --- org.apache.neethi:neethi:3.0.2 | --- org.springframework:spring-expression:4.0.5.RELEASE | --- commons-cli:commons-cli:1.2 | --- org.apache.cxf:cxf-rt-frontend-jaxrs:2.6.6 | --- javax.ws.rs:jsr311-api:1.1.1 | --- org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:2.6.6 | --- org.springframework:spring-aop:4.0.5.RELEASE

I tried exclude some jars from plugin, but test failed... Any idea?

Thanks a lot.

ctoestreich commented 10 years ago

What version of grails are you on?

Manas101 commented 10 years ago

Grails 2.3.11

ctoestreich commented 10 years ago

The 2.0.1 version of the plugin only works with grails 2.4+. Try using runtime(":cxf:1.1.4") as this was the last version that was 2.3 compatible

Manas101 commented 10 years ago

I tried it but got the same error Caused by: javax.net.ssl.SSLHandshakeException: SSLHandshakeException invoking https://url: Received fatal alert: handshake_failure

problem is, that i tried it with Grails 2.4.3 with the same result...

ctoestreich commented 10 years ago

Is the url you are trying to access a public or private soap endpoint? Wondering if I can try and recreate or if it is something that is secure and I would be unable to tests against.

ctoestreich commented 10 years ago

One guess would be cxf might be overriding any keystore config that your jar in the lib dir is using. You could try setting up cxf with a dummy service that uses the correct keystore file/location and see if that fixes the issue.

https://cxf.apache.org/docs/ws-security.html

You can try something like this in your bootstrap along with creating a server.properties file with your updated properties in the conf dir.

server.properties

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=amex123
org.apache.ws.security.crypto.merlin.keystore.file=server_keystore.jks

BootStrap.groovy

import grails.converters.JSON
import grails.converters.XML
import org.apache.cxf.frontend.ServerFactoryBean
import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
import org.apache.ws.security.handler.WSHandlerConstants
import org.codehaus.groovy.grails.web.converters.marshaller.xml.InstanceMethodBasedMarshaller
import org.grails.cxf.test.soap.simple.SimpleException
import org.grails.cxf.utils.GrailsCxfUtils

class BootStrap {

    def grailsApplication
    ServerFactoryBean annotatedSecureServiceFactory

    def init = { servletContext ->
        GrailsCxfUtils.metaClass.getGrailsApplication = { -> grailsApplication }
        GrailsCxfUtils.metaClass.static.getGrailsApplication = { -> grailsApplication }

        JSON.registerObjectMarshaller(SimpleException) {
            [message: it.message]
        }

        XML.registerObjectMarshaller(new InstanceMethodBasedMarshaller())

//        //Register some wss4j security
        Map<String, Object> inProps = [:]
        inProps.put(WSHandlerConstants.ACTION, "Signature");
        inProps.put(WSHandlerConstants.SIG_PROP_FILE, "server.properties");

        annotatedSecureServiceFactory.getInInterceptors().add(new WSS4JInInterceptor(inProps))
    }
}
ctoestreich commented 10 years ago

You might need to also add one service bean with the web service annotation so that the config in the bootstrap is actually applied.

import org.grails.cxf.utils.GrailsCxfEndpoint

import javax.jws.WebMethod
import javax.jws.WebParam
import javax.jws.WebResult

@GrailsCxfEndpoint
class DummyService {
    @WebMethod(operationName = "foo")
    @WebResult(name = "fooResult")
    String foo(){ "hello" }
}
Manas101 commented 10 years ago

Hi, our WS url is public, but you need be from Czech Republic (it is from our ministry) so you will not be able to create test probably... (our certificate is needed). I need fix this problem with Grails 2.3.11 version and your examples doesn't work fo me.

We use cxf and cxf-client plugin and the "bug" is in both of them. Any another ideas? Or is it better use another plugin for ws? The most advantage is different settings for develop and production environment and dynamic create endpoints... cxf { client { authLdService { wsdl = "docs/wsdl/auth.wsdl"//only used for wsdl2java script target namespace = "cxf.client.ld.auth" ...

Do you have any experiences with it?

Thanks a lot.

Jiri Sojka

Manas101 commented 10 years ago

Hi, we prepared the unit test with and without fail... are you able and helpful for check it please? If you are I will share it via github with details.

Thanks a lot. Jiri Sojka

ctoestreich commented 10 years ago

Sent it to me and I can take a look

ctoestreich commented 10 years ago

you can share it privately with me if you with via private github repo or email it to me at acetrike at gmail dot com

Manas101 commented 10 years ago

I sent an email to you...

JS

Manas101 commented 10 years ago

Hi developers,

can you somebody help with unit test?

Thanks