You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Jo...@bgs-ag.de on 2008/07/18 16:22:08 UTC

WS-Stack Apache CXF asks for Axis2-Classes

Hi all,

Step for Step I created a webservice for Apache CXF under Geronimo 2.1.1. 
After implementing and testing I wanted to go on with the implementation 
of WS-Security Features. I tried to do my best using the howto under 
http://cwiki.apache.org/CXF20DOC/ws-security.html

I had to add some more libraries into my WAR-File like
cxf-rt-ws-security-2.0.2-incubator.jar
wss4j-1.5.1.jar
xmlsec-1.3.0.jar

I start Geronimo with the VM-Parameter:
export GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.provider=cxf 
-Dorg.apache.geronimo.saaj.provider=sun" 

And now after if I call my webservice-method, I get the error:
..
Provider org.apache.axis2.saaj.MessageFactoryImpl not found
Provider org.apache.axis2.saaj.SOAPFactoryImpl not found
...

18.07.2008 15:58:02 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: SOAPEXCEPTION
        at 
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOutInterceptor.java:83)
        at 
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOutInterceptor.java:57)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        at $Proxy20.receiveDataDelta(Unknown Source)
        at 
de.mydomain.myproj.replikation.intranet.ws.WSClientImpl.callWebservice(WSClientImpl.java:156)
        at 
de.mydomain.myproj.replikation.intranet.ws.WSClientImpl.readData(WSClientImpl.java:58)
        at 
de.mydomain.myproj.replikation.intranet.ws.WSClientImplTest.testreadData(WSClientImplTest.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: javax.xml.soap.SOAPException: Unable to create message factory 
for SOAP: Provider org.apache.axis2.saaj.MessageFactoryImpl not found
        at 
javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:89)
        at 
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOutInterceptor.java:71)
        ... 30 more
javax.xml.ws.WebServiceException: Cannot create SAAJ factory instance.
        at 
org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl.getSOAPFactory(SOAPBindingImpl.java:118)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:151)
        at $Proxy20.receiveDataDelta(Unknown Source)
        at 
de.mydomain.myproj.replikation.intranet.ws.WSClientImpl.callWebservice(WSClientImpl.java:156)
        at 
de.mydomain.myproj.replikation.intranet.ws.WSClientImpl.readData(WSClientImpl.java:58)
        at 
de.mydomain.myproj.replikation.intranet.ws.WSClientImplTest.testreadData(WSClientImplTest.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory: 
Provider org.apache.axis2.saaj.SOAPFactoryImpl not found
        at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:126)
        at 
org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl.getSOAPFactory(SOAPBindingImpl.java:113)
        ... 25 more

I don't understand why Axis2-Classes are called. Because of a Axis2-Bug I 
have a filter in geronimo-application.xml:

        <sys:hidden-classes>
            <sys:filter>org.apache.axis2</sys:filter>
            <sys:filter>javax.xml.bind</sys:filter>
            <sys:filter>javax.xml.namespace</sys:filter> 
        </sys:hidden-classes>

-Josef

BGS Beratungsgesellschaft 
Software Systemplanung AG 
  
  
  
  
Niederlassung Rhein/Main 
Robert-Koch-Stra�e 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Gesch�ftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 

  

Antwort: Re: Re: Re: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Jo...@bgs-ag.de.
Hi Jarek,

I will open a Geronimo-Bug on the deployment-issue after my 10-days 
holidays.

Concerning the Webservice-Issue I added the Apache CXF-User-List to this 
issue. The error arises on the server, but is not logged there. The 
stacktrace I posted is from the client. I tried to debug the problem but I 
got lost somewhere in Apache CXF. Here the error once more:

Stacktrace:
javax.xml.ws.soap.SOAPFaultException: An error was discovered processing 
the <wsse:Security> header
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
        at $Proxy21.empfangeDatenbestandDelta(Unknown Source)
        at 
de.mypath.ws.OrigReadWSClientImpl.callWebservice(OrigReadWSClientImpl.java:157)
        at 
de.mypath.ws.OrigReadWSClientImpl.leseDatenbestand(OrigReadWSClientImpl.java:61)
        at 
de.mypath.ws.OrigReadWSClientImplTest.testLeseDatenbestand(OrigReadWSClientImplTest.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.apache.cxf.binding.soap.SoapFault: An error was discovered 
processing the <wsse:Security> header
        at 
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:70)
        at 
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:183)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        ... 24 more

Security-Header:
<wsse:Security xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
soap:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
wsu:Id="UsernameToken-25089808">
<wsse:Username>myuser</wsse:Username>
<wsse:Password Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">7/KJXygtxKrfJlI2zv2EFZtND/I=</wsse:Password>

<wsse:Nonce>C0hrjAbVG5snU9PKIM86OA==</wsse:Nonce>
<wsu:Created>2008-08-13T08:34:25.841Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>


Later on I tried the same with another class path for my WS-Client and I 
debugged into WSS4JInInterceptor. I see the Vector wsResult contains 
nothing. So compared with my Security Issue for Geronimo 2.1.1 (and Apache 
CXF 2.0.2) :
http://www.nabble.com/WS-Stack-Apache-CXF-asks-for-Axis2-Classes-tt18530376s134.html

I still have the same problem using WS-Security with the new Version of 
Geronimo 2.1.2 (and Apache CXF 2.0.8)

-Josef





"Jarek Gawor" <jg...@gmail.com> 
13.08.2008 20:09
Bitte antworten an
user@geronimo.apache.org


An
user@geronimo.apache.org
Kopie

Thema
Re: Re: Re: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo






On Wed, Aug 13, 2008 at 4:48 AM,  <Jo...@bgs-ag.de> wrote:
>
> Hi Jarek,
>
> concerning the hot-deployment-stuff, I simpy copy my EAR-File into the
> hot-deployment-directory. Same Procedure as in G 2.1.1, but in G 2.1.2 I 
get
> the NullPointerException. With the console the following procedure 
helps:
>
> 1) Deploy with Redeploy-Flag:
> Deployment failed:
> null
> 2) Deploy without Redeploy-Flag:
> The application was successfully deployed.
> The application was successfully started

This looks like a bug somewhere. Please open a bug on this and the
hot-deployment issue.

> Thank you very much for your SLF4J-advice. My openejb-Installation 
included
> these JAR's. After deleting, the error disappeared. :-))
> Now I feel we solved almost all problems, WS-Call without Security 
works,
> but with Security I get the error:

Any exceptions on the server side or in geronimo.log? I'm not sure I
will be able to help you with this much more since I'm not familiar
with WSS4J or CXF WS-Security support.

Jarek


BGS Beratungsgesellschaft 
Software Systemplanung AG 
  
  
  
  
Niederlassung Rhein/Main 
Robert-Koch-Stra�e 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Gesch�ftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 


  

Antwort: Re: Re: Re: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Jo...@bgs-ag.de.
Hi Jarek,

I will open a Geronimo-Bug on the deployment-issue after my 10-days 
holidays.

Concerning the Webservice-Issue I added the Apache CXF-User-List to this 
issue. The error arises on the server, but is not logged there. The 
stacktrace I posted is from the client. I tried to debug the problem but I 
got lost somewhere in Apache CXF. Here the error once more:

Stacktrace:
javax.xml.ws.soap.SOAPFaultException: An error was discovered processing 
the <wsse:Security> header
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
        at $Proxy21.empfangeDatenbestandDelta(Unknown Source)
        at 
de.mypath.ws.OrigReadWSClientImpl.callWebservice(OrigReadWSClientImpl.java:157)
        at 
de.mypath.ws.OrigReadWSClientImpl.leseDatenbestand(OrigReadWSClientImpl.java:61)
        at 
de.mypath.ws.OrigReadWSClientImplTest.testLeseDatenbestand(OrigReadWSClientImplTest.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.apache.cxf.binding.soap.SoapFault: An error was discovered 
processing the <wsse:Security> header
        at 
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:70)
        at 
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:183)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        ... 24 more

Security-Header:
<wsse:Security xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
soap:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
wsu:Id="UsernameToken-25089808">
<wsse:Username>myuser</wsse:Username>
<wsse:Password Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">7/KJXygtxKrfJlI2zv2EFZtND/I=</wsse:Password>

<wsse:Nonce>C0hrjAbVG5snU9PKIM86OA==</wsse:Nonce>
<wsu:Created>2008-08-13T08:34:25.841Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>


Later on I tried the same with another class path for my WS-Client and I 
debugged into WSS4JInInterceptor. I see the Vector wsResult contains 
nothing. So compared with my Security Issue for Geronimo 2.1.1 (and Apache 
CXF 2.0.2) :
http://www.nabble.com/WS-Stack-Apache-CXF-asks-for-Axis2-Classes-tt18530376s134.html

I still have the same problem using WS-Security with the new Version of 
Geronimo 2.1.2 (and Apache CXF 2.0.8)

-Josef





"Jarek Gawor" <jg...@gmail.com> 
13.08.2008 20:09
Bitte antworten an
user@geronimo.apache.org


An
user@geronimo.apache.org
Kopie

Thema
Re: Re: Re: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo






On Wed, Aug 13, 2008 at 4:48 AM,  <Jo...@bgs-ag.de> wrote:
>
> Hi Jarek,
>
> concerning the hot-deployment-stuff, I simpy copy my EAR-File into the
> hot-deployment-directory. Same Procedure as in G 2.1.1, but in G 2.1.2 I 
get
> the NullPointerException. With the console the following procedure 
helps:
>
> 1) Deploy with Redeploy-Flag:
> Deployment failed:
> null
> 2) Deploy without Redeploy-Flag:
> The application was successfully deployed.
> The application was successfully started

This looks like a bug somewhere. Please open a bug on this and the
hot-deployment issue.

> Thank you very much for your SLF4J-advice. My openejb-Installation 
included
> these JAR's. After deleting, the error disappeared. :-))
> Now I feel we solved almost all problems, WS-Call without Security 
works,
> but with Security I get the error:

Any exceptions on the server side or in geronimo.log? I'm not sure I
will be able to help you with this much more since I'm not familiar
with WSS4J or CXF WS-Security support.

Jarek


BGS Beratungsgesellschaft 
Software Systemplanung AG 
  
  
  
  
Niederlassung Rhein/Main 
Robert-Koch-Stra�e 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Gesch�ftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 


  

Re: Re: Re: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Jarek Gawor <jg...@gmail.com>.
On Wed, Aug 13, 2008 at 4:48 AM,  <Jo...@bgs-ag.de> wrote:
>
> Hi Jarek,
>
> concerning the hot-deployment-stuff, I simpy copy my EAR-File into the
> hot-deployment-directory. Same Procedure as in G 2.1.1, but in G 2.1.2 I get
> the NullPointerException. With the console the following procedure helps:
>
> 1) Deploy with Redeploy-Flag:
> Deployment failed:
> null
> 2) Deploy without Redeploy-Flag:
> The application was successfully deployed.
> The application was successfully started

This looks like a bug somewhere. Please open a bug on this and the
hot-deployment issue.

> Thank you very much for your SLF4J-advice. My openejb-Installation included
> these JAR's. After deleting, the error disappeared. :-))
> Now I feel we solved almost all problems, WS-Call without Security works,
> but with Security I get the error:

Any exceptions on the server side or in geronimo.log? I'm not sure I
will be able to help you with this much more since I'm not familiar
with WSS4J or CXF WS-Security support.

Jarek

Antwort: Re: Re: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Jo...@bgs-ag.de.
Hi Jarek,

concerning the hot-deployment-stuff, I simpy copy my EAR-File into the 
hot-deployment-directory. Same Procedure as in G 2.1.1, but in G 2.1.2 I 
get the NullPointerException. With the console the following procedure 
helps:

1) Deploy with Redeploy-Flag:
Deployment failed:
null
2) Deploy without Redeploy-Flag:
The application was successfully deployed.
The application was successfully started


Thank you very much for your SLF4J-advice. My openejb-Installation 
included these JAR's. After deleting, the error disappeared. :-))
Now I feel we solved almost all problems, WS-Call without Security works, 
but with Security I get the error:

 An error was discovered processing the <wsse:Security> header
{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}InvalidSecurity

Stacktrace:
javax.xml.ws.soap.SOAPFaultException: An error was discovered processing 
the <wsse:Security> header
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
        at $Proxy21.empfangeDatenbestandDelta(Unknown Source)
        at 
de.mypath.ws.OrigReadWSClientImpl.callWebservice(OrigReadWSClientImpl.java:157)
        at 
de.mypath.ws.OrigReadWSClientImpl.leseDatenbestand(OrigReadWSClientImpl.java:61)
        at 
de.mypath.ws.OrigReadWSClientImplTest.testLeseDatenbestand(OrigReadWSClientImplTest.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.apache.cxf.binding.soap.SoapFault: An error was discovered 
processing the <wsse:Security> header
        at 
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:70)
        at 
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:183)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        ... 24 more

Security-Header:
<wsse:Security xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
" soap:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
" wsu:Id="UsernameToken-25089808">
<wsse:Username>myuser</wsse:Username>
<wsse:Password Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest
">7/KJXygtxKrfJlI2zv2EFZtND/I=</wsse:Password>
<wsse:Nonce>C0hrjAbVG5snU9PKIM86OA==</wsse:Nonce>
<wsu:Created>2008-08-13T08:34:25.841Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>

-Josef




"Jarek Gawor" <jg...@gmail.com> 
12.08.2008 19:47
Bitte antworten an
user@geronimo.apache.org


An
user@geronimo.apache.org
Kopie

Thema
Re: Re: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo






On Tue, Aug 12, 2008 at 6:12 AM,  <Jo...@bgs-ag.de> wrote:
>
> Hi Jarek,
>
> this was  very useful, thank you very much. Now I have 2 other problems:
>
> 1) HotDeployment doesn't work any more:
> 11:59:50,155 ERROR [DirectoryHotDeployer] Unable to undeploy
> java.lang.NullPointerException
>         at
> 
org.apache.geronimo.deployment.plugin.ConfigIDExtractor.identifyTargetModuleIDs(ConfigIDExtractor.java:174)
>         at
> 
org.apache.geronimo.deployment.hot.DirectoryHotDeployer.fileUpdated(DirectoryHotDeployer.java:410)
>         at
> 
org.apache.geronimo.deployment.hot.DirectoryMonitor.scanDirectory(DirectoryMonitor.java:382)
>         at
> 
org.apache.geronimo.deployment.hot.DirectoryMonitor.run(DirectoryMonitor.java:216)
>         at java.lang.Thread.run(Thread.java:595)
> -> Using Server Console -  Install New Application I have to try several
> times with Flag 'Redeploy application' set and unset.

I think I've seen something similar... What files to you drop in the
hot deploy directory?

> 2) Trying to access my Webservice using Java Client leads to:
> 12.08.2008 12:02:02 org.apache.cxf.phase.PhaseInterceptorChain 
doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> java.lang.IllegalStateException: Level number 40 is not recognized.
>         at
> org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:529)
>         at
> 
org.apache.commons.logging.impl.SLF4JLocationAwareLog.fatal(SLF4JLocationAwareLog.java:196)
>         at org.apache.xml.security.Init.init(Unknown Source)
>         at 
org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:233)
>         at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:256)
>         at
> org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:265)
>         at
> 
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:89)
>         at
> 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:169)
>         at
> 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:43)
>         at
> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>         at 
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>         at 
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>         at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>         at $Proxy20.receiveDataDelta(Unknown Source)
>         at
> 
de.mypath.quelle.ws.OrigReadWSClientImpl.callWebservice(OrigReadWSClientImpl.java:157)
>         at
> 
de.mypath.quelle.ws.OrigReadWSClientImpl.leseDatenbestand(OrigReadWSClientImpl.java:61)
>         at
> 
de.mypath.quelle.ws.OrigReadWSClientImplTest.testLeseDatenbestand(OrigReadWSClientImplTest.java:33)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
>         at
> 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
>         at
> 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
>         at
> 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
>         at
> 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
>         at
> 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
>         at
> 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
>         at
> 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>         at
> 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
>         at
> 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>         at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>         at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>         at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>         at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> javax.xml.ws.soap.SOAPFaultException: Level number 40 is not recognized.
>         at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
>         at $Proxy20.receiveDataDelta(Unknown Source)
>         at
> 
de.mypath.quelle.ws.OrigReadWSClientImpl.callWebservice(OrigReadWSClientImpl.java:157)
>         at
> 
de.mypath.quelle.ws.OrigReadWSClientImpl.leseDatenbestand(OrigReadWSClientImpl.java:61)
>         at
> 
de.mypath.quelle.ws.OrigReadWSClientImplTest.testLeseDatenbestand(OrigReadWSClientImplTest.java:33)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
>         at
> 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
>         at
> 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
>         at
> 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
>         at
> 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
>         at
> 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
>         at
> 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
>         at
> 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>         at
> 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
>         at
> 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>         at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>         at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>         at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>         at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.lang.IllegalStateException: Level number 40 is not
> recognized.
>         at
> org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:529)
>         at
> 
org.apache.commons.logging.impl.SLF4JLocationAwareLog.fatal(SLF4JLocationAwareLog.java:196)
>         at org.apache.xml.security.Init.init(Unknown Source)
>         at 
org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:233)
>         at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:256)
>         at
> org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:265)
>         at
> 
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:89)
>         at
> 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:169)
>         at
> 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:43)
>         at
> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>         at 
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>         at 
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>         at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>         ... 24 more
>

I've found this:
http://www.mail-archive.com/user@slf4j.org/msg00364.html so you're
might be running into a similar problem. Does your application include
any of the slf4j libraries? If so, try removing them from your
application or try adding a filter for org.slf4j.impl or org.slf4j.

Jarek


BGS Beratungsgesellschaft 
Software Systemplanung AG 
  
  
  
  
Niederlassung Rhein/Main 
Robert-Koch-Stra�e 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Gesch�ftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 

  

Re: Re: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Jarek Gawor <jg...@gmail.com>.
On Tue, Aug 12, 2008 at 6:12 AM,  <Jo...@bgs-ag.de> wrote:
>
> Hi Jarek,
>
> this was  very useful, thank you very much. Now I have 2 other problems:
>
> 1) HotDeployment doesn't work any more:
> 11:59:50,155 ERROR [DirectoryHotDeployer] Unable to undeploy
> java.lang.NullPointerException
>         at
> org.apache.geronimo.deployment.plugin.ConfigIDExtractor.identifyTargetModuleIDs(ConfigIDExtractor.java:174)
>         at
> org.apache.geronimo.deployment.hot.DirectoryHotDeployer.fileUpdated(DirectoryHotDeployer.java:410)
>         at
> org.apache.geronimo.deployment.hot.DirectoryMonitor.scanDirectory(DirectoryMonitor.java:382)
>         at
> org.apache.geronimo.deployment.hot.DirectoryMonitor.run(DirectoryMonitor.java:216)
>         at java.lang.Thread.run(Thread.java:595)
> -> Using Server Console -  Install New Application I have to try several
> times with Flag 'Redeploy application' set and unset.

I think I've seen something similar... What files to you drop in the
hot deploy directory?

> 2) Trying to access my Webservice using Java Client leads to:
> 12.08.2008 12:02:02 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> java.lang.IllegalStateException: Level number 40 is not recognized.
>         at
> org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:529)
>         at
> org.apache.commons.logging.impl.SLF4JLocationAwareLog.fatal(SLF4JLocationAwareLog.java:196)
>         at org.apache.xml.security.Init.init(Unknown Source)
>         at org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:233)
>         at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:256)
>         at
> org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:265)
>         at
> org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:89)
>         at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:169)
>         at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:43)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>         at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>         at $Proxy20.receiveDataDelta(Unknown Source)
>         at
> de.mypath.quelle.ws.OrigReadWSClientImpl.callWebservice(OrigReadWSClientImpl.java:157)
>         at
> de.mypath.quelle.ws.OrigReadWSClientImpl.leseDatenbestand(OrigReadWSClientImpl.java:61)
>         at
> de.mypath.quelle.ws.OrigReadWSClientImplTest.testLeseDatenbestand(OrigReadWSClientImplTest.java:33)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
>         at
> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
>         at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
>         at
> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
>         at
> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
>         at
> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
>         at
> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
>         at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>         at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
>         at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> javax.xml.ws.soap.SOAPFaultException: Level number 40 is not recognized.
>         at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
>         at $Proxy20.receiveDataDelta(Unknown Source)
>         at
> de.mypath.quelle.ws.OrigReadWSClientImpl.callWebservice(OrigReadWSClientImpl.java:157)
>         at
> de.mypath.quelle.ws.OrigReadWSClientImpl.leseDatenbestand(OrigReadWSClientImpl.java:61)
>         at
> de.mypath.quelle.ws.OrigReadWSClientImplTest.testLeseDatenbestand(OrigReadWSClientImplTest.java:33)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
>         at
> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
>         at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
>         at
> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
>         at
> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
>         at
> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
>         at
> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
>         at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>         at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
>         at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.lang.IllegalStateException: Level number 40 is not
> recognized.
>         at
> org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:529)
>         at
> org.apache.commons.logging.impl.SLF4JLocationAwareLog.fatal(SLF4JLocationAwareLog.java:196)
>         at org.apache.xml.security.Init.init(Unknown Source)
>         at org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:233)
>         at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:256)
>         at
> org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:265)
>         at
> org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:89)
>         at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:169)
>         at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:43)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>         at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>         ... 24 more
>

I've found this:
http://www.mail-archive.com/user@slf4j.org/msg00364.html so you're
might be running into a similar problem. Does your application include
any of the slf4j libraries? If so, try removing them from your
application or try adding a filter for org.slf4j.impl or org.slf4j.

Jarek

Antwort: Re: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Jo...@bgs-ag.de.
Hi Jarek,

this was  very useful, thank you very much. Now I have 2 other problems:

1) HotDeployment doesn't work any more:
11:59:50,155 ERROR [DirectoryHotDeployer] Unable to undeploy
java.lang.NullPointerException
        at 
org.apache.geronimo.deployment.plugin.ConfigIDExtractor.identifyTargetModuleIDs(ConfigIDExtractor.java:174)
        at 
org.apache.geronimo.deployment.hot.DirectoryHotDeployer.fileUpdated(DirectoryHotDeployer.java:410)
        at 
org.apache.geronimo.deployment.hot.DirectoryMonitor.scanDirectory(DirectoryMonitor.java:382)
        at 
org.apache.geronimo.deployment.hot.DirectoryMonitor.run(DirectoryMonitor.java:216)
        at java.lang.Thread.run(Thread.java:595)
-> Using Server Console -  Install New Application I have to try several 
times with Flag 'Redeploy application' set and unset.


2) Trying to access my Webservice using Java Client leads to:
12.08.2008 12:02:02 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.IllegalStateException: Level number 40 is not recognized.
        at 
org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:529)
        at 
org.apache.commons.logging.impl.SLF4JLocationAwareLog.fatal(SLF4JLocationAwareLog.java:196)
        at org.apache.xml.security.Init.init(Unknown Source)
        at org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:233)
        at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:256)
        at 
org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:265)
        at 
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:89)
        at 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:169)
        at 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:43)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        at $Proxy20.receiveDataDelta(Unknown Source)
        at 
de.mypath.quelle.ws.OrigReadWSClientImpl.callWebservice(OrigReadWSClientImpl.java:157)
        at 
de.mypath.quelle.ws.OrigReadWSClientImpl.leseDatenbestand(OrigReadWSClientImpl.java:61)
        at 
de.mypath.quelle.ws.OrigReadWSClientImplTest.testLeseDatenbestand(OrigReadWSClientImplTest.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
javax.xml.ws.soap.SOAPFaultException: Level number 40 is not recognized.
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
        at $Proxy20.receiveDataDelta(Unknown Source)
        at 
de.mypath.quelle.ws.OrigReadWSClientImpl.callWebservice(OrigReadWSClientImpl.java:157)
        at 
de.mypath.quelle.ws.OrigReadWSClientImpl.leseDatenbestand(OrigReadWSClientImpl.java:61)
        at 
de.mypath.quelle.ws.OrigReadWSClientImplTest.testLeseDatenbestand(OrigReadWSClientImplTest.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.IllegalStateException: Level number 40 is not 
recognized.
        at 
org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:529)
        at 
org.apache.commons.logging.impl.SLF4JLocationAwareLog.fatal(SLF4JLocationAwareLog.java:196)
        at org.apache.xml.security.Init.init(Unknown Source)
        at org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:233)
        at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:256)
        at 
org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:265)
        at 
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:89)
        at 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:169)
        at 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:43)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        ... 24 more



 -Josef




"Jarek Gawor" <jg...@gmail.com> 
11.08.2008 16:02
Bitte antworten an
user@geronimo.apache.org


An
user@geronimo.apache.org
Kopie

Thema
Re: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo






Why is the "javax.xml.namespace" package listed in the hidden-classes
element? That's provided by the JVM. See if removing this filter
helps.

Jarek

On Mon, Aug 11, 2008 at 5:22 AM,  <Jo...@bgs-ag.de> wrote:
>
> Hi Jarek,
>
> I deployed using "Console - Install New Applications". I received the
> message:
> The application was successfully deployed.
> The application was successfully started
>
> -> But application didn't start. Log:
> 11:11:02,005 INFO  [JAXWSServiceBuilder] Configuring EJB JAX-WS Web 
Service:
> MyWSImpl at /MyService/MyWS
> 11:11:04,547 ERROR [GBeanInstanceState] Error while starting; GBean is 
now
> in the FAILED state:
> abstractName="myapp/app/1.0/ear?configurationName=myapp/app/1.0/ear"
> org.apache.geronimo.kernel.config.InvalidConfigException: Class not 
loadable
> in classloader: 
[org.apache.geronimo.kernel.config.MultiParentClassLoader
> id=myapp/app/1.0/ear]
>         at
> 
org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(SerializedGBeanState.java:120)
>         at
> 
org.apache.geronimo.kernel.config.SerializedGBeanState.getGBeans(SerializedGBeanState.java:65)
>         at
> 
org.apache.geronimo.kernel.config.ConfigurationData.getGBeans(ConfigurationData.java:172)
>         at
> 
org.apache.geronimo.kernel.config.Configuration.<init>(Configuration.java:278)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at
> 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at 
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at
> 
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
>         at
> 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
>         at
> 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
>         at
> 
org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:541)
>         at
> 
org.apache.geronimo.kernel.basic.BasicKernel.startGBean(BasicKernel.java:361)
>         at
> 
org.apache.geronimo.kernel.config.KernelConfigurationManager.load(KernelConfigurationManager.java:161)
>         at
> 
org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:312)
>         at
> 
org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:280)
>         at
> 
org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:255)
>         at
> 
org.apache.geronimo.kernel.config.KernelConfigurationManager.loadConfiguration(KernelConfigurationManager.java:112)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> 
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>         at
> 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>         at
> 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
>         at
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>         at
> 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
>         at
> 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>         at
> 
org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$8a472d7f.loadConfiguration(<generated>)
>         at
> 
org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:63)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.ClassNotFoundException: Unable to find class used 
in
> GBeanData
> 
myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name=appEJB.jar
>         at
> 
org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:324)
>         at
> org.apache.geronimo.gbean.GBeanData.readExternal(GBeanData.java:247)
>         at
> 
org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(SerializedGBeanState.java:111)
>         ... 30 more
> Caused by: java.lang.ClassNotFoundException: Unable to find class used 
in
> GBeanData
> 
myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name=appEJB.jar,
> attribute: ejbJarInfo
>         at
> 
org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:293)
>         ... 32 more
> Caused by: java.lang.ClassNotFoundException: Could not load class
> javax.xml.namespace.QName from classloader: myapp/app/1.0/ear, destroyed
> state: false
>         at
> org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:213)
>         at
> 
org.apache.geronimo.kernel.ObjectInputStreamExt.resolveClass(ObjectInputStreamExt.java:38)
>         at
> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
>         at
> java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
>         at
> 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
>         at
> 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>         at 
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>         at java.util.ArrayList.readObject(ArrayList.java:591)
>         at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
>         at
> 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
>         at
> 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
>         at
> 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>         at 
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>         at
> 
org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:291)
>         ... 32 more
>
> geronimo-application.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <application application-name="app"
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
>     <sys:environment>
>         <sys:moduleId>
>             <sys:groupId>my-app</sys:groupId>
>             <sys:artifactId>app</sys:artifactId>
>             <sys:version>1.0</sys:version>
>             <sys:type>ear</sys:type>
>         </sys:moduleId>
>         <sys:dependencies>
>             <sys:dependency>
>                 <sys:groupId>console.dbpool</sys:groupId>
>                 <sys:artifactId>Postgres.postgres.app</sys:artifactId>
>                 <sys:version>1.0</sys:version>
>                 <sys:type>rar</sys:type>
>             </sys:dependency>
>         </sys:dependencies>
>         <sys:hidden-classes>
>             <sys:filter>org.apache.axis2</sys:filter>
>             <sys:filter>javax.xml.bind</sys:filter>
>             <sys:filter>javax.xml.namespace</sys:filter>
>         </sys:hidden-classes>
>     </sys:environment>
> </application>
>
> Thanx in advance for your help.
>
> -Josef
>
>
>
>
> "Jarek Gawor" <jg...@gmail.com>
>
> 07.08.2008 19:25
>
> Bitte antworten an
> user@geronimo.apache.org
> An
> user@geronimo.apache.org
> Kopie
> Thema
> Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo
>
>
>
>
> First, you don't need to add xml-apis-1.3.02.jar since the QName class
> is provided by the JVM now (since 1.5). Can you attach the full stack
> trace of the exception you see (when xml-apis-1.3.02.jar is not
> included)? And can you also attach the Geronimo deployment descriptor
> you are using?
>
> Jarek
>
> On Thu, Aug 7, 2008 at 3:39 AM,  <Jo...@bgs-ag.de> wrote:
>>
>> Hi all,
>>
>> this is an issue on the new version 2.1.2 using Webservices. Our
>> application
>> works (without WS-Security) under G 2.1.1, but under G 2.1.2 I can't 
even
>> deploy.
>>
>> -Josef
>>
>>
>>
>>
>> Daniel Kulp <dk...@apache.org>
>>
>> 06.08.2008 19:34
>>
>> An
>> users@cxf.apache.org
>> Kopie
>> Josef.Eisele@bgs-ag.de
>> Thema
>> Re: Antwort: Re: Change Version of Apache CXF for Geronimo
>>
>>
>>
>>
>>
>> That's something you may need to ask on the geronimo list.   I'm not
>> familliar
>> with all the classloading details there.
>>
>> Dan
>>
>>
>> On Wednesday 06 August 2008 3:57:59 am Josef.Eisele@bgs-ag.de wrote:
>>> Hi Dan,
>>>
>>> cool, this is the newest Version of Apache CXF :-)
>>>
>>> So I took my EAR added the new libs (not contained in Geronimo 2.1.2,
>>> why?)
>>>        cxf-rt-ws-security-2.0.8.jar
>>>        wss4j-1.5.4.jar
>>> and tried to deploy to the new Geronimo:
>>>
>>> ...
>>> 09:25:28,770 ERROR [GBeanInstanceState] Error while starting; GBean is
>>> now
>>> in the FAILED state:
>>> abstractName="myapp/app/1.0/ear?configurationName=myapp/app/1.0/ear"
>>> org.apache.geronimo.kernel.config.InvalidConfigException: Class not
>>> loadable in classloader:
>>> [org.apache.geronimo.kernel.config.MultiParentClassLoader
>>> id=myapp/app/1.0/ear]
>>>         at
>>> 
org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(Seria
>>> ...
>>> Caused by: java.lang.ClassNotFoundException: Unable to find class used 
in
>>> GBeanData
>>>
>>>
>>> 
myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name
>>>=MyAppEJB.jar, attribute: ejbJarInfo
>>>         at
>>>
>>>
>>> 
org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData
>>>.java:293) ... 33 more
>>> Caused by: java.lang.ClassNotFoundException: Could not load class
>>> javax.xml.namespace.QName from classloader: myapp/app/1.0/ear, 
destroyed
>>> state: false
>>>         at
>>> 
org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:213)
>>> ...
>>>
>>> So I thought maybe "xml-apis-1.3.02.jar" is missing, but adding to the
>>> EAR
>>> leads to:
>>>
>>> ...
>>> Caused by: java.io.InvalidClassException: javax.xml.namespace.QName;
>>> local
>>> class incompatible: stream classdesc serialVersionUID =
>>> -9120448754896609940, local class serialVersionUID = 
4418622981026545151
>>>         at
>>> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
>>>         at
>>> 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
>>> ...
>>>
>>> I need the QName in my Webservice. What can I do to get my App 
deployed?
>>> Thanx in advance.
>>>
>>> -Josef
>>>
>>>
>>>
>>>
>>> Daniel Kulp <dk...@apache.org>
>>> 05.08.2008 16:42
>>> Bitte antworten an
>>> users@cxf.apache.org
>>>
>>>
>>> An
>>> users@cxf.apache.org
>>> Kopie
>>>
>>> Thema
>>> Re: Change Version of Apache CXF for Geronimo
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> You might want to just try Geronimo 2.1.2.   The vote apparently 
passed
>>> last
>>> night:
>>>
>>>
>>> 
http://www.nabble.com/-VOTE--Geronimo-Server-2.1.2-Release-to18746852s134.h

>>>tml
>>>
>>> so it should be made available shortly.   You can download the
>>> candidates.
>>>
>>> 2.1.2 is using CXF 2.0.8.
>>>
>>>
>>> Dan
>>>
>>> On Tuesday 05 August 2008 6:03:51 am Josef.Eisele@bgs-ag.de wrote:
>>> > Hi Glen,
>>> >
>>> > because I got stuck in solving the problem with Geronimo 2.1.1 and
>>> > included CXF 2.0.2 I thought maybe CXF 2.0.8 solves my problem?
>>> >
>>> > So I tried to change the WS-Stack of my Geronimo from the old 
version
>>> > to
>>> > CXF 2.0.8. I had certain essays:
>>> >
>>> > 1) http://www.jroller.com/gmazza/date/20080612:
>>> > -> In Geronimo is no <prefer-application-packages> available, I 
tried
>>>
>>> with
>>>
>>> > <inverse-classloading/> but I got a lot of problems with the
>>>
>>> classloader.
>>>
>>> > If I added all JARS necessary - see file WHICH_JARS - I got class 
cast
>>> > exceptions, adding a certain minimum leads to NoClassDefError.
>>> > <hidden-classes> or <non-overridable-classes>  won't help?
>>> > 2) Adding CXF under Services - Repository with a dependency-entry in
>>> > the
>>> > deployment plan:
>>> >             <dependency>
>>> >                 <groupId>org.apache.cxf</groupId>
>>> >                 <artifactId>cxf</artifactId>
>>> >                 <version>2.0.8</version>
>>> >                 <type>jar</type>
>>> >             </dependency>
>>> > changed nothing.
>>> > 3) ???
>>> >
>>> > Can you please help?
>>> >
>>> > -Josef
>>> >
>>> >
>>> >
>>> >
>>> > Josef.Eisele@bgs-ag.de
>>> > 04.08.2008 16:09
>>> > Bitte antworten an
>>> > users@cxf.apache.org
>>> >
>>> >
>>> > An
>>> > users@cxf.apache.org
>>> > Kopie
>>> >
>>> > Thema
>>> > Antwort: Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for
>>> > Axis2-Classes
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > Hi Dan,
>>> >
>>> > I checked your blog and I didn't found big differences in the
>>> > code(Server-Part is in my case more JEE5 like - see
>>>
>>>
>>>
>>> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j

>>>
>>> >sr-181-interceptor-annotations-xfire-migration/
>>> >
>>> > ).
>>> >
>>> > The difference I see compared with your blog-example is in the 
request
>>> > itself:
>>> >
>>> > 1) from http://cwiki.apache.org/CXF20DOC/ws-security.html:
>>> >      <wsse:Security
>>> >          xmlns:wsse="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>>
>>> >.0.xsd
>>> >
>>> > "
>>> >          soap:mustUnderstand="1">
>>> >          <wsse:UsernameToken
>>> >             xmlns:wsse="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>>
>>> >.0.xsd
>>> >
>>> > "
>>> >             xmlns:wsu="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>>>
>>> >1.0.xsd
>>> >
>>> > "
>>> >             wsu:Id="UsernameToken-25268096">
>>> >             <wsse:Username
>>> >                xmlns:wsse="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>>
>>> >.0.xsd
>>> >
>>> > ">
>>> >                joe
>>> >             </wsse:Username>
>>> >             <wsse:Password
>>> >                xmlns:wsse="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>>
>>> >.0.xsd
>>> >
>>> > "
>>> >                Type="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>>>
>>> >ile-1.0#PasswordDigest
>>> >
>>> > ">
>>> >                ymyLPVTLrQMBJo82akcw4aBSlJQ=
>>> >             </wsse:Password>
>>> >             <wsse:Nonce
>>> >                xmlns:wsse="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>>
>>> >.0.xsd
>>> >
>>> > ">
>>> >                MK3TTlJxaevzcFaxV/oKyw==
>>> >             </wsse:Nonce>
>>> >             <wsu:Created
>>> >                xmlns:wsu="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>>>
>>> >1.0.xsd
>>> >
>>> > ">
>>> >                2008-07-16T23:05:07.300Z
>>> >             </wsu:Created>
>>> >          </wsse:UsernameToken>
>>> >       </wsse:Security>
>>> >
>>> > 2) my request:
>>> > <wsse:Security
>>> >     xmlns:wsse="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>>
>>> >.0.xsd
>>> >
>>> > "
>>> >     soap:mustUnderstand="1">
>>> >     <wsse:UsernameToken
>>> >         xmlns:wsu="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>>>
>>> >1.0.xsd
>>> >
>>> > "
>>> >         wsu:Id="UsernameToken-12189822">
>>> >     <wsse:Username>
>>> >          blabla
>>> >     </wsse:Username>
>>> >     <wsse:Password
>>> >        Type="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>>>
>>> >ile-1.0#PasswordDigest
>>> >
>>> > ">
>>> >        uIqdbKqsp5VCvM4bPTps1PmnMZI=</wsse:Password>
>>> >     <wsse:Nonce>YmoBKVpJrAjM2P3ss7MUNg==</wsse:Nonce>
>>> >     <wsu:Created>
>>> >        2008-08-04T10:08:15.245Z
>>> >     </wsu:Created>
>>> >    </wsse:UsernameToken>
>>> > </wsse:Security>
>>> >
>>> >
>>> > I miss the namespace
>>> > xmlns:wsse="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>>
>>> >.0.xsd
>>> >
>>> > "
>>> > and not only me but also the WSSecurityUtil.class in line 92:
>>> >
>>> >         list =
>>> > soapHeaderElement.getElementsByTagNameNS(WSConstants.WSSE_NS,
>>> >                 WSConstants.WSSE_LN);
>>> >
>>> > And therefore the method
>>> > public static Element getSecurityHeader(Document doc, String actor,
>>> > SOAPConstants sc) {
>>> >
>>> > results in an null-Element. The class WSSecurityEngine and in the 
end
>>> > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor throws the 
error:
>>> >
>>> > WARNUNG: Request does not contain required Security header
>>> >
>>> > What am I doing wrong with WS-Security 1.1 ???? I have now the 
sources
>>>
>>> for
>>>
>>> > apacche-cxf-2.0.2 and wss4j-1.5.1, if I can debug to a certain step 
let
>>>
>>> me
>>>
>>> > know.
>>> >
>>> > -Josef
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > Glen Mazza <gl...@gmail.com>
>>> > 26.07.2008 03:03
>>> > Bitte antworten an
>>> > users@cxf.apache.org
>>> >
>>> >
>>> > An
>>> > users@cxf.apache.org
>>> > Kopie
>>> >
>>> > Thema
>>> > Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for
>>> > Axis2-Classes
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > Have you checked our documentation on this:
>>> > http://cwiki.apache.org/CXF20DOC/ws-security.html
>>> >
>>> > Also I blogged about this recently, maybe something you can use:
>>> > http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to
>>> >
>>> > HTH,
>>> > Glen
>>> >
>>> > Josef.Eisele wrote:
>>> > > Hi Dan,
>>> > >
>>> > > I solved the last problem copying libraries (xmlsec-1.3.0.jar,
>>> > > wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part 
to
>>> >
>>> > the
>>> >
>>> > > EAR-Part:
>>> > > (WebContent/WEB-INF/lib -> EarContent/lib)
>>> > >
>>> > > One Problem solved another arises:
>>> > >
>>> > > Client writes the SecurityHeader:
>>> > > ..
>>> > > <wsse:Security xmlns:wsse="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>>
>>> >.0.xsd
>>> >
>>> > > " soap:mustUnderstand="1">
>>> > > <wsse:UsernameToken xmlns:wsu="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>>>
>>> >1.0.xsd
>>> >
>>> > > " wsu:Id="UsernameToken-12189822">
>>> > > <wsse:Username>chef</wsse:Username>
>>> > > <wsse:Password Type="
>>>
>>>
>>>
>>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>>>
>>> >ile-1.0#PasswordDigest
>>> >
>>> > > ">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
>>> > > <wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
>>> > > <wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
>>> > > </wsse:UsernameToken>
>>> > > </wsse:Security>
>>> > > ...
>>> > >
>>> > > Server is configured with the interceptor:
>>> > > @InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" 
})
>>> > >
>>> > > In this class I configure 3 Interceptors:
>>> > >         public void handleMessage(Message message) throws Fault {
>>> > >                 Map<String, Object> props = new HashMap<String,
>>> >
>>> > Object>();
>>> >
>>> > >                 props.put(WSHandlerConstants.ACTION,
>>> > > WSHandlerConstants.USERNAME_TOKEN);
>>> > >                 props.put(WSHandlerConstants.PASSWORD_TYPE,
>>> > > WSConstants.PW_DIGEST);
>>> > >                 props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>>> > > ServerPasswordCallback.class.getName());
>>> > >
>>> > >                 WSS4JInInterceptor           wss4jInInterceptor =
>>>
>>> new
>>>
>>> > > WSS4JInInterceptor(props);
>>> > >                 ValidateUserTokenInterceptor userTokenInterceptor 
=
>>>
>>> new
>>>
>>> > > ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);
>>> > >
>>> > >
>>> > > message.getInterceptorChain().add(wss4jInInterceptor);
>>> > >                 //org.apache.cxf.binding.soap.SoapFault: No
>>>
>>> SOAPMessage
>>>
>>> > > DOM was found. Please enable the SAAJInInterceptor.
>>> > >                 message.getInterceptorChain().add(new
>>> > > SAAJInInterceptor());
>>> > >  message.getInterceptorChain().add(userTokenInterceptor);
>>> > >         }
>>> > >
>>> > > UserTokenInterceptor works fine, SAAJInInterceptor is necessary
>>> >
>>> > otherwise
>>> >
>>> > > excepton but now I get an exception on the wss4jInInterceptor:
>>> > >
>>> > > 25.07.2008 13:03:44
>>>
>>> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
>>>
>>> > > handleMessage
>>> > > WARNUNG: Request does not contain required Security header
>>> > > 25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain
>>> >
>>> > doIntercept
>>> >
>>> > > INFO: Interceptor has thrown exception, unwinding now
>>> > > org.apache.cxf.binding.soap.SoapFault: Request does not contain
>>>
>>> required
>>>
>>> > > Security header.
>>> > >         at
>>>
>>>
>>>
>>> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>>>
>>> >terceptor.java:153)
>>> >
>>> > >         at
>>>
>>>
>>>
>>> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>>>
>>> >terceptor.java:60)
>>> >
>>> > >         at
>>>
>>>
>>>
>>> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>>>
>>> >n.java:208)
>>> >
>>> > >         at
>>> > > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
>>> > >         at
>>>
>>>
>>>
>>> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
>>>
>>> >e(HTTPConduit.java:1955)
>>> >
>>> > >         at
>>>
>>>
>>>
>>> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
>>>
>>> >duit.java:1791)
>>> >
>>> > >         at
>>>
>>> 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>
>>> > >         at
>>> > > 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
>>> > >         at
>>>
>>>
>>>
>>> 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
>>>
>>> >rceptor.handleMessage(MessageSenderInterceptor.java:62)
>>> >
>>> > >         at
>>>
>>>
>>>
>>> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>>>
>>> >n.java:208)
>>> >
>>> > >         at
>>> >
>>> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>>> >
>>> > >         at
>>> >
>>> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>>> >
>>> > >         at
>>> > > 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>> > >         at
>>>
>>> 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>>>
>>> > > How do I know what is wrong with my SecurityHeader?
>>> > >
>>> > > -Josef
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > Daniel Kulp <dk...@apache.org>
>>> > > 23.07.2008 14:42
>>> > > Bitte antworten an
>>> > > users@cxf.apache.org
>>> > >
>>> > >
>>> > > An
>>> > > users@cxf.apache.org
>>> > > Kopie
>>> > > user@geronimo.apache.org
>>> > > Thema
>>> > > Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
>>> > >
>>> > > On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
>>> > >> Hi Kevin, Lin, Daniel, Glen,
>>> > >>
>>> > >> @Daniel: Your VM-Parameters solved this problem. Thank you very 
much
>>> > >> for
>>> > >> your help.
>>> > >
>>> > > Yea, but it definitely shouldn't have been necessary.
>>> > >
>>> > >> @Glen: Thank you very much for your tipp, we will wait for 
Geronimo
>>> > >> 2.1.2
>>> > >> and then we have Apache CXF2.0.6...
>>> > >
>>> > > Actually, CXF 2.0.8.    :-)
>>> > >
>>> > >> @All: Now I have two new issues ;-)
>>> > >> 1) The client is written like described in
>>> > >> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server
>>> > >> part -
>>> > >> because of JavaEE5 - we choose
>>>
>>>
>>>
>>> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j

>>>
>>> >sr-181-interceptor-annotations-xfire-migration/
>>> >
>>> > >> .
>>> > >> In the first run I added
>>> > >> @InInterceptors
>>> > >> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
>>> > >> the WS-Implementation-Class and nothing happend. Afterwards I had 
a
>>> > >> try
>>> > >> with the interface class and added the same
>>> > >> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor"
>>> > >> }).
>>> > >> After this changed the class de.myapp.WSSecurityInterceptor was
>>> > >> accessed.
>>> > >> Why do I have to add @... in implementation AND interface?
>>> > >
>>> > > Not sure on that.   Feel free to log a CXF bug.    It should be
>>> > > possible to just put it on the implementation.   The interface 
should
>>> > > be shareable between clients/servers and having interceptors 
defined
>>> > > on it that should just be there for the server is not a good 
thing.
>>> > >
>>> > >> 2) In the handleMessage(Message message) I receive after:
>>> > >> ...
>>> > >>                props.put(WSHandlerConstants.PASSWORD_TYPE,
>>> > >> WSConstants.PW_TEXT);
>>> > >>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>>> > >> ServerPasswordCallback.class.getName());
>>> > >>
>>> > >>                WSS4JInInterceptor wss4jInHandler = new
>>> > >> WSS4JInInterceptor(props);
>>> > >> ...
>>> > >>
>>> > >> .........................
>>> > >>
>>> > >> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in
>>>
>>> prolog
>>>
>>> > >> at [row,col {unknown-source}]: [1,0]
>>> > >>        at
>>> > >> 
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:
>>> > >> 661)
>>> > >>        at
>>> > >> 
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:
>>> > >> 2134)
>>> > >>        at
>>> > >
>>> > > With CXF 2.0.2, that stack could result from a BUNCH of things. We
>>> > > actually would get that stack if the server sent back and html 
error
>>> > > page without setting a 404 or similar.   Several things can cause
>>> > > it.   If you can tcpdump or wireshark the wire transfers to see
>>> > > what's
>>> > > going on, that would be helpful.    Good news is that this changed 
in
>>> > > 2.0.5 to get a better error message.   :-)
>>> > >
>>> > >
>>> > > ---
>>> > > Daniel Kulp
>>> > > dkulp@apache.org
>>> > > http://www.dankulp.com/blog
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > BGS Beratungsgesellschaft
>>> > > Software Systemplanung AG
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > Niederlassung Rhein/Main
>>> > > Robert-Koch-Straße 41
>>> > > 55129 Mainz
>>> > > Fon: +49 (0) 6131 / 914-0
>>> > > Fax: +49 (0) 6131 / 914-400
>>> > > www.bgs-ag.de
>>> > > Geschäftssitz Mainz
>>> > > Registergericht
>>> > > Amtsgericht Mainz
>>> > > HRB 62 50
>>> > >
>>> > > Aufsichtsratsvorsitzender
>>> > > Klaus Hellwig
>>> > > Vorstand
>>> > > Hanspeter Gau
>>> > > Hermann Kiefer
>>> > > Nils Manegold
>>
>>
>>
>> --
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>> ________________________________
>> BGS Beratungsgesellschaft
>> Software Systemplanung AG
>>   Niederlassung Rhein/Main
>> Robert-Koch-Straße 41
>> 55129 Mainz
>> Fon: +49 (0) 6131 / 914-0
>> Fax: +49 (0) 6131 / 914-400
>> www.bgs-ag.de Geschäftssitz Mainz
>> Registergericht
>> Amtsgericht Mainz
>> HRB 62 50
>>   Aufsichtsratsvorsitzender
>> Klaus Hellwig
>> Vorstand
>> Hanspeter Gau
>> Hermann Kiefer
>> Nils Manegold
>>
>>
>
> ________________________________
> BGS Beratungsgesellschaft
> Software Systemplanung AG
>   Niederlassung Rhein/Main
> Robert-Koch-Straße 41
> 55129 Mainz
> Fon: +49 (0) 6131 / 914-0
> Fax: +49 (0) 6131 / 914-400
> www.bgs-ag.de Geschäftssitz Mainz
> Registergericht
> Amtsgericht Mainz
> HRB 62 50
>   Aufsichtsratsvorsitzender
> Klaus Hellwig
> Vorstand
> Hanspeter Gau
> Hermann Kiefer
> Nils Manegold
>
>


BGS Beratungsgesellschaft 
Software Systemplanung AG 
  
  
  
  
Niederlassung Rhein/Main 
Robert-Koch-Straße 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Geschäftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 


  

Re: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Jarek Gawor <jg...@gmail.com>.
Why is the "javax.xml.namespace" package listed in the hidden-classes
element? That's provided by the JVM. See if removing this filter
helps.

Jarek

On Mon, Aug 11, 2008 at 5:22 AM,  <Jo...@bgs-ag.de> wrote:
>
> Hi Jarek,
>
> I deployed using "Console - Install New Applications". I received the
> message:
> The application was successfully deployed.
> The application was successfully started
>
> -> But application didn't start. Log:
> 11:11:02,005 INFO  [JAXWSServiceBuilder] Configuring EJB JAX-WS Web Service:
> MyWSImpl at /MyService/MyWS
> 11:11:04,547 ERROR [GBeanInstanceState] Error while starting; GBean is now
> in the FAILED state:
> abstractName="myapp/app/1.0/ear?configurationName=myapp/app/1.0/ear"
> org.apache.geronimo.kernel.config.InvalidConfigException: Class not loadable
> in classloader: [org.apache.geronimo.kernel.config.MultiParentClassLoader
> id=myapp/app/1.0/ear]
>         at
> org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(SerializedGBeanState.java:120)
>         at
> org.apache.geronimo.kernel.config.SerializedGBeanState.getGBeans(SerializedGBeanState.java:65)
>         at
> org.apache.geronimo.kernel.config.ConfigurationData.getGBeans(ConfigurationData.java:172)
>         at
> org.apache.geronimo.kernel.config.Configuration.<init>(Configuration.java:278)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:541)
>         at
> org.apache.geronimo.kernel.basic.BasicKernel.startGBean(BasicKernel.java:361)
>         at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.load(KernelConfigurationManager.java:161)
>         at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:312)
>         at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:280)
>         at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:255)
>         at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.loadConfiguration(KernelConfigurationManager.java:112)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>         at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
>         at
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>         at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
>         at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>         at
> org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$8a472d7f.loadConfiguration(<generated>)
>         at
> org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:63)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.ClassNotFoundException: Unable to find class used in
> GBeanData
> myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name=appEJB.jar
>         at
> org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:324)
>         at
> org.apache.geronimo.gbean.GBeanData.readExternal(GBeanData.java:247)
>         at
> org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(SerializedGBeanState.java:111)
>         ... 30 more
> Caused by: java.lang.ClassNotFoundException: Unable to find class used in
> GBeanData
> myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name=appEJB.jar,
> attribute: ejbJarInfo
>         at
> org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:293)
>         ... 32 more
> Caused by: java.lang.ClassNotFoundException: Could not load class
> javax.xml.namespace.QName from classloader: myapp/app/1.0/ear, destroyed
> state: false
>         at
> org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:213)
>         at
> org.apache.geronimo.kernel.ObjectInputStreamExt.resolveClass(ObjectInputStreamExt.java:38)
>         at
> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
>         at
> java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>         at java.util.ArrayList.readObject(ArrayList.java:591)
>         at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>         at
> org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:291)
>         ... 32 more
>
> geronimo-application.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <application application-name="app"
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
>     <sys:environment>
>         <sys:moduleId>
>             <sys:groupId>my-app</sys:groupId>
>             <sys:artifactId>app</sys:artifactId>
>             <sys:version>1.0</sys:version>
>             <sys:type>ear</sys:type>
>         </sys:moduleId>
>         <sys:dependencies>
>             <sys:dependency>
>                 <sys:groupId>console.dbpool</sys:groupId>
>                 <sys:artifactId>Postgres.postgres.app</sys:artifactId>
>                 <sys:version>1.0</sys:version>
>                 <sys:type>rar</sys:type>
>             </sys:dependency>
>         </sys:dependencies>
>         <sys:hidden-classes>
>             <sys:filter>org.apache.axis2</sys:filter>
>             <sys:filter>javax.xml.bind</sys:filter>
>             <sys:filter>javax.xml.namespace</sys:filter>
>         </sys:hidden-classes>
>     </sys:environment>
> </application>
>
> Thanx in advance for your help.
>
> -Josef
>
>
>
>
> "Jarek Gawor" <jg...@gmail.com>
>
> 07.08.2008 19:25
>
> Bitte antworten an
> user@geronimo.apache.org
> An
> user@geronimo.apache.org
> Kopie
> Thema
> Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo
>
>
>
>
> First, you don't need to add xml-apis-1.3.02.jar since the QName class
> is provided by the JVM now (since 1.5). Can you attach the full stack
> trace of the exception you see (when xml-apis-1.3.02.jar is not
> included)? And can you also attach the Geronimo deployment descriptor
> you are using?
>
> Jarek
>
> On Thu, Aug 7, 2008 at 3:39 AM,  <Jo...@bgs-ag.de> wrote:
>>
>> Hi all,
>>
>> this is an issue on the new version 2.1.2 using Webservices. Our
>> application
>> works (without WS-Security) under G 2.1.1, but under G 2.1.2 I can't even
>> deploy.
>>
>> -Josef
>>
>>
>>
>>
>> Daniel Kulp <dk...@apache.org>
>>
>> 06.08.2008 19:34
>>
>> An
>> users@cxf.apache.org
>> Kopie
>> Josef.Eisele@bgs-ag.de
>> Thema
>> Re: Antwort: Re: Change Version of Apache CXF for Geronimo
>>
>>
>>
>>
>>
>> That's something you may need to ask on the geronimo list.   I'm not
>> familliar
>> with all the classloading details there.
>>
>> Dan
>>
>>
>> On Wednesday 06 August 2008 3:57:59 am Josef.Eisele@bgs-ag.de wrote:
>>> Hi Dan,
>>>
>>> cool, this is the newest Version of Apache CXF :-)
>>>
>>> So I took my EAR added the new libs (not contained in Geronimo 2.1.2,
>>> why?)
>>>        cxf-rt-ws-security-2.0.8.jar
>>>        wss4j-1.5.4.jar
>>> and tried to deploy to the new Geronimo:
>>>
>>> ...
>>> 09:25:28,770 ERROR [GBeanInstanceState] Error while starting; GBean is
>>> now
>>> in the FAILED state:
>>> abstractName="myapp/app/1.0/ear?configurationName=myapp/app/1.0/ear"
>>> org.apache.geronimo.kernel.config.InvalidConfigException: Class not
>>> loadable in classloader:
>>> [org.apache.geronimo.kernel.config.MultiParentClassLoader
>>> id=myapp/app/1.0/ear]
>>>         at
>>> org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(Seria
>>> ...
>>> Caused by: java.lang.ClassNotFoundException: Unable to find class used in
>>> GBeanData
>>>
>>>
>>> myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name
>>>=MyAppEJB.jar, attribute: ejbJarInfo
>>>         at
>>>
>>>
>>> org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData
>>>.java:293) ... 33 more
>>> Caused by: java.lang.ClassNotFoundException: Could not load class
>>> javax.xml.namespace.QName from classloader: myapp/app/1.0/ear, destroyed
>>> state: false
>>>         at
>>> org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:213)
>>> ...
>>>
>>> So I thought maybe "xml-apis-1.3.02.jar" is missing, but adding to the
>>> EAR
>>> leads to:
>>>
>>> ...
>>> Caused by: java.io.InvalidClassException: javax.xml.namespace.QName;
>>> local
>>> class incompatible: stream classdesc serialVersionUID =
>>> -9120448754896609940, local class serialVersionUID = 4418622981026545151
>>>         at
>>> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
>>>         at
>>> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
>>> ...
>>>
>>> I need the QName in my Webservice. What can I do to get my App deployed?
>>> Thanx in advance.
>>>
>>> -Josef
>>>
>>>
>>>
>>>
>>> Daniel Kulp <dk...@apache.org>
>>> 05.08.2008 16:42
>>> Bitte antworten an
>>> users@cxf.apache.org
>>>
>>>
>>> An
>>> users@cxf.apache.org
>>> Kopie
>>>
>>> Thema
>>> Re: Change Version of Apache CXF for Geronimo
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> You might want to just try Geronimo 2.1.2.   The vote apparently passed
>>> last
>>> night:
>>>
>>>
>>> http://www.nabble.com/-VOTE--Geronimo-Server-2.1.2-Release-to18746852s134.h
>>>tml
>>>
>>> so it should be made available shortly.   You can download the
>>> candidates.
>>>
>>> 2.1.2 is using CXF 2.0.8.
>>>
>>>
>>> Dan
>>>
>>> On Tuesday 05 August 2008 6:03:51 am Josef.Eisele@bgs-ag.de wrote:
>>> > Hi Glen,
>>> >
>>> > because I got stuck in solving the problem with Geronimo 2.1.1 and
>>> > included CXF 2.0.2 I thought maybe CXF 2.0.8 solves my problem?
>>> >
>>> > So I tried to change the WS-Stack of my Geronimo from the old version
>>> > to
>>> > CXF 2.0.8. I had certain essays:
>>> >
>>> > 1) http://www.jroller.com/gmazza/date/20080612:
>>> > -> In Geronimo is no <prefer-application-packages> available, I tried
>>>
>>> with
>>>
>>> > <inverse-classloading/> but I got a lot of problems with the
>>>
>>> classloader.
>>>
>>> > If I added all JARS necessary - see file WHICH_JARS - I got class cast
>>> > exceptions, adding a certain minimum leads to NoClassDefError.
>>> > <hidden-classes> or <non-overridable-classes>  won't help?
>>> > 2) Adding CXF under Services - Repository with a dependency-entry in
>>> > the
>>> > deployment plan:
>>> >             <dependency>
>>> >                 <groupId>org.apache.cxf</groupId>
>>> >                 <artifactId>cxf</artifactId>
>>> >                 <version>2.0.8</version>
>>> >                 <type>jar</type>
>>> >             </dependency>
>>> > changed nothing.
>>> > 3) ???
>>> >
>>> > Can you please help?
>>> >
>>> > -Josef
>>> >
>>> >
>>> >
>>> >
>>> > Josef.Eisele@bgs-ag.de
>>> > 04.08.2008 16:09
>>> > Bitte antworten an
>>> > users@cxf.apache.org
>>> >
>>> >
>>> > An
>>> > users@cxf.apache.org
>>> > Kopie
>>> >
>>> > Thema
>>> > Antwort: Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for
>>> > Axis2-Classes
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > Hi Dan,
>>> >
>>> > I checked your blog and I didn't found big differences in the
>>> > code(Server-Part is in my case more JEE5 like - see
>>>
>>>
>>>
>>> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j
>>>
>>> >sr-181-interceptor-annotations-xfire-migration/
>>> >
>>> > ).
>>> >
>>> > The difference I see compared with your blog-example is in the request
>>> > itself:
>>> >
>>> > 1) from http://cwiki.apache.org/CXF20DOC/ws-security.html:
>>> >      <wsse:Security
>>> >          xmlns:wsse="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>>
>>> >.0.xsd
>>> >
>>> > "
>>> >          soap:mustUnderstand="1">
>>> >          <wsse:UsernameToken
>>> >             xmlns:wsse="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>>
>>> >.0.xsd
>>> >
>>> > "
>>> >             xmlns:wsu="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>>>
>>> >1.0.xsd
>>> >
>>> > "
>>> >             wsu:Id="UsernameToken-25268096">
>>> >             <wsse:Username
>>> >                xmlns:wsse="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>>
>>> >.0.xsd
>>> >
>>> > ">
>>> >                joe
>>> >             </wsse:Username>
>>> >             <wsse:Password
>>> >                xmlns:wsse="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>>
>>> >.0.xsd
>>> >
>>> > "
>>> >                Type="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>>>
>>> >ile-1.0#PasswordDigest
>>> >
>>> > ">
>>> >                ymyLPVTLrQMBJo82akcw4aBSlJQ=
>>> >             </wsse:Password>
>>> >             <wsse:Nonce
>>> >                xmlns:wsse="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>>
>>> >.0.xsd
>>> >
>>> > ">
>>> >                MK3TTlJxaevzcFaxV/oKyw==
>>> >             </wsse:Nonce>
>>> >             <wsu:Created
>>> >                xmlns:wsu="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>>>
>>> >1.0.xsd
>>> >
>>> > ">
>>> >                2008-07-16T23:05:07.300Z
>>> >             </wsu:Created>
>>> >          </wsse:UsernameToken>
>>> >       </wsse:Security>
>>> >
>>> > 2) my request:
>>> > <wsse:Security
>>> >     xmlns:wsse="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>>
>>> >.0.xsd
>>> >
>>> > "
>>> >     soap:mustUnderstand="1">
>>> >     <wsse:UsernameToken
>>> >         xmlns:wsu="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>>>
>>> >1.0.xsd
>>> >
>>> > "
>>> >         wsu:Id="UsernameToken-12189822">
>>> >     <wsse:Username>
>>> >          blabla
>>> >     </wsse:Username>
>>> >     <wsse:Password
>>> >        Type="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>>>
>>> >ile-1.0#PasswordDigest
>>> >
>>> > ">
>>> >        uIqdbKqsp5VCvM4bPTps1PmnMZI=</wsse:Password>
>>> >     <wsse:Nonce>YmoBKVpJrAjM2P3ss7MUNg==</wsse:Nonce>
>>> >     <wsu:Created>
>>> >        2008-08-04T10:08:15.245Z
>>> >     </wsu:Created>
>>> >    </wsse:UsernameToken>
>>> > </wsse:Security>
>>> >
>>> >
>>> > I miss the namespace
>>> > xmlns:wsse="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>>
>>> >.0.xsd
>>> >
>>> > "
>>> > and not only me but also the WSSecurityUtil.class in line 92:
>>> >
>>> >         list =
>>> > soapHeaderElement.getElementsByTagNameNS(WSConstants.WSSE_NS,
>>> >                 WSConstants.WSSE_LN);
>>> >
>>> > And therefore the method
>>> > public static Element getSecurityHeader(Document doc, String actor,
>>> > SOAPConstants sc) {
>>> >
>>> > results in an null-Element. The class WSSecurityEngine and in the end
>>> > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor throws the error:
>>> >
>>> > WARNUNG: Request does not contain required Security header
>>> >
>>> > What am I doing wrong with WS-Security 1.1 ???? I have now the sources
>>>
>>> for
>>>
>>> > apacche-cxf-2.0.2 and wss4j-1.5.1, if I can debug to a certain step let
>>>
>>> me
>>>
>>> > know.
>>> >
>>> > -Josef
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > Glen Mazza <gl...@gmail.com>
>>> > 26.07.2008 03:03
>>> > Bitte antworten an
>>> > users@cxf.apache.org
>>> >
>>> >
>>> > An
>>> > users@cxf.apache.org
>>> > Kopie
>>> >
>>> > Thema
>>> > Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for
>>> > Axis2-Classes
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > Have you checked our documentation on this:
>>> > http://cwiki.apache.org/CXF20DOC/ws-security.html
>>> >
>>> > Also I blogged about this recently, maybe something you can use:
>>> > http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to
>>> >
>>> > HTH,
>>> > Glen
>>> >
>>> > Josef.Eisele wrote:
>>> > > Hi Dan,
>>> > >
>>> > > I solved the last problem copying libraries (xmlsec-1.3.0.jar,
>>> > > wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part to
>>> >
>>> > the
>>> >
>>> > > EAR-Part:
>>> > > (WebContent/WEB-INF/lib -> EarContent/lib)
>>> > >
>>> > > One Problem solved another arises:
>>> > >
>>> > > Client writes the SecurityHeader:
>>> > > ..
>>> > > <wsse:Security xmlns:wsse="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>>
>>> >.0.xsd
>>> >
>>> > > " soap:mustUnderstand="1">
>>> > > <wsse:UsernameToken xmlns:wsu="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>>>
>>> >1.0.xsd
>>> >
>>> > > " wsu:Id="UsernameToken-12189822">
>>> > > <wsse:Username>chef</wsse:Username>
>>> > > <wsse:Password Type="
>>>
>>>
>>>
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>>>
>>> >ile-1.0#PasswordDigest
>>> >
>>> > > ">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
>>> > > <wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
>>> > > <wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
>>> > > </wsse:UsernameToken>
>>> > > </wsse:Security>
>>> > > ...
>>> > >
>>> > > Server is configured with the interceptor:
>>> > > @InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })
>>> > >
>>> > > In this class I configure 3 Interceptors:
>>> > >         public void handleMessage(Message message) throws Fault {
>>> > >                 Map<String, Object> props = new HashMap<String,
>>> >
>>> > Object>();
>>> >
>>> > >                 props.put(WSHandlerConstants.ACTION,
>>> > > WSHandlerConstants.USERNAME_TOKEN);
>>> > >                 props.put(WSHandlerConstants.PASSWORD_TYPE,
>>> > > WSConstants.PW_DIGEST);
>>> > >                 props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>>> > > ServerPasswordCallback.class.getName());
>>> > >
>>> > >                 WSS4JInInterceptor           wss4jInInterceptor   =
>>>
>>> new
>>>
>>> > > WSS4JInInterceptor(props);
>>> > >                 ValidateUserTokenInterceptor userTokenInterceptor =
>>>
>>> new
>>>
>>> > > ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);
>>> > >
>>> > >
>>> > > message.getInterceptorChain().add(wss4jInInterceptor);
>>> > >                 //org.apache.cxf.binding.soap.SoapFault: No
>>>
>>> SOAPMessage
>>>
>>> > > DOM was found. Please enable the SAAJInInterceptor.
>>> > >                 message.getInterceptorChain().add(new
>>> > > SAAJInInterceptor());
>>> > >  message.getInterceptorChain().add(userTokenInterceptor);
>>> > >         }
>>> > >
>>> > > UserTokenInterceptor works fine, SAAJInInterceptor is necessary
>>> >
>>> > otherwise
>>> >
>>> > > excepton but now I get an exception on the wss4jInInterceptor:
>>> > >
>>> > > 25.07.2008 13:03:44
>>>
>>> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
>>>
>>> > > handleMessage
>>> > > WARNUNG: Request does not contain required Security header
>>> > > 25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain
>>> >
>>> > doIntercept
>>> >
>>> > > INFO: Interceptor has thrown exception, unwinding now
>>> > > org.apache.cxf.binding.soap.SoapFault: Request does not contain
>>>
>>> required
>>>
>>> > > Security header.
>>> > >         at
>>>
>>>
>>>
>>> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>>>
>>> >terceptor.java:153)
>>> >
>>> > >         at
>>>
>>>
>>>
>>> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>>>
>>> >terceptor.java:60)
>>> >
>>> > >         at
>>>
>>>
>>>
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>>>
>>> >n.java:208)
>>> >
>>> > >         at
>>> > > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
>>> > >         at
>>>
>>>
>>>
>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
>>>
>>> >e(HTTPConduit.java:1955)
>>> >
>>> > >         at
>>>
>>>
>>>
>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
>>>
>>> >duit.java:1791)
>>> >
>>> > >         at
>>>
>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>
>>> > >         at
>>> > > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
>>> > >         at
>>>
>>>
>>>
>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
>>>
>>> >rceptor.handleMessage(MessageSenderInterceptor.java:62)
>>> >
>>> > >         at
>>>
>>>
>>>
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>>>
>>> >n.java:208)
>>> >
>>> > >         at
>>> >
>>> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>>> >
>>> > >         at
>>> >
>>> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>>> >
>>> > >         at
>>> > > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>> > >         at
>>>
>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>>>
>>> > > How do I know what is wrong with my SecurityHeader?
>>> > >
>>> > > -Josef
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > Daniel Kulp <dk...@apache.org>
>>> > > 23.07.2008 14:42
>>> > > Bitte antworten an
>>> > > users@cxf.apache.org
>>> > >
>>> > >
>>> > > An
>>> > > users@cxf.apache.org
>>> > > Kopie
>>> > > user@geronimo.apache.org
>>> > > Thema
>>> > > Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
>>> > >
>>> > > On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
>>> > >> Hi Kevin, Lin, Daniel, Glen,
>>> > >>
>>> > >> @Daniel: Your VM-Parameters solved this problem. Thank you very much
>>> > >> for
>>> > >> your help.
>>> > >
>>> > > Yea, but it definitely shouldn't have been necessary.
>>> > >
>>> > >> @Glen: Thank you very much for your tipp, we will wait for Geronimo
>>> > >> 2.1.2
>>> > >> and then we have Apache CXF2.0.6...
>>> > >
>>> > > Actually, CXF 2.0.8.    :-)
>>> > >
>>> > >> @All: Now I have two new issues ;-)
>>> > >> 1) The client is written like described in
>>> > >> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server
>>> > >> part -
>>> > >> because of JavaEE5 - we choose
>>>
>>>
>>>
>>> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j
>>>
>>> >sr-181-interceptor-annotations-xfire-migration/
>>> >
>>> > >> .
>>> > >> In the first run I added
>>> > >> @InInterceptors
>>> > >> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
>>> > >> the WS-Implementation-Class and nothing happend. Afterwards I had a
>>> > >> try
>>> > >> with the interface class and added the same
>>> > >> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor"
>>> > >> }).
>>> > >> After this changed the class de.myapp.WSSecurityInterceptor was
>>> > >> accessed.
>>> > >> Why do I have to add @... in implementation AND interface?
>>> > >
>>> > > Not sure on that.   Feel free to log a CXF bug.    It should be
>>> > > possible to just put it on the implementation.   The interface should
>>> > > be shareable between clients/servers and having interceptors defined
>>> > > on it that should just be there for the server is not a good thing.
>>> > >
>>> > >> 2) In the handleMessage(Message message) I receive after:
>>> > >> ...
>>> > >>                props.put(WSHandlerConstants.PASSWORD_TYPE,
>>> > >> WSConstants.PW_TEXT);
>>> > >>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>>> > >> ServerPasswordCallback.class.getName());
>>> > >>
>>> > >>                WSS4JInInterceptor wss4jInHandler = new
>>> > >> WSS4JInInterceptor(props);
>>> > >> ...
>>> > >>
>>> > >> .........................
>>> > >>
>>> > >> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in
>>>
>>> prolog
>>>
>>> > >> at [row,col {unknown-source}]: [1,0]
>>> > >>        at
>>> > >> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:
>>> > >> 661)
>>> > >>        at
>>> > >> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:
>>> > >> 2134)
>>> > >>        at
>>> > >
>>> > > With CXF 2.0.2, that stack could result from a BUNCH of things.  We
>>> > > actually would get that stack if the server sent back and html error
>>> > > page without setting a 404 or similar.   Several things can cause
>>> > > it.   If you can tcpdump or wireshark the wire transfers to see
>>> > > what's
>>> > > going on, that would be helpful.    Good news is that this changed in
>>> > > 2.0.5 to get a better error message.   :-)
>>> > >
>>> > >
>>> > > ---
>>> > > Daniel Kulp
>>> > > dkulp@apache.org
>>> > > http://www.dankulp.com/blog
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > BGS Beratungsgesellschaft
>>> > > Software Systemplanung AG
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > Niederlassung Rhein/Main
>>> > > Robert-Koch-Straße 41
>>> > > 55129 Mainz
>>> > > Fon: +49 (0) 6131 / 914-0
>>> > > Fax: +49 (0) 6131 / 914-400
>>> > > www.bgs-ag.de
>>> > > Geschäftssitz Mainz
>>> > > Registergericht
>>> > > Amtsgericht Mainz
>>> > > HRB 62 50
>>> > >
>>> > > Aufsichtsratsvorsitzender
>>> > > Klaus Hellwig
>>> > > Vorstand
>>> > > Hanspeter Gau
>>> > > Hermann Kiefer
>>> > > Nils Manegold
>>
>>
>>
>> --
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>> ________________________________
>> BGS Beratungsgesellschaft
>> Software Systemplanung AG
>>   Niederlassung Rhein/Main
>> Robert-Koch-Straße 41
>> 55129 Mainz
>> Fon: +49 (0) 6131 / 914-0
>> Fax: +49 (0) 6131 / 914-400
>> www.bgs-ag.de Geschäftssitz Mainz
>> Registergericht
>> Amtsgericht Mainz
>> HRB 62 50
>>   Aufsichtsratsvorsitzender
>> Klaus Hellwig
>> Vorstand
>> Hanspeter Gau
>> Hermann Kiefer
>> Nils Manegold
>>
>>
>
> ________________________________
> BGS Beratungsgesellschaft
> Software Systemplanung AG
>   Niederlassung Rhein/Main
> Robert-Koch-Straße 41
> 55129 Mainz
> Fon: +49 (0) 6131 / 914-0
> Fax: +49 (0) 6131 / 914-400
> www.bgs-ag.de Geschäftssitz Mainz
> Registergericht
> Amtsgericht Mainz
> HRB 62 50
>   Aufsichtsratsvorsitzender
> Klaus Hellwig
> Vorstand
> Hanspeter Gau
> Hermann Kiefer
> Nils Manegold
>
>

Antwort: Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Jo...@bgs-ag.de.
Hi Jarek,

I deployed using "Console - Install New Applications". I received the 
message:
The application was successfully deployed.
The application was successfully started

-> But application didn't start. Log:
11:11:02,005 INFO  [JAXWSServiceBuilder] Configuring EJB JAX-WS Web 
Service: MyWSImpl at /MyService/MyWS
11:11:04,547 ERROR [GBeanInstanceState] Error while starting; GBean is now 
in the FAILED state: 
abstractName="myapp/app/1.0/ear?configurationName=myapp/app/1.0/ear"
org.apache.geronimo.kernel.config.InvalidConfigException: Class not 
loadable in classloader: 
[org.apache.geronimo.kernel.config.MultiParentClassLoader 
id=myapp/app/1.0/ear]
        at 
org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(SerializedGBeanState.java:120)
        at 
org.apache.geronimo.kernel.config.SerializedGBeanState.getGBeans(SerializedGBeanState.java:65)
        at 
org.apache.geronimo.kernel.config.ConfigurationData.getGBeans(ConfigurationData.java:172)
        at 
org.apache.geronimo.kernel.config.Configuration.<init>(Configuration.java:278)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:541)
        at 
org.apache.geronimo.kernel.basic.BasicKernel.startGBean(BasicKernel.java:361)
        at 
org.apache.geronimo.kernel.config.KernelConfigurationManager.load(KernelConfigurationManager.java:161)
        at 
org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:312)
        at 
org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:280)
        at 
org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:255)
        at 
org.apache.geronimo.kernel.config.KernelConfigurationManager.loadConfiguration(KernelConfigurationManager.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
        at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
        at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
        at 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at 
org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$8a472d7f.loadConfiguration(<generated>)
        at 
org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:63)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: Unable to find class used in 
GBeanData 
myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name=appEJB.jar
        at 
org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:324)
        at 
org.apache.geronimo.gbean.GBeanData.readExternal(GBeanData.java:247)
        at 
org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(SerializedGBeanState.java:111)
        ... 30 more
Caused by: java.lang.ClassNotFoundException: Unable to find class used in 
GBeanData 
myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name=appEJB.jar, 
attribute: ejbJarInfo
        at 
org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:293)
        ... 32 more
Caused by: java.lang.ClassNotFoundException: Could not load class 
javax.xml.namespace.QName from classloader: myapp/app/1.0/ear, destroyed 
state: false
        at 
org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:213)
        at 
org.apache.geronimo.kernel.ObjectInputStreamExt.resolveClass(ObjectInputStreamExt.java:38)
        at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
        at 
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
        at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
        at 
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
        at 
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
        at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at 
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at 
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at java.util.ArrayList.readObject(ArrayList.java:591)
        at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
        at 
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
        at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at 
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
        at 
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
        at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at 
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at 
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at 
org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:291)
        ... 32 more

geronimo-application.xml:
<?xml version="1.0" encoding="UTF-8"?>
<application application-name="app" xmlns="
http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns:sec="
http://geronimo.apache.org/xml/ns/security-2.0" xmlns:sys="
http://geronimo.apache.org/xml/ns/deployment-1.2">
    <sys:environment>
        <sys:moduleId>
            <sys:groupId>my-app</sys:groupId>
            <sys:artifactId>app</sys:artifactId>
            <sys:version>1.0</sys:version>
            <sys:type>ear</sys:type>
        </sys:moduleId>
        <sys:dependencies>
            <sys:dependency>
                <sys:groupId>console.dbpool</sys:groupId>
                <sys:artifactId>Postgres.postgres.app</sys:artifactId>
                <sys:version>1.0</sys:version>
                <sys:type>rar</sys:type>
            </sys:dependency>
        </sys:dependencies>
        <sys:hidden-classes>
            <sys:filter>org.apache.axis2</sys:filter>
            <sys:filter>javax.xml.bind</sys:filter>
            <sys:filter>javax.xml.namespace</sys:filter> 
        </sys:hidden-classes>
    </sys:environment>
</application>

Thanx in advance for your help.

-Josef





"Jarek Gawor" <jg...@gmail.com> 
07.08.2008 19:25
Bitte antworten an
user@geronimo.apache.org


An
user@geronimo.apache.org
Kopie

Thema
Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo






First, you don't need to add xml-apis-1.3.02.jar since the QName class
is provided by the JVM now (since 1.5). Can you attach the full stack
trace of the exception you see (when xml-apis-1.3.02.jar is not
included)? And can you also attach the Geronimo deployment descriptor
you are using?

Jarek

On Thu, Aug 7, 2008 at 3:39 AM,  <Jo...@bgs-ag.de> wrote:
>
> Hi all,
>
> this is an issue on the new version 2.1.2 using Webservices. Our 
application
> works (without WS-Security) under G 2.1.1, but under G 2.1.2 I can't 
even
> deploy.
>
> -Josef
>
>
>
>
> Daniel Kulp <dk...@apache.org>
>
> 06.08.2008 19:34
>
> An
> users@cxf.apache.org
> Kopie
> Josef.Eisele@bgs-ag.de
> Thema
> Re: Antwort: Re: Change Version of Apache CXF for Geronimo
>
>
>
>
>
> That's something you may need to ask on the geronimo list.   I'm not
> familliar
> with all the classloading details there.
>
> Dan
>
>
> On Wednesday 06 August 2008 3:57:59 am Josef.Eisele@bgs-ag.de wrote:
>> Hi Dan,
>>
>> cool, this is the newest Version of Apache CXF :-)
>>
>> So I took my EAR added the new libs (not contained in Geronimo 2.1.2,
>> why?)
>>        cxf-rt-ws-security-2.0.8.jar
>>        wss4j-1.5.4.jar
>> and tried to deploy to the new Geronimo:
>>
>> ...
>> 09:25:28,770 ERROR [GBeanInstanceState] Error while starting; GBean is 
now
>> in the FAILED state:
>> abstractName="myapp/app/1.0/ear?configurationName=myapp/app/1.0/ear"
>> org.apache.geronimo.kernel.config.InvalidConfigException: Class not
>> loadable in classloader:
>> [org.apache.geronimo.kernel.config.MultiParentClassLoader
>> id=myapp/app/1.0/ear]
>>         at
>> org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(Seria
>> ...
>> Caused by: java.lang.ClassNotFoundException: Unable to find class used 
in
>> GBeanData
>>
>> 
myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name
>>=MyAppEJB.jar, attribute: ejbJarInfo
>>         at
>>
>> 
org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData
>>.java:293) ... 33 more
>> Caused by: java.lang.ClassNotFoundException: Could not load class
>> javax.xml.namespace.QName from classloader: myapp/app/1.0/ear, 
destroyed
>> state: false
>>         at
>> 
org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:213)
>> ...
>>
>> So I thought maybe "xml-apis-1.3.02.jar" is missing, but adding to the 
EAR
>> leads to:
>>
>> ...
>> Caused by: java.io.InvalidClassException: javax.xml.namespace.QName; 
local
>> class incompatible: stream classdesc serialVersionUID =
>> -9120448754896609940, local class serialVersionUID = 
4418622981026545151
>>         at
>> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
>>         at
>> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
>> ...
>>
>> I need the QName in my Webservice. What can I do to get my App 
deployed?
>> Thanx in advance.
>>
>> -Josef
>>
>>
>>
>>
>> Daniel Kulp <dk...@apache.org>
>> 05.08.2008 16:42
>> Bitte antworten an
>> users@cxf.apache.org
>>
>>
>> An
>> users@cxf.apache.org
>> Kopie
>>
>> Thema
>> Re: Change Version of Apache CXF for Geronimo
>>
>>
>>
>>
>>
>>
>>
>> You might want to just try Geronimo 2.1.2.   The vote apparently passed
>> last
>> night:
>>
>> 
http://www.nabble.com/-VOTE--Geronimo-Server-2.1.2-Release-to18746852s134.h

>>tml
>>
>> so it should be made available shortly.   You can download the 
candidates.
>>
>> 2.1.2 is using CXF 2.0.8.
>>
>>
>> Dan
>>
>> On Tuesday 05 August 2008 6:03:51 am Josef.Eisele@bgs-ag.de wrote:
>> > Hi Glen,
>> >
>> > because I got stuck in solving the problem with Geronimo 2.1.1 and
>> > included CXF 2.0.2 I thought maybe CXF 2.0.8 solves my problem?
>> >
>> > So I tried to change the WS-Stack of my Geronimo from the old version 
to
>> > CXF 2.0.8. I had certain essays:
>> >
>> > 1) http://www.jroller.com/gmazza/date/20080612:
>> > -> In Geronimo is no <prefer-application-packages> available, I tried
>>
>> with
>>
>> > <inverse-classloading/> but I got a lot of problems with the
>>
>> classloader.
>>
>> > If I added all JARS necessary - see file WHICH_JARS - I got class 
cast
>> > exceptions, adding a certain minimum leads to NoClassDefError.
>> > <hidden-classes> or <non-overridable-classes>  won't help?
>> > 2) Adding CXF under Services - Repository with a dependency-entry in 
the
>> > deployment plan:
>> >             <dependency>
>> >                 <groupId>org.apache.cxf</groupId>
>> >                 <artifactId>cxf</artifactId>
>> >                 <version>2.0.8</version>
>> >                 <type>jar</type>
>> >             </dependency>
>> > changed nothing.
>> > 3) ???
>> >
>> > Can you please help?
>> >
>> > -Josef
>> >
>> >
>> >
>> >
>> > Josef.Eisele@bgs-ag.de
>> > 04.08.2008 16:09
>> > Bitte antworten an
>> > users@cxf.apache.org
>> >
>> >
>> > An
>> > users@cxf.apache.org
>> > Kopie
>> >
>> > Thema
>> > Antwort: Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for
>> > Axis2-Classes
>> >
>> >
>> >
>> >
>> >
>> >
>> > Hi Dan,
>> >
>> > I checked your blog and I didn't found big differences in the
>> > code(Server-Part is in my case more JEE5 like - see
>>
>>
>> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j

>>
>> >sr-181-interceptor-annotations-xfire-migration/
>> >
>> > ).
>> >
>> > The difference I see compared with your blog-example is in the 
request
>> > itself:
>> >
>> > 1) from http://cwiki.apache.org/CXF20DOC/ws-security.html:
>> >      <wsse:Security
>> >          xmlns:wsse="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>
>> >.0.xsd
>> >
>> > "
>> >          soap:mustUnderstand="1">
>> >          <wsse:UsernameToken
>> >             xmlns:wsse="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>
>> >.0.xsd
>> >
>> > "
>> >             xmlns:wsu="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>>
>> >1.0.xsd
>> >
>> > "
>> >             wsu:Id="UsernameToken-25268096">
>> >             <wsse:Username
>> >                xmlns:wsse="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>
>> >.0.xsd
>> >
>> > ">
>> >                joe
>> >             </wsse:Username>
>> >             <wsse:Password
>> >                xmlns:wsse="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>
>> >.0.xsd
>> >
>> > "
>> >                Type="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>>
>> >ile-1.0#PasswordDigest
>> >
>> > ">
>> >                ymyLPVTLrQMBJo82akcw4aBSlJQ=
>> >             </wsse:Password>
>> >             <wsse:Nonce
>> >                xmlns:wsse="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>
>> >.0.xsd
>> >
>> > ">
>> >                MK3TTlJxaevzcFaxV/oKyw==
>> >             </wsse:Nonce>
>> >             <wsu:Created
>> >                xmlns:wsu="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>>
>> >1.0.xsd
>> >
>> > ">
>> >                2008-07-16T23:05:07.300Z
>> >             </wsu:Created>
>> >          </wsse:UsernameToken>
>> >       </wsse:Security>
>> >
>> > 2) my request:
>> > <wsse:Security
>> >     xmlns:wsse="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>
>> >.0.xsd
>> >
>> > "
>> >     soap:mustUnderstand="1">
>> >     <wsse:UsernameToken
>> >         xmlns:wsu="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>>
>> >1.0.xsd
>> >
>> > "
>> >         wsu:Id="UsernameToken-12189822">
>> >     <wsse:Username>
>> >          blabla
>> >     </wsse:Username>
>> >     <wsse:Password
>> >        Type="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>>
>> >ile-1.0#PasswordDigest
>> >
>> > ">
>> >        uIqdbKqsp5VCvM4bPTps1PmnMZI=</wsse:Password>
>> >     <wsse:Nonce>YmoBKVpJrAjM2P3ss7MUNg==</wsse:Nonce>
>> >     <wsu:Created>
>> >        2008-08-04T10:08:15.245Z
>> >     </wsu:Created>
>> >    </wsse:UsernameToken>
>> > </wsse:Security>
>> >
>> >
>> > I miss the namespace
>> > xmlns:wsse="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>
>> >.0.xsd
>> >
>> > "
>> > and not only me but also the WSSecurityUtil.class in line 92:
>> >
>> >         list =
>> > soapHeaderElement.getElementsByTagNameNS(WSConstants.WSSE_NS,
>> >                 WSConstants.WSSE_LN);
>> >
>> > And therefore the method
>> > public static Element getSecurityHeader(Document doc, String actor,
>> > SOAPConstants sc) {
>> >
>> > results in an null-Element. The class WSSecurityEngine and in the end
>> > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor throws the error:
>> >
>> > WARNUNG: Request does not contain required Security header
>> >
>> > What am I doing wrong with WS-Security 1.1 ???? I have now the 
sources
>>
>> for
>>
>> > apacche-cxf-2.0.2 and wss4j-1.5.1, if I can debug to a certain step 
let
>>
>> me
>>
>> > know.
>> >
>> > -Josef
>> >
>> >
>> >
>> >
>> >
>> > Glen Mazza <gl...@gmail.com>
>> > 26.07.2008 03:03
>> > Bitte antworten an
>> > users@cxf.apache.org
>> >
>> >
>> > An
>> > users@cxf.apache.org
>> > Kopie
>> >
>> > Thema
>> > Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for 
Axis2-Classes
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > Have you checked our documentation on this:
>> > http://cwiki.apache.org/CXF20DOC/ws-security.html
>> >
>> > Also I blogged about this recently, maybe something you can use:
>> > http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to
>> >
>> > HTH,
>> > Glen
>> >
>> > Josef.Eisele wrote:
>> > > Hi Dan,
>> > >
>> > > I solved the last problem copying libraries (xmlsec-1.3.0.jar,
>> > > wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part 
to
>> >
>> > the
>> >
>> > > EAR-Part:
>> > > (WebContent/WEB-INF/lib -> EarContent/lib)
>> > >
>> > > One Problem solved another arises:
>> > >
>> > > Client writes the SecurityHeader:
>> > > ..
>> > > <wsse:Security xmlns:wsse="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>>
>> >.0.xsd
>> >
>> > > " soap:mustUnderstand="1">
>> > > <wsse:UsernameToken xmlns:wsu="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>>
>> >1.0.xsd
>> >
>> > > " wsu:Id="UsernameToken-12189822">
>> > > <wsse:Username>chef</wsse:Username>
>> > > <wsse:Password Type="
>>
>>
>> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>>
>> >ile-1.0#PasswordDigest
>> >
>> > > ">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
>> > > <wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
>> > > <wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
>> > > </wsse:UsernameToken>
>> > > </wsse:Security>
>> > > ...
>> > >
>> > > Server is configured with the interceptor:
>> > > @InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })
>> > >
>> > > In this class I configure 3 Interceptors:
>> > >         public void handleMessage(Message message) throws Fault {
>> > >                 Map<String, Object> props = new HashMap<String,
>> >
>> > Object>();
>> >
>> > >                 props.put(WSHandlerConstants.ACTION,
>> > > WSHandlerConstants.USERNAME_TOKEN);
>> > >                 props.put(WSHandlerConstants.PASSWORD_TYPE,
>> > > WSConstants.PW_DIGEST);
>> > >                 props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>> > > ServerPasswordCallback.class.getName());
>> > >
>> > >                 WSS4JInInterceptor           wss4jInInterceptor   =
>>
>> new
>>
>> > > WSS4JInInterceptor(props);
>> > >                 ValidateUserTokenInterceptor userTokenInterceptor =
>>
>> new
>>
>> > > ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);
>> > >
>> > > message.getInterceptorChain().add(wss4jInInterceptor);
>> > >                 //org.apache.cxf.binding.soap.SoapFault: No
>>
>> SOAPMessage
>>
>> > > DOM was found. Please enable the SAAJInInterceptor.
>> > >                 message.getInterceptorChain().add(new
>> > > SAAJInInterceptor());
>> > >  message.getInterceptorChain().add(userTokenInterceptor);
>> > >         }
>> > >
>> > > UserTokenInterceptor works fine, SAAJInInterceptor is necessary
>> >
>> > otherwise
>> >
>> > > excepton but now I get an exception on the wss4jInInterceptor:
>> > >
>> > > 25.07.2008 13:03:44
>>
>> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
>>
>> > > handleMessage
>> > > WARNUNG: Request does not contain required Security header
>> > > 25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain
>> >
>> > doIntercept
>> >
>> > > INFO: Interceptor has thrown exception, unwinding now
>> > > org.apache.cxf.binding.soap.SoapFault: Request does not contain
>>
>> required
>>
>> > > Security header.
>> > >         at
>>
>>
>> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>>
>> >terceptor.java:153)
>> >
>> > >         at
>>
>>
>> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>>
>> >terceptor.java:60)
>> >
>> > >         at
>>
>>
>> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>>
>> >n.java:208)
>> >
>> > >         at
>> > > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
>> > >         at
>>
>>
>> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
>>
>> >e(HTTPConduit.java:1955)
>> >
>> > >         at
>>
>>
>> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
>>
>> >duit.java:1791)
>> >
>> > >         at
>>
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>
>> > >         at
>> > > 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
>> > >         at
>>
>>
>> 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
>>
>> >rceptor.handleMessage(MessageSenderInterceptor.java:62)
>> >
>> > >         at
>>
>>
>> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>>
>> >n.java:208)
>> >
>> > >         at
>> >
>> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>> >
>> > >         at
>> >
>> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>> >
>> > >         at
>> > > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>> > >         at
>>
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>>
>> > > How do I know what is wrong with my SecurityHeader?
>> > >
>> > > -Josef
>> > >
>> > >
>> > >
>> > >
>> > > Daniel Kulp <dk...@apache.org>
>> > > 23.07.2008 14:42
>> > > Bitte antworten an
>> > > users@cxf.apache.org
>> > >
>> > >
>> > > An
>> > > users@cxf.apache.org
>> > > Kopie
>> > > user@geronimo.apache.org
>> > > Thema
>> > > Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
>> > >
>> > > On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
>> > >> Hi Kevin, Lin, Daniel, Glen,
>> > >>
>> > >> @Daniel: Your VM-Parameters solved this problem. Thank you very 
much
>> > >> for
>> > >> your help.
>> > >
>> > > Yea, but it definitely shouldn't have been necessary.
>> > >
>> > >> @Glen: Thank you very much for your tipp, we will wait for 
Geronimo
>> > >> 2.1.2
>> > >> and then we have Apache CXF2.0.6...
>> > >
>> > > Actually, CXF 2.0.8.    :-)
>> > >
>> > >> @All: Now I have two new issues ;-)
>> > >> 1) The client is written like described in
>> > >> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server
>> > >> part -
>> > >> because of JavaEE5 - we choose
>>
>>
>> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j

>>
>> >sr-181-interceptor-annotations-xfire-migration/
>> >
>> > >> .
>> > >> In the first run I added
>> > >> @InInterceptors
>> > >> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
>> > >> the WS-Implementation-Class and nothing happend. Afterwards I had 
a
>> > >> try
>> > >> with the interface class and added the same
>> > >> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" 
}).
>> > >> After this changed the class de.myapp.WSSecurityInterceptor was
>> > >> accessed.
>> > >> Why do I have to add @... in implementation AND interface?
>> > >
>> > > Not sure on that.   Feel free to log a CXF bug.    It should be
>> > > possible to just put it on the implementation.   The interface 
should
>> > > be shareable between clients/servers and having interceptors 
defined
>> > > on it that should just be there for the server is not a good thing.
>> > >
>> > >> 2) In the handleMessage(Message message) I receive after:
>> > >> ...
>> > >>                props.put(WSHandlerConstants.PASSWORD_TYPE,
>> > >> WSConstants.PW_TEXT);
>> > >>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>> > >> ServerPasswordCallback.class.getName());
>> > >>
>> > >>                WSS4JInInterceptor wss4jInHandler = new
>> > >> WSS4JInInterceptor(props);
>> > >> ...
>> > >>
>> > >> .........................
>> > >>
>> > >> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in
>>
>> prolog
>>
>> > >> at [row,col {unknown-source}]: [1,0]
>> > >>        at
>> > >> 
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:
>> > >> 661)
>> > >>        at
>> > >> 
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:
>> > >> 2134)
>> > >>        at
>> > >
>> > > With CXF 2.0.2, that stack could result from a BUNCH of things.  We
>> > > actually would get that stack if the server sent back and html 
error
>> > > page without setting a 404 or similar.   Several things can cause
>> > > it.   If you can tcpdump or wireshark the wire transfers to see 
what's
>> > > going on, that would be helpful.    Good news is that this changed 
in
>> > > 2.0.5 to get a better error message.   :-)
>> > >
>> > >
>> > > ---
>> > > Daniel Kulp
>> > > dkulp@apache.org
>> > > http://www.dankulp.com/blog
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > BGS Beratungsgesellschaft
>> > > Software Systemplanung AG
>> > >
>> > >
>> > >
>> > >
>> > > Niederlassung Rhein/Main
>> > > Robert-Koch-Straße 41
>> > > 55129 Mainz
>> > > Fon: +49 (0) 6131 / 914-0
>> > > Fax: +49 (0) 6131 / 914-400
>> > > www.bgs-ag.de
>> > > Geschäftssitz Mainz
>> > > Registergericht
>> > > Amtsgericht Mainz
>> > > HRB 62 50
>> > >
>> > > Aufsichtsratsvorsitzender
>> > > Klaus Hellwig
>> > > Vorstand
>> > > Hanspeter Gau
>> > > Hermann Kiefer
>> > > Nils Manegold
>
>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
> ________________________________
> BGS Beratungsgesellschaft
> Software Systemplanung AG
>   Niederlassung Rhein/Main
> Robert-Koch-Straße 41
> 55129 Mainz
> Fon: +49 (0) 6131 / 914-0
> Fax: +49 (0) 6131 / 914-400
> www.bgs-ag.de Geschäftssitz Mainz
> Registergericht
> Amtsgericht Mainz
> HRB 62 50
>   Aufsichtsratsvorsitzender
> Klaus Hellwig
> Vorstand
> Hanspeter Gau
> Hermann Kiefer
> Nils Manegold
>
>


BGS Beratungsgesellschaft 
Software Systemplanung AG 
  
  
  
  
Niederlassung Rhein/Main 
Robert-Koch-Straße 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Geschäftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 

  

Re: Re: Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Jarek Gawor <jg...@gmail.com>.
First, you don't need to add xml-apis-1.3.02.jar since the QName class
is provided by the JVM now (since 1.5). Can you attach the full stack
trace of the exception you see (when xml-apis-1.3.02.jar is not
included)? And can you also attach the Geronimo deployment descriptor
you are using?

Jarek

On Thu, Aug 7, 2008 at 3:39 AM,  <Jo...@bgs-ag.de> wrote:
>
> Hi all,
>
> this is an issue on the new version 2.1.2 using Webservices. Our application
> works (without WS-Security) under G 2.1.1, but under G 2.1.2 I can't even
> deploy.
>
> -Josef
>
>
>
>
> Daniel Kulp <dk...@apache.org>
>
> 06.08.2008 19:34
>
> An
> users@cxf.apache.org
> Kopie
> Josef.Eisele@bgs-ag.de
> Thema
> Re: Antwort: Re: Change Version of Apache CXF for Geronimo
>
>
>
>
>
> That's something you may need to ask on the geronimo list.   I'm not
> familliar
> with all the classloading details there.
>
> Dan
>
>
> On Wednesday 06 August 2008 3:57:59 am Josef.Eisele@bgs-ag.de wrote:
>> Hi Dan,
>>
>> cool, this is the newest Version of Apache CXF :-)
>>
>> So I took my EAR added the new libs (not contained in Geronimo 2.1.2,
>> why?)
>>        cxf-rt-ws-security-2.0.8.jar
>>        wss4j-1.5.4.jar
>> and tried to deploy to the new Geronimo:
>>
>> ...
>> 09:25:28,770 ERROR [GBeanInstanceState] Error while starting; GBean is now
>> in the FAILED state:
>> abstractName="myapp/app/1.0/ear?configurationName=myapp/app/1.0/ear"
>> org.apache.geronimo.kernel.config.InvalidConfigException: Class not
>> loadable in classloader:
>> [org.apache.geronimo.kernel.config.MultiParentClassLoader
>> id=myapp/app/1.0/ear]
>>         at
>> org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(Seria
>> ...
>> Caused by: java.lang.ClassNotFoundException: Unable to find class used in
>> GBeanData
>>
>> myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name
>>=MyAppEJB.jar, attribute: ejbJarInfo
>>         at
>>
>> org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData
>>.java:293) ... 33 more
>> Caused by: java.lang.ClassNotFoundException: Could not load class
>> javax.xml.namespace.QName from classloader: myapp/app/1.0/ear, destroyed
>> state: false
>>         at
>> org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:213)
>> ...
>>
>> So I thought maybe "xml-apis-1.3.02.jar" is missing, but adding to the EAR
>> leads to:
>>
>> ...
>> Caused by: java.io.InvalidClassException: javax.xml.namespace.QName; local
>> class incompatible: stream classdesc serialVersionUID =
>> -9120448754896609940, local class serialVersionUID = 4418622981026545151
>>         at
>> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
>>         at
>> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
>> ...
>>
>> I need the QName in my Webservice. What can I do to get my App deployed?
>> Thanx in advance.
>>
>> -Josef
>>
>>
>>
>>
>> Daniel Kulp <dk...@apache.org>
>> 05.08.2008 16:42
>> Bitte antworten an
>> users@cxf.apache.org
>>
>>
>> An
>> users@cxf.apache.org
>> Kopie
>>
>> Thema
>> Re: Change Version of Apache CXF for Geronimo
>>
>>
>>
>>
>>
>>
>>
>> You might want to just try Geronimo 2.1.2.   The vote apparently passed
>> last
>> night:
>>
>> http://www.nabble.com/-VOTE--Geronimo-Server-2.1.2-Release-to18746852s134.h
>>tml
>>
>> so it should be made available shortly.   You can download the candidates.
>>
>> 2.1.2 is using CXF 2.0.8.
>>
>>
>> Dan
>>
>> On Tuesday 05 August 2008 6:03:51 am Josef.Eisele@bgs-ag.de wrote:
>> > Hi Glen,
>> >
>> > because I got stuck in solving the problem with Geronimo 2.1.1 and
>> > included CXF 2.0.2 I thought maybe CXF 2.0.8 solves my problem?
>> >
>> > So I tried to change the WS-Stack of my Geronimo from the old version to
>> > CXF 2.0.8. I had certain essays:
>> >
>> > 1) http://www.jroller.com/gmazza/date/20080612:
>> > -> In Geronimo is no <prefer-application-packages> available, I tried
>>
>> with
>>
>> > <inverse-classloading/> but I got a lot of problems with the
>>
>> classloader.
>>
>> > If I added all JARS necessary - see file WHICH_JARS - I got class cast
>> > exceptions, adding a certain minimum leads to NoClassDefError.
>> > <hidden-classes> or <non-overridable-classes>  won't help?
>> > 2) Adding CXF under Services - Repository with a dependency-entry in the
>> > deployment plan:
>> >             <dependency>
>> >                 <groupId>org.apache.cxf</groupId>
>> >                 <artifactId>cxf</artifactId>
>> >                 <version>2.0.8</version>
>> >                 <type>jar</type>
>> >             </dependency>
>> > changed nothing.
>> > 3) ???
>> >
>> > Can you please help?
>> >
>> > -Josef
>> >
>> >
>> >
>> >
>> > Josef.Eisele@bgs-ag.de
>> > 04.08.2008 16:09
>> > Bitte antworten an
>> > users@cxf.apache.org
>> >
>> >
>> > An
>> > users@cxf.apache.org
>> > Kopie
>> >
>> > Thema
>> > Antwort: Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for
>> > Axis2-Classes
>> >
>> >
>> >
>> >
>> >
>> >
>> > Hi Dan,
>> >
>> > I checked your blog and I didn't found big differences in the
>> > code(Server-Part is in my case more JEE5 like - see
>>
>>
>> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j
>>
>> >sr-181-interceptor-annotations-xfire-migration/
>> >
>> > ).
>> >
>> > The difference I see compared with your blog-example is in the request
>> > itself:
>> >
>> > 1) from http://cwiki.apache.org/CXF20DOC/ws-security.html:
>> >      <wsse:Security
>> >          xmlns:wsse="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>
>> >.0.xsd
>> >
>> > "
>> >          soap:mustUnderstand="1">
>> >          <wsse:UsernameToken
>> >             xmlns:wsse="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>
>> >.0.xsd
>> >
>> > "
>> >             xmlns:wsu="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>>
>> >1.0.xsd
>> >
>> > "
>> >             wsu:Id="UsernameToken-25268096">
>> >             <wsse:Username
>> >                xmlns:wsse="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>
>> >.0.xsd
>> >
>> > ">
>> >                joe
>> >             </wsse:Username>
>> >             <wsse:Password
>> >                xmlns:wsse="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>
>> >.0.xsd
>> >
>> > "
>> >                Type="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>>
>> >ile-1.0#PasswordDigest
>> >
>> > ">
>> >                ymyLPVTLrQMBJo82akcw4aBSlJQ=
>> >             </wsse:Password>
>> >             <wsse:Nonce
>> >                xmlns:wsse="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>
>> >.0.xsd
>> >
>> > ">
>> >                MK3TTlJxaevzcFaxV/oKyw==
>> >             </wsse:Nonce>
>> >             <wsu:Created
>> >                xmlns:wsu="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>>
>> >1.0.xsd
>> >
>> > ">
>> >                2008-07-16T23:05:07.300Z
>> >             </wsu:Created>
>> >          </wsse:UsernameToken>
>> >       </wsse:Security>
>> >
>> > 2) my request:
>> > <wsse:Security
>> >     xmlns:wsse="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>
>> >.0.xsd
>> >
>> > "
>> >     soap:mustUnderstand="1">
>> >     <wsse:UsernameToken
>> >         xmlns:wsu="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>>
>> >1.0.xsd
>> >
>> > "
>> >         wsu:Id="UsernameToken-12189822">
>> >     <wsse:Username>
>> >          blabla
>> >     </wsse:Username>
>> >     <wsse:Password
>> >        Type="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>>
>> >ile-1.0#PasswordDigest
>> >
>> > ">
>> >        uIqdbKqsp5VCvM4bPTps1PmnMZI=</wsse:Password>
>> >     <wsse:Nonce>YmoBKVpJrAjM2P3ss7MUNg==</wsse:Nonce>
>> >     <wsu:Created>
>> >        2008-08-04T10:08:15.245Z
>> >     </wsu:Created>
>> >    </wsse:UsernameToken>
>> > </wsse:Security>
>> >
>> >
>> > I miss the namespace
>> > xmlns:wsse="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>
>> >.0.xsd
>> >
>> > "
>> > and not only me but also the WSSecurityUtil.class in line 92:
>> >
>> >         list =
>> > soapHeaderElement.getElementsByTagNameNS(WSConstants.WSSE_NS,
>> >                 WSConstants.WSSE_LN);
>> >
>> > And therefore the method
>> > public static Element getSecurityHeader(Document doc, String actor,
>> > SOAPConstants sc) {
>> >
>> > results in an null-Element. The class WSSecurityEngine and in the end
>> > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor throws the error:
>> >
>> > WARNUNG: Request does not contain required Security header
>> >
>> > What am I doing wrong with WS-Security 1.1 ???? I have now the sources
>>
>> for
>>
>> > apacche-cxf-2.0.2 and wss4j-1.5.1, if I can debug to a certain step let
>>
>> me
>>
>> > know.
>> >
>> > -Josef
>> >
>> >
>> >
>> >
>> >
>> > Glen Mazza <gl...@gmail.com>
>> > 26.07.2008 03:03
>> > Bitte antworten an
>> > users@cxf.apache.org
>> >
>> >
>> > An
>> > users@cxf.apache.org
>> > Kopie
>> >
>> > Thema
>> > Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > Have you checked our documentation on this:
>> > http://cwiki.apache.org/CXF20DOC/ws-security.html
>> >
>> > Also I blogged about this recently, maybe something you can use:
>> > http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to
>> >
>> > HTH,
>> > Glen
>> >
>> > Josef.Eisele wrote:
>> > > Hi Dan,
>> > >
>> > > I solved the last problem copying libraries (xmlsec-1.3.0.jar,
>> > > wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part to
>> >
>> > the
>> >
>> > > EAR-Part:
>> > > (WebContent/WEB-INF/lib -> EarContent/lib)
>> > >
>> > > One Problem solved another arises:
>> > >
>> > > Client writes the SecurityHeader:
>> > > ..
>> > > <wsse:Security xmlns:wsse="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>>
>> >.0.xsd
>> >
>> > > " soap:mustUnderstand="1">
>> > > <wsse:UsernameToken xmlns:wsu="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>>
>> >1.0.xsd
>> >
>> > > " wsu:Id="UsernameToken-12189822">
>> > > <wsse:Username>chef</wsse:Username>
>> > > <wsse:Password Type="
>>
>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>>
>> >ile-1.0#PasswordDigest
>> >
>> > > ">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
>> > > <wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
>> > > <wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
>> > > </wsse:UsernameToken>
>> > > </wsse:Security>
>> > > ...
>> > >
>> > > Server is configured with the interceptor:
>> > > @InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })
>> > >
>> > > In this class I configure 3 Interceptors:
>> > >         public void handleMessage(Message message) throws Fault {
>> > >                 Map<String, Object> props = new HashMap<String,
>> >
>> > Object>();
>> >
>> > >                 props.put(WSHandlerConstants.ACTION,
>> > > WSHandlerConstants.USERNAME_TOKEN);
>> > >                 props.put(WSHandlerConstants.PASSWORD_TYPE,
>> > > WSConstants.PW_DIGEST);
>> > >                 props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>> > > ServerPasswordCallback.class.getName());
>> > >
>> > >                 WSS4JInInterceptor           wss4jInInterceptor   =
>>
>> new
>>
>> > > WSS4JInInterceptor(props);
>> > >                 ValidateUserTokenInterceptor userTokenInterceptor =
>>
>> new
>>
>> > > ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);
>> > >
>> > >                 message.getInterceptorChain().add(wss4jInInterceptor);
>> > >                 //org.apache.cxf.binding.soap.SoapFault: No
>>
>> SOAPMessage
>>
>> > > DOM was found. Please enable the SAAJInInterceptor.
>> > >                 message.getInterceptorChain().add(new
>> > > SAAJInInterceptor());
>> > >  message.getInterceptorChain().add(userTokenInterceptor);
>> > >         }
>> > >
>> > > UserTokenInterceptor works fine, SAAJInInterceptor is necessary
>> >
>> > otherwise
>> >
>> > > excepton but now I get an exception on the wss4jInInterceptor:
>> > >
>> > > 25.07.2008 13:03:44
>>
>> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
>>
>> > > handleMessage
>> > > WARNUNG: Request does not contain required Security header
>> > > 25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain
>> >
>> > doIntercept
>> >
>> > > INFO: Interceptor has thrown exception, unwinding now
>> > > org.apache.cxf.binding.soap.SoapFault: Request does not contain
>>
>> required
>>
>> > > Security header.
>> > >         at
>>
>>
>> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>>
>> >terceptor.java:153)
>> >
>> > >         at
>>
>>
>> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>>
>> >terceptor.java:60)
>> >
>> > >         at
>>
>>
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>>
>> >n.java:208)
>> >
>> > >         at
>> > > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
>> > >         at
>>
>>
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
>>
>> >e(HTTPConduit.java:1955)
>> >
>> > >         at
>>
>>
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
>>
>> >duit.java:1791)
>> >
>> > >         at
>>
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>
>> > >         at
>> > > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
>> > >         at
>>
>>
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
>>
>> >rceptor.handleMessage(MessageSenderInterceptor.java:62)
>> >
>> > >         at
>>
>>
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>>
>> >n.java:208)
>> >
>> > >         at
>> >
>> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>> >
>> > >         at
>> >
>> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>> >
>> > >         at
>> > > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>> > >         at
>>
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>>
>> > > How do I know what is wrong with my SecurityHeader?
>> > >
>> > > -Josef
>> > >
>> > >
>> > >
>> > >
>> > > Daniel Kulp <dk...@apache.org>
>> > > 23.07.2008 14:42
>> > > Bitte antworten an
>> > > users@cxf.apache.org
>> > >
>> > >
>> > > An
>> > > users@cxf.apache.org
>> > > Kopie
>> > > user@geronimo.apache.org
>> > > Thema
>> > > Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
>> > >
>> > > On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
>> > >> Hi Kevin, Lin, Daniel, Glen,
>> > >>
>> > >> @Daniel: Your VM-Parameters solved this problem. Thank you very much
>> > >> for
>> > >> your help.
>> > >
>> > > Yea, but it definitely shouldn't have been necessary.
>> > >
>> > >> @Glen: Thank you very much for your tipp, we will wait for Geronimo
>> > >> 2.1.2
>> > >> and then we have Apache CXF2.0.6...
>> > >
>> > > Actually, CXF 2.0.8.    :-)
>> > >
>> > >> @All: Now I have two new issues ;-)
>> > >> 1) The client is written like described in
>> > >> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server
>> > >> part -
>> > >> because of JavaEE5 - we choose
>>
>>
>> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j
>>
>> >sr-181-interceptor-annotations-xfire-migration/
>> >
>> > >> .
>> > >> In the first run I added
>> > >> @InInterceptors
>> > >> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
>> > >> the WS-Implementation-Class and nothing happend. Afterwards I had a
>> > >> try
>> > >> with the interface class and added the same
>> > >> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
>> > >> After this changed the class de.myapp.WSSecurityInterceptor was
>> > >> accessed.
>> > >> Why do I have to add @... in implementation AND interface?
>> > >
>> > > Not sure on that.   Feel free to log a CXF bug.    It should be
>> > > possible to just put it on the implementation.   The interface should
>> > > be shareable between clients/servers and having interceptors defined
>> > > on it that should just be there for the server is not a good thing.
>> > >
>> > >> 2) In the handleMessage(Message message) I receive after:
>> > >> ...
>> > >>                props.put(WSHandlerConstants.PASSWORD_TYPE,
>> > >> WSConstants.PW_TEXT);
>> > >>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>> > >> ServerPasswordCallback.class.getName());
>> > >>
>> > >>                WSS4JInInterceptor wss4jInHandler = new
>> > >> WSS4JInInterceptor(props);
>> > >> ...
>> > >>
>> > >> .........................
>> > >>
>> > >> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in
>>
>> prolog
>>
>> > >> at [row,col {unknown-source}]: [1,0]
>> > >>        at
>> > >> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:
>> > >> 661)
>> > >>        at
>> > >> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:
>> > >> 2134)
>> > >>        at
>> > >
>> > > With CXF 2.0.2, that stack could result from a BUNCH of things.  We
>> > > actually would get that stack if the server sent back and html error
>> > > page without setting a 404 or similar.   Several things can cause
>> > > it.   If you can tcpdump or wireshark the wire transfers to see what's
>> > > going on, that would be helpful.    Good news is that this changed in
>> > > 2.0.5 to get a better error message.   :-)
>> > >
>> > >
>> > > ---
>> > > Daniel Kulp
>> > > dkulp@apache.org
>> > > http://www.dankulp.com/blog
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > BGS Beratungsgesellschaft
>> > > Software Systemplanung AG
>> > >
>> > >
>> > >
>> > >
>> > > Niederlassung Rhein/Main
>> > > Robert-Koch-Straße 41
>> > > 55129 Mainz
>> > > Fon: +49 (0) 6131 / 914-0
>> > > Fax: +49 (0) 6131 / 914-400
>> > > www.bgs-ag.de
>> > > Geschäftssitz Mainz
>> > > Registergericht
>> > > Amtsgericht Mainz
>> > > HRB 62 50
>> > >
>> > > Aufsichtsratsvorsitzender
>> > > Klaus Hellwig
>> > > Vorstand
>> > > Hanspeter Gau
>> > > Hermann Kiefer
>> > > Nils Manegold
>
>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
> ________________________________
> BGS Beratungsgesellschaft
> Software Systemplanung AG
>   Niederlassung Rhein/Main
> Robert-Koch-Straße 41
> 55129 Mainz
> Fon: +49 (0) 6131 / 914-0
> Fax: +49 (0) 6131 / 914-400
> www.bgs-ag.de Geschäftssitz Mainz
> Registergericht
> Amtsgericht Mainz
> HRB 62 50
>   Aufsichtsratsvorsitzender
> Klaus Hellwig
> Vorstand
> Hanspeter Gau
> Hermann Kiefer
> Nils Manegold
>
>

Antwort: Re: Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Jo...@bgs-ag.de.
Hi all,

this is an issue on the new version 2.1.2 using Webservices. Our 
application works (without WS-Security) under G 2.1.1, but under G 2.1.2 I 
can't even deploy.

-Josef





Daniel Kulp <dk...@apache.org> 
06.08.2008 19:34

An
users@cxf.apache.org
Kopie
Josef.Eisele@bgs-ag.de
Thema
Re: Antwort: Re: Change Version of Apache CXF for Geronimo







That's something you may need to ask on the geronimo list.   I'm not 
familliar 
with all the classloading details there.

Dan


On Wednesday 06 August 2008 3:57:59 am Josef.Eisele@bgs-ag.de wrote:
> Hi Dan,
>
> cool, this is the newest Version of Apache CXF :-)
>
> So I took my EAR added the new libs (not contained in Geronimo 2.1.2,
> why?)
>        cxf-rt-ws-security-2.0.8.jar
>        wss4j-1.5.4.jar
> and tried to deploy to the new Geronimo:
>
> ...
> 09:25:28,770 ERROR [GBeanInstanceState] Error while starting; GBean is 
now
> in the FAILED state:
> abstractName="myapp/app/1.0/ear?configurationName=myapp/app/1.0/ear"
> org.apache.geronimo.kernel.config.InvalidConfigException: Class not
> loadable in classloader:
> [org.apache.geronimo.kernel.config.MultiParentClassLoader
> id=myapp/app/1.0/ear]
>         at
> org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(Seria
> ...
> Caused by: java.lang.ClassNotFoundException: Unable to find class used 
in
> GBeanData
> 
myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name
>=MyAppEJB.jar, attribute: ejbJarInfo
>         at
> 
org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData
>.java:293) ... 33 more
> Caused by: java.lang.ClassNotFoundException: Could not load class
> javax.xml.namespace.QName from classloader: myapp/app/1.0/ear, destroyed
> state: false
>         at
> org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:213)
> ...
>
> So I thought maybe "xml-apis-1.3.02.jar" is missing, but adding to the 
EAR
> leads to:
>
> ...
> Caused by: java.io.InvalidClassException: javax.xml.namespace.QName; 
local
> class incompatible: stream classdesc serialVersionUID =
> -9120448754896609940, local class serialVersionUID = 4418622981026545151
>         at
> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
>         at
> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
> ...
>
> I need the QName in my Webservice. What can I do to get my App deployed?
> Thanx in advance.
>
> -Josef
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05.08.2008 16:42
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Change Version of Apache CXF for Geronimo
>
>
>
>
>
>
>
> You might want to just try Geronimo 2.1.2.   The vote apparently passed
> last
> night:
> 
http://www.nabble.com/-VOTE--Geronimo-Server-2.1.2-Release-to18746852s134.h

>tml
>
> so it should be made available shortly.   You can download the 
candidates.
>
> 2.1.2 is using CXF 2.0.8.
>
>
> Dan
>
> On Tuesday 05 August 2008 6:03:51 am Josef.Eisele@bgs-ag.de wrote:
> > Hi Glen,
> >
> > because I got stuck in solving the problem with Geronimo 2.1.1 and
> > included CXF 2.0.2 I thought maybe CXF 2.0.8 solves my problem?
> >
> > So I tried to change the WS-Stack of my Geronimo from the old version 
to
> > CXF 2.0.8. I had certain essays:
> >
> > 1) http://www.jroller.com/gmazza/date/20080612:
> > -> In Geronimo is no <prefer-application-packages> available, I tried
>
> with
>
> > <inverse-classloading/> but I got a lot of problems with the
>
> classloader.
>
> > If I added all JARS necessary - see file WHICH_JARS - I got class cast
> > exceptions, adding a certain minimum leads to NoClassDefError.
> > <hidden-classes> or <non-overridable-classes>  won't help?
> > 2) Adding CXF under Services - Repository with a dependency-entry in 
the
> > deployment plan:
> >             <dependency>
> >                 <groupId>org.apache.cxf</groupId>
> >                 <artifactId>cxf</artifactId>
> >                 <version>2.0.8</version>
> >                 <type>jar</type>
> >             </dependency>
> > changed nothing.
> > 3) ???
> >
> > Can you please help?
> >
> > -Josef
> >
> >
> >
> >
> > Josef.Eisele@bgs-ag.de
> > 04.08.2008 16:09
> > Bitte antworten an
> > users@cxf.apache.org
> >
> >
> > An
> > users@cxf.apache.org
> > Kopie
> >
> > Thema
> > Antwort: Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for
> > Axis2-Classes
> >
> >
> >
> >
> >
> >
> > Hi Dan,
> >
> > I checked your blog and I didn't found big differences in the
> > code(Server-Part is in my case more JEE5 like - see
>
> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j

>
> >sr-181-interceptor-annotations-xfire-migration/
> >
> > ).
> >
> > The difference I see compared with your blog-example is in the request
> > itself:
> >
> > 1) from http://cwiki.apache.org/CXF20DOC/ws-security.html:
> >      <wsse:Security
> >          xmlns:wsse="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>
> >.0.xsd
> >
> > "
> >          soap:mustUnderstand="1">
> >          <wsse:UsernameToken
> >             xmlns:wsse="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>
> >.0.xsd
> >
> > "
> >             xmlns:wsu="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>
> >1.0.xsd
> >
> > "
> >             wsu:Id="UsernameToken-25268096">
> >             <wsse:Username
> >                xmlns:wsse="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>
> >.0.xsd
> >
> > ">
> >                joe
> >             </wsse:Username>
> >             <wsse:Password
> >                xmlns:wsse="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>
> >.0.xsd
> >
> > "
> >                Type="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>
> >ile-1.0#PasswordDigest
> >
> > ">
> >                ymyLPVTLrQMBJo82akcw4aBSlJQ=
> >             </wsse:Password>
> >             <wsse:Nonce
> >                xmlns:wsse="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>
> >.0.xsd
> >
> > ">
> >                MK3TTlJxaevzcFaxV/oKyw==
> >             </wsse:Nonce>
> >             <wsu:Created
> >                xmlns:wsu="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>
> >1.0.xsd
> >
> > ">
> >                2008-07-16T23:05:07.300Z
> >             </wsu:Created>
> >          </wsse:UsernameToken>
> >       </wsse:Security>
> >
> > 2) my request:
> > <wsse:Security
> >     xmlns:wsse="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>
> >.0.xsd
> >
> > "
> >     soap:mustUnderstand="1">
> >     <wsse:UsernameToken
> >         xmlns:wsu="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>
> >1.0.xsd
> >
> > "
> >         wsu:Id="UsernameToken-12189822">
> >     <wsse:Username>
> >          blabla
> >     </wsse:Username>
> >     <wsse:Password
> >        Type="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>
> >ile-1.0#PasswordDigest
> >
> > ">
> >        uIqdbKqsp5VCvM4bPTps1PmnMZI=</wsse:Password>
> >     <wsse:Nonce>YmoBKVpJrAjM2P3ss7MUNg==</wsse:Nonce>
> >     <wsu:Created>
> >        2008-08-04T10:08:15.245Z
> >     </wsu:Created>
> >    </wsse:UsernameToken>
> > </wsse:Security>
> >
> >
> > I miss the namespace
> > xmlns:wsse="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>
> >.0.xsd
> >
> > "
> > and not only me but also the WSSecurityUtil.class in line 92:
> >
> >         list =
> > soapHeaderElement.getElementsByTagNameNS(WSConstants.WSSE_NS,
> >                 WSConstants.WSSE_LN);
> >
> > And therefore the method
> > public static Element getSecurityHeader(Document doc, String actor,
> > SOAPConstants sc) {
> >
> > results in an null-Element. The class WSSecurityEngine and in the end
> > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor throws the error:
> >
> > WARNUNG: Request does not contain required Security header
> >
> > What am I doing wrong with WS-Security 1.1 ???? I have now the sources
>
> for
>
> > apacche-cxf-2.0.2 and wss4j-1.5.1, if I can debug to a certain step 
let
>
> me
>
> > know.
> >
> > -Josef
> >
> >
> >
> >
> >
> > Glen Mazza <gl...@gmail.com>
> > 26.07.2008 03:03
> > Bitte antworten an
> > users@cxf.apache.org
> >
> >
> > An
> > users@cxf.apache.org
> > Kopie
> >
> > Thema
> > Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for 
Axis2-Classes
> >
> >
> >
> >
> >
> >
> >
> > Have you checked our documentation on this:
> > http://cwiki.apache.org/CXF20DOC/ws-security.html
> >
> > Also I blogged about this recently, maybe something you can use:
> > http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to
> >
> > HTH,
> > Glen
> >
> > Josef.Eisele wrote:
> > > Hi Dan,
> > >
> > > I solved the last problem copying libraries (xmlsec-1.3.0.jar,
> > > wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part 
to
> >
> > the
> >
> > > EAR-Part:
> > > (WebContent/WEB-INF/lib -> EarContent/lib)
> > >
> > > One Problem solved another arises:
> > >
> > > Client writes the SecurityHeader:
> > > ..
> > > <wsse:Security xmlns:wsse="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>
> >.0.xsd
> >
> > > " soap:mustUnderstand="1">
> > > <wsse:UsernameToken xmlns:wsu="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>
> >1.0.xsd
> >
> > > " wsu:Id="UsernameToken-12189822">
> > > <wsse:Username>chef</wsse:Username>
> > > <wsse:Password Type="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>
> >ile-1.0#PasswordDigest
> >
> > > ">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
> > > <wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
> > > <wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
> > > </wsse:UsernameToken>
> > > </wsse:Security>
> > > ...
> > >
> > > Server is configured with the interceptor:
> > > @InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })
> > >
> > > In this class I configure 3 Interceptors:
> > >         public void handleMessage(Message message) throws Fault {
> > >                 Map<String, Object> props = new HashMap<String,
> >
> > Object>();
> >
> > >                 props.put(WSHandlerConstants.ACTION,
> > > WSHandlerConstants.USERNAME_TOKEN);
> > >                 props.put(WSHandlerConstants.PASSWORD_TYPE,
> > > WSConstants.PW_DIGEST);
> > >                 props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> > > ServerPasswordCallback.class.getName());
> > >
> > >                 WSS4JInInterceptor           wss4jInInterceptor   =
>
> new
>
> > > WSS4JInInterceptor(props);
> > >                 ValidateUserTokenInterceptor userTokenInterceptor =
>
> new
>
> > > ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);
> > >
> > > message.getInterceptorChain().add(wss4jInInterceptor);
> > >                 //org.apache.cxf.binding.soap.SoapFault: No
>
> SOAPMessage
>
> > > DOM was found. Please enable the SAAJInInterceptor.
> > >                 message.getInterceptorChain().add(new
> > > SAAJInInterceptor());
> > >  message.getInterceptorChain().add(userTokenInterceptor);
> > >         }
> > >
> > > UserTokenInterceptor works fine, SAAJInInterceptor is necessary
> >
> > otherwise
> >
> > > excepton but now I get an exception on the wss4jInInterceptor:
> > >
> > > 25.07.2008 13:03:44
>
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
>
> > > handleMessage
> > > WARNUNG: Request does not contain required Security header
> > > 25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain
> >
> > doIntercept
> >
> > > INFO: Interceptor has thrown exception, unwinding now
> > > org.apache.cxf.binding.soap.SoapFault: Request does not contain
>
> required
>
> > > Security header.
> > >         at
>
> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>
> >terceptor.java:153)
> >
> > >         at
>
> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>
> >terceptor.java:60)
> >
> > >         at
>
> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>
> >n.java:208)
> >
> > >         at
> > > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
> > >         at
>
> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
>
> >e(HTTPConduit.java:1955)
> >
> > >         at
>
> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
>
> >duit.java:1791)
> >
> > >         at
>
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>
> > >         at
> > > 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
> > >         at
>
> 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
>
> >rceptor.handleMessage(MessageSenderInterceptor.java:62)
> >
> > >         at
>
> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>
> >n.java:208)
> >
> > >         at
> >
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
> >
> > >         at
> >
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
> >
> > >         at
> > > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> > >         at
>
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>
> > > How do I know what is wrong with my SecurityHeader?
> > >
> > > -Josef
> > >
> > >
> > >
> > >
> > > Daniel Kulp <dk...@apache.org>
> > > 23.07.2008 14:42
> > > Bitte antworten an
> > > users@cxf.apache.org
> > >
> > >
> > > An
> > > users@cxf.apache.org
> > > Kopie
> > > user@geronimo.apache.org
> > > Thema
> > > Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
> > >
> > > On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
> > >> Hi Kevin, Lin, Daniel, Glen,
> > >>
> > >> @Daniel: Your VM-Parameters solved this problem. Thank you very 
much
> > >> for
> > >> your help.
> > >
> > > Yea, but it definitely shouldn't have been necessary.
> > >
> > >> @Glen: Thank you very much for your tipp, we will wait for Geronimo
> > >> 2.1.2
> > >> and then we have Apache CXF2.0.6...
> > >
> > > Actually, CXF 2.0.8.    :-)
> > >
> > >> @All: Now I have two new issues ;-)
> > >> 1) The client is written like described in
> > >> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server
> > >> part -
> > >> because of JavaEE5 - we choose
>
> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j

>
> >sr-181-interceptor-annotations-xfire-migration/
> >
> > >> .
> > >> In the first run I added
> > >> @InInterceptors
> > >> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
> > >> the WS-Implementation-Class and nothing happend. Afterwards I had a
> > >> try
> > >> with the interface class and added the same
> > >> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" 
}).
> > >> After this changed the class de.myapp.WSSecurityInterceptor was
> > >> accessed.
> > >> Why do I have to add @... in implementation AND interface?
> > >
> > > Not sure on that.   Feel free to log a CXF bug.    It should be
> > > possible to just put it on the implementation.   The interface 
should
> > > be shareable between clients/servers and having interceptors defined
> > > on it that should just be there for the server is not a good thing.
> > >
> > >> 2) In the handleMessage(Message message) I receive after:
> > >> ...
> > >>                props.put(WSHandlerConstants.PASSWORD_TYPE,
> > >> WSConstants.PW_TEXT);
> > >>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> > >> ServerPasswordCallback.class.getName());
> > >>
> > >>                WSS4JInInterceptor wss4jInHandler = new
> > >> WSS4JInInterceptor(props);
> > >> ...
> > >>
> > >> .........................
> > >>
> > >> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in
>
> prolog
>
> > >> at [row,col {unknown-source}]: [1,0]
> > >>        at
> > >> 
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:
> > >> 661)
> > >>        at
> > >> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:
> > >> 2134)
> > >>        at
> > >
> > > With CXF 2.0.2, that stack could result from a BUNCH of things.  We
> > > actually would get that stack if the server sent back and html error
> > > page without setting a 404 or similar.   Several things can cause
> > > it.   If you can tcpdump or wireshark the wire transfers to see 
what's
> > > going on, that would be helpful.    Good news is that this changed 
in
> > > 2.0.5 to get a better error message.   :-)
> > >
> > >
> > > ---
> > > Daniel Kulp
> > > dkulp@apache.org
> > > http://www.dankulp.com/blog
> > >
> > >
> > >
> > >
> > >
> > >
> > > BGS Beratungsgesellschaft
> > > Software Systemplanung AG
> > >
> > >
> > >
> > >
> > > Niederlassung Rhein/Main
> > > Robert-Koch-Straße 41
> > > 55129 Mainz
> > > Fon: +49 (0) 6131 / 914-0
> > > Fax: +49 (0) 6131 / 914-400
> > > www.bgs-ag.de
> > > Geschäftssitz Mainz
> > > Registergericht
> > > Amtsgericht Mainz
> > > HRB 62 50
> > >
> > > Aufsichtsratsvorsitzender
> > > Klaus Hellwig
> > > Vorstand
> > > Hanspeter Gau
> > > Hermann Kiefer
> > > Nils Manegold



-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog


BGS Beratungsgesellschaft 
Software Systemplanung AG         Niederlassung Rhein/Main 
Robert-Koch-Straße 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de Geschäftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 


  

Re: Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Daniel Kulp <dk...@apache.org>.
That's something you may need to ask on the geronimo list.   I'm not familliar 
with all the classloading details there.

Dan


On Wednesday 06 August 2008 3:57:59 am Josef.Eisele@bgs-ag.de wrote:
> Hi Dan,
>
> cool, this is the newest Version of Apache CXF :-)
>
> So I took my EAR added the new libs (not contained in Geronimo 2.1.2,
> why?)
>        cxf-rt-ws-security-2.0.8.jar
>        wss4j-1.5.4.jar
> and tried to deploy to the new Geronimo:
>
> ...
> 09:25:28,770 ERROR [GBeanInstanceState] Error while starting; GBean is now
> in the FAILED state:
> abstractName="myapp/app/1.0/ear?configurationName=myapp/app/1.0/ear"
> org.apache.geronimo.kernel.config.InvalidConfigException: Class not
> loadable in classloader:
> [org.apache.geronimo.kernel.config.MultiParentClassLoader
> id=myapp/app/1.0/ear]
>         at
> org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(Seria
> ...
> Caused by: java.lang.ClassNotFoundException: Unable to find class used in
> GBeanData
> myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name
>=MyAppEJB.jar, attribute: ejbJarInfo
>         at
> org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData
>.java:293) ... 33 more
> Caused by: java.lang.ClassNotFoundException: Could not load class
> javax.xml.namespace.QName from classloader: myapp/app/1.0/ear, destroyed
> state: false
>         at
> org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:213)
> ...
>
> So I thought maybe "xml-apis-1.3.02.jar" is missing, but adding to the EAR
> leads to:
>
> ...
> Caused by: java.io.InvalidClassException: javax.xml.namespace.QName; local
> class incompatible: stream classdesc serialVersionUID =
> -9120448754896609940, local class serialVersionUID = 4418622981026545151
>         at
> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
>         at
> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
> ...
>
> I need the QName in my Webservice. What can I do to get my App deployed?
> Thanx in advance.
>
> -Josef
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05.08.2008 16:42
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Change Version of Apache CXF for Geronimo
>
>
>
>
>
>
>
> You might want to just try Geronimo 2.1.2.   The vote apparently passed
> last
> night:
> http://www.nabble.com/-VOTE--Geronimo-Server-2.1.2-Release-to18746852s134.h
>tml
>
> so it should be made available shortly.   You can download the candidates.
>
> 2.1.2 is using CXF 2.0.8.
>
>
> Dan
>
> On Tuesday 05 August 2008 6:03:51 am Josef.Eisele@bgs-ag.de wrote:
> > Hi Glen,
> >
> > because I got stuck in solving the problem with Geronimo 2.1.1 and
> > included CXF 2.0.2 I thought maybe CXF 2.0.8 solves my problem?
> >
> > So I tried to change the WS-Stack of my Geronimo from the old version to
> > CXF 2.0.8. I had certain essays:
> >
> > 1) http://www.jroller.com/gmazza/date/20080612:
> > -> In Geronimo is no <prefer-application-packages> available, I tried
>
> with
>
> > <inverse-classloading/> but I got a lot of problems with the
>
> classloader.
>
> > If I added all JARS necessary - see file WHICH_JARS - I got class cast
> > exceptions, adding a certain minimum leads to NoClassDefError.
> > <hidden-classes> or <non-overridable-classes>  won't help?
> > 2) Adding CXF under Services - Repository with a dependency-entry in the
> > deployment plan:
> >             <dependency>
> >                 <groupId>org.apache.cxf</groupId>
> >                 <artifactId>cxf</artifactId>
> >                 <version>2.0.8</version>
> >                 <type>jar</type>
> >             </dependency>
> > changed nothing.
> > 3) ???
> >
> > Can you please help?
> >
> > -Josef
> >
> >
> >
> >
> > Josef.Eisele@bgs-ag.de
> > 04.08.2008 16:09
> > Bitte antworten an
> > users@cxf.apache.org
> >
> >
> > An
> > users@cxf.apache.org
> > Kopie
> >
> > Thema
> > Antwort: Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for
> > Axis2-Classes
> >
> >
> >
> >
> >
> >
> > Hi Dan,
> >
> > I checked your blog and I didn't found big differences in the
> > code(Server-Part is in my case more JEE5 like - see
>
> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j
>
> >sr-181-interceptor-annotations-xfire-migration/
> >
> > ).
> >
> > The difference I see compared with your blog-example is in the request
> > itself:
> >
> > 1) from http://cwiki.apache.org/CXF20DOC/ws-security.html:
> >      <wsse:Security
> >          xmlns:wsse="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>
> >.0.xsd
> >
> > "
> >          soap:mustUnderstand="1">
> >          <wsse:UsernameToken
> >             xmlns:wsse="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>
> >.0.xsd
> >
> > "
> >             xmlns:wsu="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>
> >1.0.xsd
> >
> > "
> >             wsu:Id="UsernameToken-25268096">
> >             <wsse:Username
> >                xmlns:wsse="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>
> >.0.xsd
> >
> > ">
> >                joe
> >             </wsse:Username>
> >             <wsse:Password
> >                xmlns:wsse="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>
> >.0.xsd
> >
> > "
> >                Type="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>
> >ile-1.0#PasswordDigest
> >
> > ">
> >                ymyLPVTLrQMBJo82akcw4aBSlJQ=
> >             </wsse:Password>
> >             <wsse:Nonce
> >                xmlns:wsse="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>
> >.0.xsd
> >
> > ">
> >                MK3TTlJxaevzcFaxV/oKyw==
> >             </wsse:Nonce>
> >             <wsu:Created
> >                xmlns:wsu="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>
> >1.0.xsd
> >
> > ">
> >                2008-07-16T23:05:07.300Z
> >             </wsu:Created>
> >          </wsse:UsernameToken>
> >       </wsse:Security>
> >
> > 2) my request:
> > <wsse:Security
> >     xmlns:wsse="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>
> >.0.xsd
> >
> > "
> >     soap:mustUnderstand="1">
> >     <wsse:UsernameToken
> >         xmlns:wsu="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>
> >1.0.xsd
> >
> > "
> >         wsu:Id="UsernameToken-12189822">
> >     <wsse:Username>
> >          blabla
> >     </wsse:Username>
> >     <wsse:Password
> >        Type="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>
> >ile-1.0#PasswordDigest
> >
> > ">
> >        uIqdbKqsp5VCvM4bPTps1PmnMZI=</wsse:Password>
> >     <wsse:Nonce>YmoBKVpJrAjM2P3ss7MUNg==</wsse:Nonce>
> >     <wsu:Created>
> >        2008-08-04T10:08:15.245Z
> >     </wsu:Created>
> >    </wsse:UsernameToken>
> > </wsse:Security>
> >
> >
> > I miss the namespace
> > xmlns:wsse="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>
> >.0.xsd
> >
> > "
> > and not only me but also the WSSecurityUtil.class in line 92:
> >
> >         list =
> > soapHeaderElement.getElementsByTagNameNS(WSConstants.WSSE_NS,
> >                 WSConstants.WSSE_LN);
> >
> > And therefore the method
> > public static Element getSecurityHeader(Document doc, String actor,
> > SOAPConstants sc) {
> >
> > results in an null-Element. The class WSSecurityEngine and in the end
> > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor throws the error:
> >
> > WARNUNG: Request does not contain required Security header
> >
> > What am I doing wrong with WS-Security 1.1 ???? I have now the sources
>
> for
>
> > apacche-cxf-2.0.2 and wss4j-1.5.1, if I can debug to a certain step let
>
> me
>
> > know.
> >
> > -Josef
> >
> >
> >
> >
> >
> > Glen Mazza <gl...@gmail.com>
> > 26.07.2008 03:03
> > Bitte antworten an
> > users@cxf.apache.org
> >
> >
> > An
> > users@cxf.apache.org
> > Kopie
> >
> > Thema
> > Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
> >
> >
> >
> >
> >
> >
> >
> > Have you checked our documentation on this:
> > http://cwiki.apache.org/CXF20DOC/ws-security.html
> >
> > Also I blogged about this recently, maybe something you can use:
> > http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to
> >
> > HTH,
> > Glen
> >
> > Josef.Eisele wrote:
> > > Hi Dan,
> > >
> > > I solved the last problem copying libraries (xmlsec-1.3.0.jar,
> > > wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part to
> >
> > the
> >
> > > EAR-Part:
> > > (WebContent/WEB-INF/lib -> EarContent/lib)
> > >
> > > One Problem solved another arises:
> > >
> > > Client writes the SecurityHeader:
> > > ..
> > > <wsse:Security xmlns:wsse="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>
> >.0.xsd
> >
> > > " soap:mustUnderstand="1">
> > > <wsse:UsernameToken xmlns:wsu="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>
> >1.0.xsd
> >
> > > " wsu:Id="UsernameToken-12189822">
> > > <wsse:Username>chef</wsse:Username>
> > > <wsse:Password Type="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>
> >ile-1.0#PasswordDigest
> >
> > > ">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
> > > <wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
> > > <wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
> > > </wsse:UsernameToken>
> > > </wsse:Security>
> > > ...
> > >
> > > Server is configured with the interceptor:
> > > @InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })
> > >
> > > In this class I configure 3 Interceptors:
> > >         public void handleMessage(Message message) throws Fault {
> > >                 Map<String, Object> props = new HashMap<String,
> >
> > Object>();
> >
> > >                 props.put(WSHandlerConstants.ACTION,
> > > WSHandlerConstants.USERNAME_TOKEN);
> > >                 props.put(WSHandlerConstants.PASSWORD_TYPE,
> > > WSConstants.PW_DIGEST);
> > >                 props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> > > ServerPasswordCallback.class.getName());
> > >
> > >                 WSS4JInInterceptor           wss4jInInterceptor   =
>
> new
>
> > > WSS4JInInterceptor(props);
> > >                 ValidateUserTokenInterceptor userTokenInterceptor =
>
> new
>
> > > ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);
> > >
> > >                 message.getInterceptorChain().add(wss4jInInterceptor);
> > >                 //org.apache.cxf.binding.soap.SoapFault: No
>
> SOAPMessage
>
> > > DOM was found. Please enable the SAAJInInterceptor.
> > >                 message.getInterceptorChain().add(new
> > > SAAJInInterceptor());
> > >  message.getInterceptorChain().add(userTokenInterceptor);
> > >         }
> > >
> > > UserTokenInterceptor works fine, SAAJInInterceptor is necessary
> >
> > otherwise
> >
> > > excepton but now I get an exception on the wss4jInInterceptor:
> > >
> > > 25.07.2008 13:03:44
>
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
>
> > > handleMessage
> > > WARNUNG: Request does not contain required Security header
> > > 25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain
> >
> > doIntercept
> >
> > > INFO: Interceptor has thrown exception, unwinding now
> > > org.apache.cxf.binding.soap.SoapFault: Request does not contain
>
> required
>
> > > Security header.
> > >         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>
> >terceptor.java:153)
> >
> > >         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>
> >terceptor.java:60)
> >
> > >         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>
> >n.java:208)
> >
> > >         at
> > > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
> > >         at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
>
> >e(HTTPConduit.java:1955)
> >
> > >         at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
>
> >duit.java:1791)
> >
> > >         at
>
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>
> > >         at
> > > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
> > >         at
>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
>
> >rceptor.handleMessage(MessageSenderInterceptor.java:62)
> >
> > >         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>
> >n.java:208)
> >
> > >         at
> >
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
> >
> > >         at
> >
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
> >
> > >         at
> > > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> > >         at
>
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>
> > > How do I know what is wrong with my SecurityHeader?
> > >
> > > -Josef
> > >
> > >
> > >
> > >
> > > Daniel Kulp <dk...@apache.org>
> > > 23.07.2008 14:42
> > > Bitte antworten an
> > > users@cxf.apache.org
> > >
> > >
> > > An
> > > users@cxf.apache.org
> > > Kopie
> > > user@geronimo.apache.org
> > > Thema
> > > Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
> > >
> > > On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
> > >> Hi Kevin, Lin, Daniel, Glen,
> > >>
> > >> @Daniel: Your VM-Parameters solved this problem. Thank you very much
> > >> for
> > >> your help.
> > >
> > > Yea, but it definitely shouldn't have been necessary.
> > >
> > >> @Glen: Thank you very much for your tipp, we will wait for Geronimo
> > >> 2.1.2
> > >> and then we have Apache CXF2.0.6...
> > >
> > > Actually, CXF 2.0.8.    :-)
> > >
> > >> @All: Now I have two new issues ;-)
> > >> 1) The client is written like described in
> > >> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server
> > >> part -
> > >> because of JavaEE5 - we choose
>
> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j
>
> >sr-181-interceptor-annotations-xfire-migration/
> >
> > >> .
> > >> In the first run I added
> > >> @InInterceptors
> > >> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
> > >> the WS-Implementation-Class and nothing happend. Afterwards I had a
> > >> try
> > >> with the interface class and added the same
> > >> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
> > >> After this changed the class de.myapp.WSSecurityInterceptor was
> > >> accessed.
> > >> Why do I have to add @... in implementation AND interface?
> > >
> > > Not sure on that.   Feel free to log a CXF bug.    It should be
> > > possible to just put it on the implementation.   The interface should
> > > be shareable between clients/servers and having interceptors defined
> > > on it that should just be there for the server is not a good thing.
> > >
> > >> 2) In the handleMessage(Message message) I receive after:
> > >> ...
> > >>                props.put(WSHandlerConstants.PASSWORD_TYPE,
> > >> WSConstants.PW_TEXT);
> > >>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> > >> ServerPasswordCallback.class.getName());
> > >>
> > >>                WSS4JInInterceptor wss4jInHandler = new
> > >> WSS4JInInterceptor(props);
> > >> ...
> > >>
> > >> .........................
> > >>
> > >> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in
>
> prolog
>
> > >> at [row,col {unknown-source}]: [1,0]
> > >>        at
> > >> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:
> > >> 661)
> > >>        at
> > >> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:
> > >> 2134)
> > >>        at
> > >
> > > With CXF 2.0.2, that stack could result from a BUNCH of things.  We
> > > actually would get that stack if the server sent back and html error
> > > page without setting a 404 or similar.   Several things can cause
> > > it.   If you can tcpdump or wireshark the wire transfers to see what's
> > > going on, that would be helpful.    Good news is that this changed in
> > > 2.0.5 to get a better error message.   :-)
> > >
> > >
> > > ---
> > > Daniel Kulp
> > > dkulp@apache.org
> > > http://www.dankulp.com/blog
> > >
> > >
> > >
> > >
> > >
> > >
> > > BGS Beratungsgesellschaft
> > > Software Systemplanung AG
> > >
> > >
> > >
> > >
> > > Niederlassung Rhein/Main
> > > Robert-Koch-Straße 41
> > > 55129 Mainz
> > > Fon: +49 (0) 6131 / 914-0
> > > Fax: +49 (0) 6131 / 914-400
> > > www.bgs-ag.de
> > > Geschäftssitz Mainz
> > > Registergericht
> > > Amtsgericht Mainz
> > > HRB 62 50
> > >
> > > Aufsichtsratsvorsitzender
> > > Klaus Hellwig
> > > Vorstand
> > > Hanspeter Gau
> > > Hermann Kiefer
> > > Nils Manegold



-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Antwort: Re: Change Version of Apache CXF for Geronimo

Posted by Jo...@bgs-ag.de.
Hi Dan,

cool, this is the newest Version of Apache CXF :-)

So I took my EAR added the new libs (not contained in Geronimo 2.1.2, 
why?)
       cxf-rt-ws-security-2.0.8.jar
       wss4j-1.5.4.jar
and tried to deploy to the new Geronimo:

...
09:25:28,770 ERROR [GBeanInstanceState] Error while starting; GBean is now 
in the FAILED state: 
abstractName="myapp/app/1.0/ear?configurationName=myapp/app/1.0/ear"
org.apache.geronimo.kernel.config.InvalidConfigException: Class not 
loadable in classloader: 
[org.apache.geronimo.kernel.config.MultiParentClassLoader 
id=myapp/app/1.0/ear]
        at 
org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(Seria
...
Caused by: java.lang.ClassNotFoundException: Unable to find class used in 
GBeanData 
myapp/app/1.0/ear?J2EEApplication=myapp/app/1.0/ear,j2eeType=EJBModule,name=MyAppEJB.jar, 
attribute: ejbJarInfo
        at 
org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:293)
        ... 33 more
Caused by: java.lang.ClassNotFoundException: Could not load class 
javax.xml.namespace.QName from classloader: myapp/app/1.0/ear, destroyed 
state: false
        at 
org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:213)
...

So I thought maybe "xml-apis-1.3.02.jar" is missing, but adding to the EAR 
leads to:

...
Caused by: java.io.InvalidClassException: javax.xml.namespace.QName; local 
class incompatible: stream classdesc serialVersionUID = 
-9120448754896609940, local class serialVersionUID = 4418622981026545151
        at 
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
        at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
...

I need the QName in my Webservice. What can I do to get my App deployed? 
Thanx in advance.

-Josef




Daniel Kulp <dk...@apache.org> 
05.08.2008 16:42
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: Change Version of Apache CXF for Geronimo







You might want to just try Geronimo 2.1.2.   The vote apparently passed 
last 
night:
http://www.nabble.com/-VOTE--Geronimo-Server-2.1.2-Release-to18746852s134.html

so it should be made available shortly.   You can download the candidates.

2.1.2 is using CXF 2.0.8.


Dan





On Tuesday 05 August 2008 6:03:51 am Josef.Eisele@bgs-ag.de wrote:
> Hi Glen,
>
> because I got stuck in solving the problem with Geronimo 2.1.1 and
> included CXF 2.0.2 I thought maybe CXF 2.0.8 solves my problem?
>
> So I tried to change the WS-Stack of my Geronimo from the old version to
> CXF 2.0.8. I had certain essays:
>
> 1) http://www.jroller.com/gmazza/date/20080612:
> -> In Geronimo is no <prefer-application-packages> available, I tried 
with
> <inverse-classloading/> but I got a lot of problems with the 
classloader.
> If I added all JARS necessary - see file WHICH_JARS - I got class cast
> exceptions, adding a certain minimum leads to NoClassDefError.
> <hidden-classes> or <non-overridable-classes>  won't help?
> 2) Adding CXF under Services - Repository with a dependency-entry in the
> deployment plan:
>             <dependency>
>                 <groupId>org.apache.cxf</groupId>
>                 <artifactId>cxf</artifactId>
>                 <version>2.0.8</version>
>                 <type>jar</type>
>             </dependency>
> changed nothing.
> 3) ???
>
> Can you please help?
>
> -Josef
>
>
>
>
> Josef.Eisele@bgs-ag.de
> 04.08.2008 16:09
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Antwort: Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for
> Axis2-Classes
>
>
>
>
>
>
> Hi Dan,
>
> I checked your blog and I didn't found big differences in the
> code(Server-Part is in my case more JEE5 like - see
> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j

>sr-181-interceptor-annotations-xfire-migration/
>
> ).
>
> The difference I see compared with your blog-example is in the request
> itself:
>
> 1) from http://cwiki.apache.org/CXF20DOC/ws-security.html:
>      <wsse:Security
>          xmlns:wsse="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>.0.xsd
>
> "
>          soap:mustUnderstand="1">
>          <wsse:UsernameToken
>             xmlns:wsse="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>.0.xsd
>
> "
>             xmlns:wsu="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>1.0.xsd
>
> "
>             wsu:Id="UsernameToken-25268096">
>             <wsse:Username
>                xmlns:wsse="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>.0.xsd
>
> ">
>                joe
>             </wsse:Username>
>             <wsse:Password
>                xmlns:wsse="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>.0.xsd
>
> "
>                Type="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>ile-1.0#PasswordDigest
>
> ">
>                ymyLPVTLrQMBJo82akcw4aBSlJQ=
>             </wsse:Password>
>             <wsse:Nonce
>                xmlns:wsse="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>.0.xsd
>
> ">
>                MK3TTlJxaevzcFaxV/oKyw==
>             </wsse:Nonce>
>             <wsu:Created
>                xmlns:wsu="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>1.0.xsd
>
> ">
>                2008-07-16T23:05:07.300Z
>             </wsu:Created>
>          </wsse:UsernameToken>
>       </wsse:Security>
>
> 2) my request:
> <wsse:Security
>     xmlns:wsse="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>.0.xsd
>
> "
>     soap:mustUnderstand="1">
>     <wsse:UsernameToken
>         xmlns:wsu="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>1.0.xsd
>
> "
>         wsu:Id="UsernameToken-12189822">
>     <wsse:Username>
>          blabla
>     </wsse:Username>
>     <wsse:Password
>        Type="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>ile-1.0#PasswordDigest
>
> ">
>        uIqdbKqsp5VCvM4bPTps1PmnMZI=</wsse:Password>
>     <wsse:Nonce>YmoBKVpJrAjM2P3ss7MUNg==</wsse:Nonce>
>     <wsu:Created>
>        2008-08-04T10:08:15.245Z
>     </wsu:Created>
>    </wsse:UsernameToken>
> </wsse:Security>
>
>
> I miss the namespace
> xmlns:wsse="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>.0.xsd
>
> "
> and not only me but also the WSSecurityUtil.class in line 92:
>
>         list =
> soapHeaderElement.getElementsByTagNameNS(WSConstants.WSSE_NS,
>                 WSConstants.WSSE_LN);
>
> And therefore the method
> public static Element getSecurityHeader(Document doc, String actor,
> SOAPConstants sc) {
>
> results in an null-Element. The class WSSecurityEngine and in the end
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor throws the error:
>
> WARNUNG: Request does not contain required Security header
>
> What am I doing wrong with WS-Security 1.1 ???? I have now the sources 
for
>
> apacche-cxf-2.0.2 and wss4j-1.5.1, if I can debug to a certain step let 
me
>
> know.
>
> -Josef
>
>
>
>
>
> Glen Mazza <gl...@gmail.com>
> 26.07.2008 03:03
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
>
>
>
>
>
>
>
> Have you checked our documentation on this:
> http://cwiki.apache.org/CXF20DOC/ws-security.html
>
> Also I blogged about this recently, maybe something you can use:
> http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to
>
> HTH,
> Glen
>
> Josef.Eisele wrote:
> > Hi Dan,
> >
> > I solved the last problem copying libraries (xmlsec-1.3.0.jar,
> > wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part to
>
> the
>
> > EAR-Part:
> > (WebContent/WEB-INF/lib -> EarContent/lib)
> >
> > One Problem solved another arises:
> >
> > Client writes the SecurityHeader:
> > ..
> > <wsse:Security xmlns:wsse="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1

>.0.xsd
>
> > " soap:mustUnderstand="1">
> > <wsse:UsernameToken xmlns:wsu="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-

>1.0.xsd
>
> > " wsu:Id="UsernameToken-12189822">
> > <wsse:Username>chef</wsse:Username>
> > <wsse:Password Type="
>
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof

>ile-1.0#PasswordDigest
>
> > ">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
> > <wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
> > <wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
> > </wsse:UsernameToken>
> > </wsse:Security>
> > ...
> >
> > Server is configured with the interceptor:
> > @InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })
> >
> > In this class I configure 3 Interceptors:
> >         public void handleMessage(Message message) throws Fault {
> >                 Map<String, Object> props = new HashMap<String,
>
> Object>();
>
> >                 props.put(WSHandlerConstants.ACTION,
> > WSHandlerConstants.USERNAME_TOKEN);
> >                 props.put(WSHandlerConstants.PASSWORD_TYPE,
> > WSConstants.PW_DIGEST);
> >                 props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> > ServerPasswordCallback.class.getName());
> >
> >                 WSS4JInInterceptor           wss4jInInterceptor   = 
new
> > WSS4JInInterceptor(props);
> >                 ValidateUserTokenInterceptor userTokenInterceptor = 
new
> > ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);
> >
> >                 message.getInterceptorChain().add(wss4jInInterceptor);
> >                 //org.apache.cxf.binding.soap.SoapFault: No 
SOAPMessage
> > DOM was found. Please enable the SAAJInInterceptor.
> >                 message.getInterceptorChain().add(new
> > SAAJInInterceptor());
> >  message.getInterceptorChain().add(userTokenInterceptor);
> >         }
> >
> > UserTokenInterceptor works fine, SAAJInInterceptor is necessary
>
> otherwise
>
> > excepton but now I get an exception on the wss4jInInterceptor:
> >
> > 25.07.2008 13:03:44 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
> > handleMessage
> > WARNUNG: Request does not contain required Security header
> > 25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain
>
> doIntercept
>
> > INFO: Interceptor has thrown exception, unwinding now
> > org.apache.cxf.binding.soap.SoapFault: Request does not contain 
required
> >
> >
> > Security header.
> >         at
>
> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>terceptor.java:153)
>
> >         at
>
> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>terceptor.java:60)
>
> >         at
>
> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>n.java:208)
>
> >         at
> > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
> >         at
>
> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
>e(HTTPConduit.java:1955)
>
> >         at
>
> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
>duit.java:1791)
>
> >         at
> > 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >         at
> > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
> >         at
>
> 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
>rceptor.handleMessage(MessageSenderInterceptor.java:62)
>
> >         at
>
> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>n.java:208)
>
> >         at
>
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>
> >         at
>
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>
> >         at
> > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >         at
> > 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> >
> > How do I know what is wrong with my SecurityHeader?
> >
> > -Josef
> >
> >
> >
> >
> > Daniel Kulp <dk...@apache.org>
> > 23.07.2008 14:42
> > Bitte antworten an
> > users@cxf.apache.org
> >
> >
> > An
> > users@cxf.apache.org
> > Kopie
> > user@geronimo.apache.org
> > Thema
> > Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
> >
> > On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
> >> Hi Kevin, Lin, Daniel, Glen,
> >>
> >> @Daniel: Your VM-Parameters solved this problem. Thank you very much
> >> for
> >> your help.
> >
> > Yea, but it definitely shouldn't have been necessary.
> >
> >> @Glen: Thank you very much for your tipp, we will wait for Geronimo
> >> 2.1.2
> >> and then we have Apache CXF2.0.6...
> >
> > Actually, CXF 2.0.8.    :-)
> >
> >> @All: Now I have two new issues ;-)
> >> 1) The client is written like described in
> >> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server
> >> part -
> >> because of JavaEE5 - we choose
>
> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j

>sr-181-interceptor-annotations-xfire-migration/
>
> >> .
> >> In the first run I added
> >> @InInterceptors
> >> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
> >> the WS-Implementation-Class and nothing happend. Afterwards I had a
> >> try
> >> with the interface class and added the same
> >> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
> >> After this changed the class de.myapp.WSSecurityInterceptor was
> >> accessed.
> >> Why do I have to add @... in implementation AND interface?
> >
> > Not sure on that.   Feel free to log a CXF bug.    It should be
> > possible to just put it on the implementation.   The interface should
> > be shareable between clients/servers and having interceptors defined
> > on it that should just be there for the server is not a good thing.
> >
> >> 2) In the handleMessage(Message message) I receive after:
> >> ...
> >>                props.put(WSHandlerConstants.PASSWORD_TYPE,
> >> WSConstants.PW_TEXT);
> >>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> >> ServerPasswordCallback.class.getName());
> >>
> >>                WSS4JInInterceptor wss4jInHandler = new
> >> WSS4JInInterceptor(props);
> >> ...
> >>
> >> .........................
> >>
> >> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in 
prolog
> >> at [row,col {unknown-source}]: [1,0]
> >>        at
> >> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:
> >> 661)
> >>        at
> >> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:
> >> 2134)
> >>        at
> >
> > With CXF 2.0.2, that stack could result from a BUNCH of things.  We
> > actually would get that stack if the server sent back and html error
> > page without setting a 404 or similar.   Several things can cause
> > it.   If you can tcpdump or wireshark the wire transfers to see what's
> > going on, that would be helpful.    Good news is that this changed in
> > 2.0.5 to get a better error message.   :-)
> >
> >
> > ---
> > Daniel Kulp
> > dkulp@apache.org
> > http://www.dankulp.com/blog
> >
> >
> >
> >
> >
> >
> > BGS Beratungsgesellschaft
> > Software Systemplanung AG
> >
> >
> >
> >
> > Niederlassung Rhein/Main
> > Robert-Koch-Straße 41
> > 55129 Mainz
> > Fon: +49 (0) 6131 / 914-0
> > Fax: +49 (0) 6131 / 914-400
> > www.bgs-ag.de
> > Geschäftssitz Mainz
> > Registergericht
> > Amtsgericht Mainz
> > HRB 62 50
> >
> > Aufsichtsratsvorsitzender
> > Klaus Hellwig
> > Vorstand
> > Hanspeter Gau
> > Hermann Kiefer
> > Nils Manegold



-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog


BGS Beratungsgesellschaft 
Software Systemplanung AG 
  
  
  
  
Niederlassung Rhein/Main 
Robert-Koch-Straße 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Geschäftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 


  

Re: Change Version of Apache CXF for Geronimo

Posted by Daniel Kulp <dk...@apache.org>.
You might want to just try Geronimo 2.1.2.   The vote apparently passed last 
night:
http://www.nabble.com/-VOTE--Geronimo-Server-2.1.2-Release-to18746852s134.html
so it should be made available shortly.   You can download the candidates.

2.1.2 is using CXF 2.0.8.


Dan





On Tuesday 05 August 2008 6:03:51 am Josef.Eisele@bgs-ag.de wrote:
> Hi Glen,
>
> because I got stuck in solving the problem with Geronimo 2.1.1 and
> included CXF 2.0.2 I thought maybe CXF 2.0.8 solves my problem?
>
> So I tried to change the WS-Stack of my Geronimo from the old version to
> CXF 2.0.8. I had certain essays:
>
> 1) http://www.jroller.com/gmazza/date/20080612:
> -> In Geronimo is no <prefer-application-packages> available, I tried with
> <inverse-classloading/> but I got a lot of problems with the classloader.
> If I added all JARS necessary - see file WHICH_JARS - I got class cast
> exceptions, adding a certain minimum leads to NoClassDefError.
> <hidden-classes> or <non-overridable-classes>  won't help?
> 2) Adding CXF under Services - Repository with a dependency-entry in the
> deployment plan:
>             <dependency>
>                 <groupId>org.apache.cxf</groupId>
>                 <artifactId>cxf</artifactId>
>                 <version>2.0.8</version>
>                 <type>jar</type>
>             </dependency>
> changed nothing.
> 3) ???
>
> Can you please help?
>
> -Josef
>
>
>
>
> Josef.Eisele@bgs-ag.de
> 04.08.2008 16:09
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Antwort: Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for
> Axis2-Classes
>
>
>
>
>
>
> Hi Dan,
>
> I checked your blog and I didn't found big differences in the
> code(Server-Part is in my case more JEE5 like - see
> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j
>sr-181-interceptor-annotations-xfire-migration/
>
> ).
>
> The difference I see compared with your blog-example is in the request
> itself:
>
> 1) from http://cwiki.apache.org/CXF20DOC/ws-security.html:
>      <wsse:Security
>          xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>.0.xsd
>
> "
>          soap:mustUnderstand="1">
>          <wsse:UsernameToken
>             xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>.0.xsd
>
> "
>             xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>1.0.xsd
>
> "
>             wsu:Id="UsernameToken-25268096">
>             <wsse:Username
>                xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>.0.xsd
>
> ">
>                joe
>             </wsse:Username>
>             <wsse:Password
>                xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>.0.xsd
>
> "
>                Type="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>ile-1.0#PasswordDigest
>
> ">
>                ymyLPVTLrQMBJo82akcw4aBSlJQ=
>             </wsse:Password>
>             <wsse:Nonce
>                xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>.0.xsd
>
> ">
>                MK3TTlJxaevzcFaxV/oKyw==
>             </wsse:Nonce>
>             <wsu:Created
>                xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>1.0.xsd
>
> ">
>                2008-07-16T23:05:07.300Z
>             </wsu:Created>
>          </wsse:UsernameToken>
>       </wsse:Security>
>
> 2) my request:
> <wsse:Security
>     xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>.0.xsd
>
> "
>     soap:mustUnderstand="1">
>     <wsse:UsernameToken
>         xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>1.0.xsd
>
> "
>         wsu:Id="UsernameToken-12189822">
>     <wsse:Username>
>          blabla
>     </wsse:Username>
>     <wsse:Password
>        Type="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>ile-1.0#PasswordDigest
>
> ">
>        uIqdbKqsp5VCvM4bPTps1PmnMZI=</wsse:Password>
>     <wsse:Nonce>YmoBKVpJrAjM2P3ss7MUNg==</wsse:Nonce>
>     <wsu:Created>
>        2008-08-04T10:08:15.245Z
>     </wsu:Created>
>    </wsse:UsernameToken>
> </wsse:Security>
>
>
> I miss the namespace
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>.0.xsd
>
> "
> and not only me but also the WSSecurityUtil.class in line 92:
>
>         list =
> soapHeaderElement.getElementsByTagNameNS(WSConstants.WSSE_NS,
>                 WSConstants.WSSE_LN);
>
> And therefore the method
> public static Element getSecurityHeader(Document doc, String actor,
> SOAPConstants sc) {
>
> results in an null-Element. The class WSSecurityEngine and in the end
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor throws the error:
>
> WARNUNG: Request does not contain required Security header
>
> What am I doing wrong with WS-Security 1.1 ???? I have now the sources for
>
> apacche-cxf-2.0.2 and wss4j-1.5.1, if I can debug to a certain step let me
>
> know.
>
> -Josef
>
>
>
>
>
> Glen Mazza <gl...@gmail.com>
> 26.07.2008 03:03
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
>
>
>
>
>
>
>
> Have you checked our documentation on this:
> http://cwiki.apache.org/CXF20DOC/ws-security.html
>
> Also I blogged about this recently, maybe something you can use:
> http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to
>
> HTH,
> Glen
>
> Josef.Eisele wrote:
> > Hi Dan,
> >
> > I solved the last problem copying libraries (xmlsec-1.3.0.jar,
> > wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part to
>
> the
>
> > EAR-Part:
> > (WebContent/WEB-INF/lib -> EarContent/lib)
> >
> > One Problem solved another arises:
> >
> > Client writes the SecurityHeader:
> > ..
> > <wsse:Security xmlns:wsse="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1
>.0.xsd
>
> > " soap:mustUnderstand="1">
> > <wsse:UsernameToken xmlns:wsu="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
>1.0.xsd
>
> > " wsu:Id="UsernameToken-12189822">
> > <wsse:Username>chef</wsse:Username>
> > <wsse:Password Type="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-prof
>ile-1.0#PasswordDigest
>
> > ">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
> > <wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
> > <wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
> > </wsse:UsernameToken>
> > </wsse:Security>
> > ...
> >
> > Server is configured with the interceptor:
> > @InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })
> >
> > In this class I configure 3 Interceptors:
> >         public void handleMessage(Message message) throws Fault {
> >                 Map<String, Object> props = new HashMap<String,
>
> Object>();
>
> >                 props.put(WSHandlerConstants.ACTION,
> > WSHandlerConstants.USERNAME_TOKEN);
> >                 props.put(WSHandlerConstants.PASSWORD_TYPE,
> > WSConstants.PW_DIGEST);
> >                 props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> > ServerPasswordCallback.class.getName());
> >
> >                 WSS4JInInterceptor           wss4jInInterceptor   = new
> > WSS4JInInterceptor(props);
> >                 ValidateUserTokenInterceptor userTokenInterceptor = new
> > ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);
> >
> >                 message.getInterceptorChain().add(wss4jInInterceptor);
> >                 //org.apache.cxf.binding.soap.SoapFault: No SOAPMessage
> > DOM was found. Please enable the SAAJInInterceptor.
> >                 message.getInterceptorChain().add(new
> > SAAJInInterceptor());
> >  message.getInterceptorChain().add(userTokenInterceptor);
> >         }
> >
> > UserTokenInterceptor works fine, SAAJInInterceptor is necessary
>
> otherwise
>
> > excepton but now I get an exception on the wss4jInInterceptor:
> >
> > 25.07.2008 13:03:44 org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
> > handleMessage
> > WARNUNG: Request does not contain required Security header
> > 25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain
>
> doIntercept
>
> > INFO: Interceptor has thrown exception, unwinding now
> > org.apache.cxf.binding.soap.SoapFault: Request does not contain required
> >
> >
> > Security header.
> >         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>terceptor.java:153)
>
> >         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInIn
>terceptor.java:60)
>
> >         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>n.java:208)
>
> >         at
> > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
> >         at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
>e(HTTPConduit.java:1955)
>
> >         at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
>duit.java:1791)
>
> >         at
> > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >         at
> > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
> >         at
>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
>rceptor.handleMessage(MessageSenderInterceptor.java:62)
>
> >         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>n.java:208)
>
> >         at
>
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>
> >         at
>
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>
> >         at
> > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >         at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> >
> > How do I know what is wrong with my SecurityHeader?
> >
> > -Josef
> >
> >
> >
> >
> > Daniel Kulp <dk...@apache.org>
> > 23.07.2008 14:42
> > Bitte antworten an
> > users@cxf.apache.org
> >
> >
> > An
> > users@cxf.apache.org
> > Kopie
> > user@geronimo.apache.org
> > Thema
> > Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
> >
> > On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
> >> Hi Kevin, Lin, Daniel, Glen,
> >>
> >> @Daniel: Your VM-Parameters solved this problem. Thank you very much
> >> for
> >> your help.
> >
> > Yea, but it definitely shouldn't have been necessary.
> >
> >> @Glen: Thank you very much for your tipp, we will wait for Geronimo
> >> 2.1.2
> >> and then we have Apache CXF2.0.6...
> >
> > Actually, CXF 2.0.8.    :-)
> >
> >> @All: Now I have two new issues ;-)
> >> 1) The client is written like described in
> >> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server
> >> part -
> >> because of JavaEE5 - we choose
>
> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-j
>sr-181-interceptor-annotations-xfire-migration/
>
> >> .
> >> In the first run I added
> >> @InInterceptors
> >> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
> >> the WS-Implementation-Class and nothing happend. Afterwards I had a
> >> try
> >> with the interface class and added the same
> >> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
> >> After this changed the class de.myapp.WSSecurityInterceptor was
> >> accessed.
> >> Why do I have to add @... in implementation AND interface?
> >
> > Not sure on that.   Feel free to log a CXF bug.    It should be
> > possible to just put it on the implementation.   The interface should
> > be shareable between clients/servers and having interceptors defined
> > on it that should just be there for the server is not a good thing.
> >
> >> 2) In the handleMessage(Message message) I receive after:
> >> ...
> >>                props.put(WSHandlerConstants.PASSWORD_TYPE,
> >> WSConstants.PW_TEXT);
> >>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> >> ServerPasswordCallback.class.getName());
> >>
> >>                WSS4JInInterceptor wss4jInHandler = new
> >> WSS4JInInterceptor(props);
> >> ...
> >>
> >> .........................
> >>
> >> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> >> at [row,col {unknown-source}]: [1,0]
> >>        at
> >> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:
> >> 661)
> >>        at
> >> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:
> >> 2134)
> >>        at
> >
> > With CXF 2.0.2, that stack could result from a BUNCH of things.  We
> > actually would get that stack if the server sent back and html error
> > page without setting a 404 or similar.   Several things can cause
> > it.   If you can tcpdump or wireshark the wire transfers to see what's
> > going on, that would be helpful.    Good news is that this changed in
> > 2.0.5 to get a better error message.   :-)
> >
> >
> > ---
> > Daniel Kulp
> > dkulp@apache.org
> > http://www.dankulp.com/blog
> >
> >
> >
> >
> >
> >
> > BGS Beratungsgesellschaft
> > Software Systemplanung AG
> >
> >
> >
> >
> > Niederlassung Rhein/Main
> > Robert-Koch-Straße 41
> > 55129 Mainz
> > Fon: +49 (0) 6131 / 914-0
> > Fax: +49 (0) 6131 / 914-400
> > www.bgs-ag.de
> > Geschäftssitz Mainz
> > Registergericht
> > Amtsgericht Mainz
> > HRB 62 50
> >
> > Aufsichtsratsvorsitzender
> > Klaus Hellwig
> > Vorstand
> > Hanspeter Gau
> > Hermann Kiefer
> > Nils Manegold



-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Change Version of Apache CXF for Geronimo

Posted by Jo...@bgs-ag.de.
Hi Glen,

because I got stuck in solving the problem with Geronimo 2.1.1 and 
included CXF 2.0.2 I thought maybe CXF 2.0.8 solves my problem?

So I tried to change the WS-Stack of my Geronimo from the old version to 
CXF 2.0.8. I had certain essays:

1) http://www.jroller.com/gmazza/date/20080612:
-> In Geronimo is no <prefer-application-packages> available, I tried with 
<inverse-classloading/> but I got a lot of problems with the classloader. 
If I added all JARS necessary - see file WHICH_JARS - I got class cast 
exceptions, adding a certain minimum leads to NoClassDefError. 
<hidden-classes> or <non-overridable-classes>  won't help?
2) Adding CXF under Services - Repository with a dependency-entry in the 
deployment plan:
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf</artifactId>
                <version>2.0.8</version>
                <type>jar</type>
            </dependency>
changed nothing.
3) ???

Can you please help?

-Josef




Josef.Eisele@bgs-ag.de 
04.08.2008 16:09
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Antwort: Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for 
Axis2-Classes






Hi Dan,

I checked your blog and I didn't found big differences in the 
code(Server-Part is in my case more JEE5 like - see 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/

).

The difference I see compared with your blog-example is in the request 
itself:

1) from http://cwiki.apache.org/CXF20DOC/ws-security.html:
     <wsse:Security
         xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

"
         soap:mustUnderstand="1">
         <wsse:UsernameToken
            xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

"
            xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd

"
            wsu:Id="UsernameToken-25268096">
            <wsse:Username
               xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

">
               joe
            </wsse:Username>
            <wsse:Password
               xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

"
               Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest

">
               ymyLPVTLrQMBJo82akcw4aBSlJQ=
            </wsse:Password>
            <wsse:Nonce
               xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

">
               MK3TTlJxaevzcFaxV/oKyw==
            </wsse:Nonce>
            <wsu:Created
               xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd

">
               2008-07-16T23:05:07.300Z
            </wsu:Created>
         </wsse:UsernameToken>
      </wsse:Security>

2) my request:
<wsse:Security 
    xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

" 
    soap:mustUnderstand="1">
    <wsse:UsernameToken 
        xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd

" 
        wsu:Id="UsernameToken-12189822">
    <wsse:Username>
         blabla
    </wsse:Username>
    <wsse:Password 
       Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest

">
       uIqdbKqsp5VCvM4bPTps1PmnMZI=</wsse:Password>
    <wsse:Nonce>YmoBKVpJrAjM2P3ss7MUNg==</wsse:Nonce>
    <wsu:Created>
       2008-08-04T10:08:15.245Z
    </wsu:Created>
   </wsse:UsernameToken>
</wsse:Security>


I miss the namespace 
xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

"
and not only me but also the WSSecurityUtil.class in line 92:

        list = 
soapHeaderElement.getElementsByTagNameNS(WSConstants.WSSE_NS,
                WSConstants.WSSE_LN);

And therefore the method 
public static Element getSecurityHeader(Document doc, String actor, 
SOAPConstants sc) {

results in an null-Element. The class WSSecurityEngine and in the end 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor throws the error:

WARNUNG: Request does not contain required Security header

What am I doing wrong with WS-Security 1.1 ???? I have now the sources for 

apacche-cxf-2.0.2 and wss4j-1.5.1, if I can debug to a certain step let me 

know.

-Josef





Glen Mazza <gl...@gmail.com> 
26.07.2008 03:03
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes







Have you checked our documentation on this:
http://cwiki.apache.org/CXF20DOC/ws-security.html

Also I blogged about this recently, maybe something you can use:
http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to

HTH,
Glen


Josef.Eisele wrote:
> 
> Hi Dan,
> 
> I solved the last problem copying libraries (xmlsec-1.3.0.jar, 
> wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part to 
the 
> EAR-Part:
> (WebContent/WEB-INF/lib -> EarContent/lib)
> 
> One Problem solved another arises:
> 
> Client writes the SecurityHeader:
> ..
> <wsse:Security xmlns:wsse="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd


> " soap:mustUnderstand="1">
> <wsse:UsernameToken xmlns:wsu="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd


> " wsu:Id="UsernameToken-12189822">
> <wsse:Username>chef</wsse:Username>
> <wsse:Password Type="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest


> ">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
> <wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
> <wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
> </wsse:UsernameToken>
> </wsse:Security>
> ...
> 
> Server is configured with the interceptor:
> @InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })
> 
> In this class I configure 3 Interceptors:
>         public void handleMessage(Message message) throws Fault {
>                 Map<String, Object> props = new HashMap<String, 
Object>();
>                 props.put(WSHandlerConstants.ACTION, 
> WSHandlerConstants.USERNAME_TOKEN);
>                 props.put(WSHandlerConstants.PASSWORD_TYPE, 
> WSConstants.PW_DIGEST);
>                 props.put(WSHandlerConstants.PW_CALLBACK_CLASS, 
> ServerPasswordCallback.class.getName());
> 
>                 WSS4JInInterceptor           wss4jInInterceptor   = new 
> WSS4JInInterceptor(props);
>                 ValidateUserTokenInterceptor userTokenInterceptor = new 
> ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);
> 
>                 message.getInterceptorChain().add(wss4jInInterceptor);
>                 //org.apache.cxf.binding.soap.SoapFault: No SOAPMessage 
> DOM was found. Please enable the SAAJInInterceptor.
>                 message.getInterceptorChain().add(new 
> SAAJInInterceptor()); 
>  message.getInterceptorChain().add(userTokenInterceptor);
>         }
> 
> UserTokenInterceptor works fine, SAAJInInterceptor is necessary 
otherwise 
> excepton but now I get an exception on the wss4jInInterceptor:
> 
> 25.07.2008 13:03:44 org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor 
> handleMessage
> WARNUNG: Request does not contain required Security header
> 25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain 
doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: Request does not contain required 


> Security header.
>         at 
> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:153)
>         at 
> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:60)
>         at 
> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>         at 
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
>         at 
> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
>         at 
> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
>         at 
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>         at 
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
>         at 
> 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>         at 
> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>         at 
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>         at 
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>         at 
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> 
> How do I know what is wrong with my SecurityHeader?
> 
> -Josef
> 
> 
> 
> 
> Daniel Kulp <dk...@apache.org> 
> 23.07.2008 14:42
> Bitte antworten an
> users@cxf.apache.org
> 
> 
> An
> users@cxf.apache.org
> Kopie
> user@geronimo.apache.org
> Thema
> Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
> 
> 
> 
> 
> 
> 
> 
> On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
> 
>> Hi Kevin, Lin, Daniel, Glen,
>>
>> @Daniel: Your VM-Parameters solved this problem. Thank you very much 
>> for
>> your help.
> 
> Yea, but it definitely shouldn't have been necessary.
> 
>> @Glen: Thank you very much for your tipp, we will wait for Geronimo 
>> 2.1.2
>> and then we have Apache CXF2.0.6...
> 
> Actually, CXF 2.0.8.    :-)
> 
> 
>> @All: Now I have two new issues ;-)
>> 1) The client is written like described in
>> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server 
>> part -
>> because of JavaEE5 - we choose
>> 
> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/


> 
>> .
>> In the first run I added
>> @InInterceptors 
>> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
>> the WS-Implementation-Class and nothing happend. Afterwards I had a 
>> try
>> with the interface class and added the same
>> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
>> After this changed the class de.myapp.WSSecurityInterceptor was 
>> accessed.
>> Why do I have to add @... in implementation AND interface?
> 
> Not sure on that.   Feel free to log a CXF bug.    It should be 
> possible to just put it on the implementation.   The interface should 
> be shareable between clients/servers and having interceptors defined 
> on it that should just be there for the server is not a good thing.
> 
> 
>> 2) In the handleMessage(Message message) I receive after:
>> ...
>>                props.put(WSHandlerConstants.PASSWORD_TYPE,
>> WSConstants.PW_TEXT);
>>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>> ServerPasswordCallback.class.getName());
>>
>>                WSS4JInInterceptor wss4jInHandler = new
>> WSS4JInInterceptor(props);
>> ...
>>
>> .........................
>>
>> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>> at [row,col {unknown-source}]: [1,0]
>>        at
>> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java: 
>> 661)
>>        at
>> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java: 
>> 2134)
>>        at
>>
> 
> With CXF 2.0.2, that stack could result from a BUNCH of things.  We 
> actually would get that stack if the server sent back and html error 
> page without setting a 404 or similar.   Several things can cause 
> it.   If you can tcpdump or wireshark the wire transfers to see what's 
> going on, that would be helpful.    Good news is that this changed in 
> 2.0.5 to get a better error message.   :-)
> 
> 
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 
> 
> 
> 
> 
> BGS Beratungsgesellschaft 
> Software Systemplanung AG 
> 
> 
> 
> 
> Niederlassung Rhein/Main 
> Robert-Koch-Straße 41 
> 55129 Mainz 
> Fon: +49 (0) 6131 / 914-0 
> Fax: +49 (0) 6131 / 914-400 
> www.bgs-ag.de 
> Geschäftssitz Mainz 
> Registergericht 
> Amtsgericht Mainz 
> HRB 62 50 
> 
> Aufsichtsratsvorsitzender 
> Klaus Hellwig 
> Vorstand 
> Hanspeter Gau 
> Hermann Kiefer 
> Nils Manegold 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Antwort%3A-Re%3A-WS-Stack-Apache-CXF-asks-for-Axis2-Classes-tp18608656p18661957.html


Sent from the cxf-user mailing list archive at Nabble.com.



BGS Beratungsgesellschaft 
Software Systemplanung AG 
 
 
 
 
Niederlassung Rhein/Main 
Robert-Koch-Straße 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Geschäftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
 
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 

 

BGS Beratungsgesellschaft 
Software Systemplanung AG 
  
  
  
  
Niederlassung Rhein/Main 
Robert-Koch-Straße 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Geschäftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 

  

Antwort: Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Jo...@bgs-ag.de.
Hi Dan,

I checked your blog and I didn't found big differences in the 
code(Server-Part is in my case more JEE5 like - see 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/
).

The difference I see compared with your blog-example is in the request 
itself:

1) from http://cwiki.apache.org/CXF20DOC/ws-security.html:
     <wsse:Security
         xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
"
         soap:mustUnderstand="1">
         <wsse:UsernameToken
            xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
"
            xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
"
            wsu:Id="UsernameToken-25268096">
            <wsse:Username
               xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
">
               joe
            </wsse:Username>
            <wsse:Password
               xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
"
               Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest
">
               ymyLPVTLrQMBJo82akcw4aBSlJQ=
            </wsse:Password>
            <wsse:Nonce
               xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
">
               MK3TTlJxaevzcFaxV/oKyw==
            </wsse:Nonce>
            <wsu:Created
               xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
">
               2008-07-16T23:05:07.300Z
            </wsu:Created>
         </wsse:UsernameToken>
      </wsse:Security>

2) my request:
<wsse:Security 
    xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
" 
    soap:mustUnderstand="1">
    <wsse:UsernameToken 
        xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
" 
        wsu:Id="UsernameToken-12189822">
    <wsse:Username>
         blabla
    </wsse:Username>
    <wsse:Password 
       Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest
">
       uIqdbKqsp5VCvM4bPTps1PmnMZI=</wsse:Password>
    <wsse:Nonce>YmoBKVpJrAjM2P3ss7MUNg==</wsse:Nonce>
    <wsu:Created>
       2008-08-04T10:08:15.245Z
    </wsu:Created>
   </wsse:UsernameToken>
</wsse:Security>


I miss the namespace 
xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
"
and not only me but also the WSSecurityUtil.class in line 92:

        list = 
soapHeaderElement.getElementsByTagNameNS(WSConstants.WSSE_NS,
                WSConstants.WSSE_LN);

And therefore the method  
public static Element getSecurityHeader(Document doc, String actor, 
SOAPConstants sc) {

results in an null-Element. The class WSSecurityEngine and in the end 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor throws the error:

WARNUNG: Request does not contain required Security header

What am I doing wrong with WS-Security 1.1 ???? I have now the sources for 
apacche-cxf-2.0.2 and wss4j-1.5.1, if I can debug to a certain step let me 
know.

-Josef





Glen Mazza <gl...@gmail.com> 
26.07.2008 03:03
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes







Have you checked our documentation on this:
http://cwiki.apache.org/CXF20DOC/ws-security.html

Also I blogged about this recently, maybe something you can use:
http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to

HTH,
Glen


Josef.Eisele wrote:
> 
> Hi Dan,
> 
> I solved the last problem copying libraries (xmlsec-1.3.0.jar, 
> wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part to 
the 
> EAR-Part:
> (WebContent/WEB-INF/lib -> EarContent/lib)
> 
> One Problem solved another arises:
> 
> Client writes the SecurityHeader:
> ..
> <wsse:Security xmlns:wsse="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

> " soap:mustUnderstand="1">
> <wsse:UsernameToken xmlns:wsu="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd

> " wsu:Id="UsernameToken-12189822">
> <wsse:Username>chef</wsse:Username>
> <wsse:Password Type="
> 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest

> ">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
> <wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
> <wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
> </wsse:UsernameToken>
> </wsse:Security>
> ...
> 
> Server is configured with the interceptor:
> @InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })
> 
> In this class I configure 3 Interceptors:
>         public void handleMessage(Message message) throws Fault {
>                 Map<String, Object> props = new HashMap<String, 
Object>();
>                 props.put(WSHandlerConstants.ACTION, 
> WSHandlerConstants.USERNAME_TOKEN);
>                 props.put(WSHandlerConstants.PASSWORD_TYPE, 
> WSConstants.PW_DIGEST);
>                 props.put(WSHandlerConstants.PW_CALLBACK_CLASS, 
> ServerPasswordCallback.class.getName());
> 
>                 WSS4JInInterceptor           wss4jInInterceptor   = new 
> WSS4JInInterceptor(props);
>                 ValidateUserTokenInterceptor userTokenInterceptor = new 
> ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);
> 
>                 message.getInterceptorChain().add(wss4jInInterceptor);
>                 //org.apache.cxf.binding.soap.SoapFault: No SOAPMessage 
> DOM was found. Please enable the SAAJInInterceptor.
>                 message.getInterceptorChain().add(new 
> SAAJInInterceptor()); 
>  message.getInterceptorChain().add(userTokenInterceptor);
>         }
> 
> UserTokenInterceptor works fine, SAAJInInterceptor is necessary 
otherwise 
> excepton but now I get an exception on the wss4jInInterceptor:
> 
> 25.07.2008 13:03:44 org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor 
> handleMessage
> WARNUNG: Request does not contain required Security header
> 25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain 
doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: Request does not contain required 

> Security header.
>         at 
> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:153)
>         at 
> 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:60)
>         at 
> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>         at 
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
>         at 
> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
>         at 
> 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
>         at 
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>         at 
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
>         at 
> 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>         at 
> 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>         at 
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>         at 
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>         at 
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> 
> How do I know what is wrong with my SecurityHeader?
> 
> -Josef
> 
> 
> 
> 
> Daniel Kulp <dk...@apache.org> 
> 23.07.2008 14:42
> Bitte antworten an
> users@cxf.apache.org
> 
> 
> An
> users@cxf.apache.org
> Kopie
> user@geronimo.apache.org
> Thema
> Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
> 
> 
> 
> 
> 
> 
> 
> On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
> 
>> Hi Kevin, Lin, Daniel, Glen,
>>
>> @Daniel: Your VM-Parameters solved this problem. Thank you very much 
>> for
>> your help.
> 
> Yea, but it definitely shouldn't have been necessary.
> 
>> @Glen: Thank you very much for your tipp, we will wait for Geronimo 
>> 2.1.2
>> and then we have Apache CXF2.0.6...
> 
> Actually, CXF 2.0.8.    :-)
> 
> 
>> @All: Now I have two new issues ;-)
>> 1) The client is written like described in
>> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server 
>> part -
>> because of JavaEE5 - we choose
>> 
> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/

> 
>> .
>> In the first run I added
>> @InInterceptors 
>> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
>> the WS-Implementation-Class and nothing happend. Afterwards I had a 
>> try
>> with the interface class and added the same
>> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
>> After this changed the class de.myapp.WSSecurityInterceptor was 
>> accessed.
>> Why do I have to add @... in implementation AND interface?
> 
> Not sure on that.   Feel free to log a CXF bug.    It should be 
> possible to just put it on the implementation.   The interface should 
> be shareable between clients/servers and having interceptors defined 
> on it that should just be there for the server is not a good thing.
> 
> 
>> 2) In the handleMessage(Message message) I receive after:
>> ...
>>                props.put(WSHandlerConstants.PASSWORD_TYPE,
>> WSConstants.PW_TEXT);
>>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>> ServerPasswordCallback.class.getName());
>>
>>                WSS4JInInterceptor wss4jInHandler = new
>> WSS4JInInterceptor(props);
>> ...
>>
>> .........................
>>
>> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>> at [row,col {unknown-source}]: [1,0]
>>        at
>> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java: 
>> 661)
>>        at
>> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java: 
>> 2134)
>>        at
>>
> 
> With CXF 2.0.2, that stack could result from a BUNCH of things.  We 
> actually would get that stack if the server sent back and html error 
> page without setting a 404 or similar.   Several things can cause 
> it.   If you can tcpdump or wireshark the wire transfers to see what's 
> going on, that would be helpful.    Good news is that this changed in 
> 2.0.5 to get a better error message.   :-)
> 
> 
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 
> 
> 
> 
> 
> BGS Beratungsgesellschaft 
> Software Systemplanung AG 
> 
> 
> 
> 
> Niederlassung Rhein/Main 
> Robert-Koch-Straße 41 
> 55129 Mainz 
> Fon: +49 (0) 6131 / 914-0 
> Fax: +49 (0) 6131 / 914-400 
> www.bgs-ag.de 
> Geschäftssitz Mainz 
> Registergericht 
> Amtsgericht Mainz 
> HRB 62 50 
> 
> Aufsichtsratsvorsitzender 
> Klaus Hellwig 
> Vorstand 
> Hanspeter Gau 
> Hermann Kiefer 
> Nils Manegold 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Antwort%3A-Re%3A-WS-Stack-Apache-CXF-asks-for-Axis2-Classes-tp18608656p18661957.html

Sent from the cxf-user mailing list archive at Nabble.com.



BGS Beratungsgesellschaft 
Software Systemplanung AG 
  
  
  
  
Niederlassung Rhein/Main 
Robert-Koch-Straße 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Geschäftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 

  

Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Glen Mazza <gl...@gmail.com>.
Have you checked our documentation on this:
http://cwiki.apache.org/CXF20DOC/ws-security.html

Also I blogged about this recently, maybe something you can use:
http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to

HTH,
Glen


Josef.Eisele wrote:
> 
> Hi Dan,
> 
> I solved the last problem copying libraries (xmlsec-1.3.0.jar, 
> wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part to the 
> EAR-Part:
> (WebContent/WEB-INF/lib -> EarContent/lib)
> 
> One Problem solved another arises:
> 
> Client writes the SecurityHeader:
> ..
> <wsse:Security xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> " soap:mustUnderstand="1">
> <wsse:UsernameToken xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> " wsu:Id="UsernameToken-12189822">
> <wsse:Username>chef</wsse:Username>
> <wsse:Password Type="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest
> ">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
> <wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
> <wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
> </wsse:UsernameToken>
> </wsse:Security>
> ...
> 
> Server is configured with the interceptor:
> @InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })
> 
> In this class I configure 3 Interceptors:
>         public void handleMessage(Message message) throws Fault {
>                 Map<String, Object> props = new HashMap<String, Object>();
>                 props.put(WSHandlerConstants.ACTION, 
> WSHandlerConstants.USERNAME_TOKEN);
>                 props.put(WSHandlerConstants.PASSWORD_TYPE, 
> WSConstants.PW_DIGEST);
>                 props.put(WSHandlerConstants.PW_CALLBACK_CLASS, 
> ServerPasswordCallback.class.getName());
> 
>                 WSS4JInInterceptor           wss4jInInterceptor   = new 
> WSS4JInInterceptor(props);
>                 ValidateUserTokenInterceptor userTokenInterceptor = new 
> ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);
> 
>                 message.getInterceptorChain().add(wss4jInInterceptor);
>                 //org.apache.cxf.binding.soap.SoapFault: No SOAPMessage 
> DOM was found. Please enable the SAAJInInterceptor.
>                 message.getInterceptorChain().add(new 
> SAAJInInterceptor()); 
>  message.getInterceptorChain().add(userTokenInterceptor);
>         }
> 
> UserTokenInterceptor works fine, SAAJInInterceptor is necessary otherwise 
> excepton but now I get an exception on the wss4jInInterceptor:
> 
> 25.07.2008 13:03:44 org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor 
> handleMessage
> WARNUNG: Request does not contain required Security header
> 25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: Request does not contain required 
> Security header.
>         at 
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:153)
>         at 
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:60)
>         at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>         at 
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
>         at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
>         at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
>         at 
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>         at 
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
>         at 
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>         at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>         at 
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> 
> How do I know what is wrong with my SecurityHeader?
> 
> -Josef
> 
> 
> 
> 
> Daniel Kulp <dk...@apache.org> 
> 23.07.2008 14:42
> Bitte antworten an
> users@cxf.apache.org
> 
> 
> An
> users@cxf.apache.org
> Kopie
> user@geronimo.apache.org
> Thema
> Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
> 
> 
> 
> 
> 
> 
> 
> On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
> 
>> Hi Kevin, Lin, Daniel, Glen,
>>
>> @Daniel: Your VM-Parameters solved this problem. Thank you very much 
>> for
>> your help.
> 
> Yea, but it definitely shouldn't have been necessary.
> 
>> @Glen: Thank you very much for your tipp, we will wait for Geronimo 
>> 2.1.2
>> and then we have Apache CXF2.0.6...
> 
> Actually, CXF 2.0.8.    :-)
> 
> 
>> @All: Now I have two new issues ;-)
>> 1) The client is written like described in
>> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server 
>> part -
>> because of JavaEE5 - we choose
>> 
> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/
> 
>> .
>> In the first run I added
>> @InInterceptors 
>> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
>> the WS-Implementation-Class and nothing happend. Afterwards I had a 
>> try
>> with the interface class and added the same
>> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
>> After this changed the class de.myapp.WSSecurityInterceptor was 
>> accessed.
>> Why do I have to add @... in implementation AND interface?
> 
> Not sure on that.   Feel free to log a CXF bug.    It should be 
> possible to just put it on the implementation.   The interface should 
> be shareable between clients/servers and having interceptors defined 
> on it that should just be there for the server is not a good thing.
> 
> 
>> 2) In the handleMessage(Message message) I receive after:
>> ...
>>                props.put(WSHandlerConstants.PASSWORD_TYPE,
>> WSConstants.PW_TEXT);
>>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>> ServerPasswordCallback.class.getName());
>>
>>                WSS4JInInterceptor wss4jInHandler = new
>> WSS4JInInterceptor(props);
>> ...
>>
>> .........................
>>
>> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>> at [row,col {unknown-source}]: [1,0]
>>        at
>> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java: 
>> 661)
>>        at
>> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java: 
>> 2134)
>>        at
>>
> 
> With CXF 2.0.2, that stack could result from a BUNCH of things.  We 
> actually would get that stack if the server sent back and html error 
> page without setting a 404 or similar.   Several things can cause 
> it.   If you can tcpdump or wireshark the wire transfers to see what's 
> going on, that would be helpful.    Good news is that this changed in 
> 2.0.5 to get a better error message.   :-)
> 
> 
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 
> 
> 
> 
> 
> BGS Beratungsgesellschaft 
> Software Systemplanung AG 
>   
>   
>   
>   
> Niederlassung Rhein/Main 
> Robert-Koch-Straße 41 
> 55129 Mainz 
> Fon: +49 (0) 6131 / 914-0 
> Fax: +49 (0) 6131 / 914-400 
> www.bgs-ag.de 
> Geschäftssitz Mainz 
> Registergericht 
> Amtsgericht Mainz 
> HRB 62 50 
>   
> Aufsichtsratsvorsitzender 
> Klaus Hellwig 
> Vorstand 
> Hanspeter Gau 
> Hermann Kiefer 
> Nils Manegold 
> 
> 
>   
> 

-- 
View this message in context: http://www.nabble.com/Antwort%3A-Re%3A-WS-Stack-Apache-CXF-asks-for-Axis2-Classes-tp18608656p18661957.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Daniel Kulp <dk...@apache.org>.
You can override the URL:

((BindingProvider)fistPort).getRequestContext().put(
     BindingProvider.ENDPOINT_ADDRESS_PROPERTY,  newURL);

Dan



On Jul 23, 2008, at 10:48 AM, Josef.Eisele@bgs-ag.de wrote:

> Hi Daniel,
>
> I will do my best with the tcpmonitor. At the moment I try to put the
> monitor in between client and server.
> In EJB2.1 I knew how to do this, but in JavaEE5 and EJB3 everything is
> generated.
>
> I want to:
> WSClient (8079) -> (8079)TCPMonitor(8080) -> WSService (8080)
>
> My Code is:
> ...
>                        URL wsdlLocation = new  
> URL(serviceEndpointAdress +
> "/" + name + "?wsdl");
>                        QName serviceNameQ = new QName(nameSpace,
> serviceName);
>
>                        // dynamic service usage
>                        Service service = Service.create(wsdlLocation,
> serviceNameQ);
>                        MyWS firstPort = service.getPort(MyWS.class);
>                                                 
> firstPort.startMyMethod();
> ...
>
> My Problem ist firstPort got already the information that physical  
> port is
> 8080. This information is derived from the generated WSDL. How can I
> change the port to 8079?
>
> I have only one idea with a stored and modified WSDL in my head. But I
> want to avoid this, there must be a better solution...
>
> -Josef
>
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 23.07.2008 14:42
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
> user@geronimo.apache.org
> Thema
> Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes
>
>
>
>
>
>
>
> On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:
>
>> Hi Kevin, Lin, Daniel, Glen,
>>
>> @Daniel: Your VM-Parameters solved this problem. Thank you very much
>> for
>> your help.
>
> Yea, but it definitely shouldn't have been necessary.
>
>> @Glen: Thank you very much for your tipp, we will wait for Geronimo
>> 2.1.2
>> and then we have Apache CXF2.0.6...
>
> Actually, CXF 2.0.8.    :-)
>
>
>> @All: Now I have two new issues ;-)
>> 1) The client is written like described in
>> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server
>> part -
>> because of JavaEE5 - we choose
>>
> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/
>
>> .
>> In the first run I added
>> @InInterceptors
>> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
>> the WS-Implementation-Class and nothing happend. Afterwards I had a
>> try
>> with the interface class and added the same
>> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
>> After this changed the class de.myapp.WSSecurityInterceptor was
>> accessed.
>> Why do I have to add @... in implementation AND interface?
>
> Not sure on that.   Feel free to log a CXF bug.    It should be
> possible to just put it on the implementation.   The interface should
> be shareable between clients/servers and having interceptors defined
> on it that should just be there for the server is not a good thing.
>
>
>> 2) In the handleMessage(Message message) I receive after:
>> ...
>>               props.put(WSHandlerConstants.PASSWORD_TYPE,
>> WSConstants.PW_TEXT);
>>               props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>> ServerPasswordCallback.class.getName());
>>
>>               WSS4JInInterceptor wss4jInHandler = new
>> WSS4JInInterceptor(props);
>> ...
>>
>> .........................
>>
>> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in  
>> prolog
>> at [row,col {unknown-source}]: [1,0]
>>       at
>> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:
>> 661)
>>       at
>> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:
>> 2134)
>>       at
>>
>
> With CXF 2.0.2, that stack could result from a BUNCH of things.  We
> actually would get that stack if the server sent back and html error
> page without setting a 404 or similar.   Several things can cause
> it.   If you can tcpdump or wireshark the wire transfers to see what's
> going on, that would be helpful.    Good news is that this changed in
> 2.0.5 to get a better error message.   :-)
>
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>
> BGS Beratungsgesellschaft
> Software Systemplanung AG         Niederlassung Rhein/Main
> Robert-Koch-Straße 41
> 55129 Mainz
> Fon: +49 (0) 6131 / 914-0
> Fax: +49 (0) 6131 / 914-400
> www.bgs-ag.de Geschäftssitz Mainz
> Registergericht
> Amtsgericht Mainz
> HRB 62 50
>  Aufsichtsratsvorsitzender
> Klaus Hellwig
> Vorstand
> Hanspeter Gau
> Hermann Kiefer
> Nils Manegold
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Jo...@bgs-ag.de.
Hi Daniel,

I will do my best with the tcpmonitor. At the moment I try to put the 
monitor in between client and server.
In EJB2.1 I knew how to do this, but in JavaEE5 and EJB3 everything is 
generated.

I want to:
WSClient (8079) -> (8079)TCPMonitor(8080) -> WSService (8080)

My Code is:
...
                        URL wsdlLocation = new URL(serviceEndpointAdress + 
"/" + name + "?wsdl");
                        QName serviceNameQ = new QName(nameSpace, 
serviceName);

                        // dynamic service usage
                        Service service = Service.create(wsdlLocation, 
serviceNameQ);
                        MyWS firstPort = service.getPort(MyWS.class);
                                                firstPort.startMyMethod();
...

My Problem ist firstPort got already the information that physical port is 
8080. This information is derived from the generated WSDL. How can I 
change the port to 8079?

I have only one idea with a stored and modified WSDL in my head. But I 
want to avoid this, there must be a better solution...

-Josef





Daniel Kulp <dk...@apache.org> 
23.07.2008 14:42
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie
user@geronimo.apache.org
Thema
Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes







On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:

> Hi Kevin, Lin, Daniel, Glen,
>
> @Daniel: Your VM-Parameters solved this problem. Thank you very much 
> for
> your help.

Yea, but it definitely shouldn't have been necessary.

> @Glen: Thank you very much for your tipp, we will wait for Geronimo 
> 2.1.2
> and then we have Apache CXF2.0.6...

Actually, CXF 2.0.8.    :-)


> @All: Now I have two new issues ;-)
> 1) The client is written like described in
> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server 
> part -
> because of JavaEE5 - we choose
> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/

> .
> In the first run I added
> @InInterceptors 
> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
> the WS-Implementation-Class and nothing happend. Afterwards I had a 
> try
> with the interface class and added the same
> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
> After this changed the class de.myapp.WSSecurityInterceptor was 
> accessed.
> Why do I have to add @... in implementation AND interface?

Not sure on that.   Feel free to log a CXF bug.    It should be 
possible to just put it on the implementation.   The interface should 
be shareable between clients/servers and having interceptors defined 
on it that should just be there for the server is not a good thing.


> 2) In the handleMessage(Message message) I receive after:
> ...
>                props.put(WSHandlerConstants.PASSWORD_TYPE,
> WSConstants.PW_TEXT);
>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> ServerPasswordCallback.class.getName());
>
>                WSS4JInInterceptor wss4jInHandler = new
> WSS4JInInterceptor(props);
> ...
>
> .........................
>
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
>        at
> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java: 
> 661)
>        at
> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java: 
> 2134)
>        at
>

With CXF 2.0.2, that stack could result from a BUNCH of things.  We 
actually would get that stack if the server sent back and html error 
page without setting a 404 or similar.   Several things can cause 
it.   If you can tcpdump or wireshark the wire transfers to see what's 
going on, that would be helpful.    Good news is that this changed in 
2.0.5 to get a better error message.   :-)


---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog






BGS Beratungsgesellschaft 
Software Systemplanung AG         Niederlassung Rhein/Main 
Robert-Koch-Stra�e 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de Gesch�ftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 

  

Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Jo...@bgs-ag.de.
Hi Dan,

I solved the last problem copying libraries (xmlsec-1.3.0.jar, 
wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part to the 
EAR-Part:
(WebContent/WEB-INF/lib -> EarContent/lib)

One Problem solved another arises:

Client writes the SecurityHeader:
..
<wsse:Security xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
" soap:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
" wsu:Id="UsernameToken-12189822">
<wsse:Username>chef</wsse:Username>
<wsse:Password Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest
">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
<wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
<wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
...

Server is configured with the interceptor:
@InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })

In this class I configure 3 Interceptors:
        public void handleMessage(Message message) throws Fault {
                Map<String, Object> props = new HashMap<String, Object>();
                props.put(WSHandlerConstants.ACTION, 
WSHandlerConstants.USERNAME_TOKEN);
                props.put(WSHandlerConstants.PASSWORD_TYPE, 
WSConstants.PW_DIGEST);
                props.put(WSHandlerConstants.PW_CALLBACK_CLASS, 
ServerPasswordCallback.class.getName());

                WSS4JInInterceptor           wss4jInInterceptor   = new 
WSS4JInInterceptor(props);
                ValidateUserTokenInterceptor userTokenInterceptor = new 
ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);

                message.getInterceptorChain().add(wss4jInInterceptor);
                //org.apache.cxf.binding.soap.SoapFault: No SOAPMessage 
DOM was found. Please enable the SAAJInInterceptor.
                message.getInterceptorChain().add(new 
SAAJInInterceptor()); 
 message.getInterceptorChain().add(userTokenInterceptor);
        }

UserTokenInterceptor works fine, SAAJInInterceptor is necessary otherwise 
excepton but now I get an exception on the wss4jInInterceptor:

25.07.2008 13:03:44 org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor 
handleMessage
WARNUNG: Request does not contain required Security header
25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: Request does not contain required 
Security header.
        at 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:153)
        at 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:60)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)

How do I know what is wrong with my SecurityHeader?

-Josef




Daniel Kulp <dk...@apache.org> 
23.07.2008 14:42
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie
user@geronimo.apache.org
Thema
Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes







On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:

> Hi Kevin, Lin, Daniel, Glen,
>
> @Daniel: Your VM-Parameters solved this problem. Thank you very much 
> for
> your help.

Yea, but it definitely shouldn't have been necessary.

> @Glen: Thank you very much for your tipp, we will wait for Geronimo 
> 2.1.2
> and then we have Apache CXF2.0.6...

Actually, CXF 2.0.8.    :-)


> @All: Now I have two new issues ;-)
> 1) The client is written like described in
> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server 
> part -
> because of JavaEE5 - we choose
> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/

> .
> In the first run I added
> @InInterceptors 
> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
> the WS-Implementation-Class and nothing happend. Afterwards I had a 
> try
> with the interface class and added the same
> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
> After this changed the class de.myapp.WSSecurityInterceptor was 
> accessed.
> Why do I have to add @... in implementation AND interface?

Not sure on that.   Feel free to log a CXF bug.    It should be 
possible to just put it on the implementation.   The interface should 
be shareable between clients/servers and having interceptors defined 
on it that should just be there for the server is not a good thing.


> 2) In the handleMessage(Message message) I receive after:
> ...
>                props.put(WSHandlerConstants.PASSWORD_TYPE,
> WSConstants.PW_TEXT);
>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> ServerPasswordCallback.class.getName());
>
>                WSS4JInInterceptor wss4jInHandler = new
> WSS4JInInterceptor(props);
> ...
>
> .........................
>
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
>        at
> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java: 
> 661)
>        at
> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java: 
> 2134)
>        at
>

With CXF 2.0.2, that stack could result from a BUNCH of things.  We 
actually would get that stack if the server sent back and html error 
page without setting a 404 or similar.   Several things can cause 
it.   If you can tcpdump or wireshark the wire transfers to see what's 
going on, that would be helpful.    Good news is that this changed in 
2.0.5 to get a better error message.   :-)


---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog






BGS Beratungsgesellschaft 
Software Systemplanung AG 
  
  
  
  
Niederlassung Rhein/Main 
Robert-Koch-Stra�e 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Gesch�ftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 


  

Antwort: Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Jo...@bgs-ag.de.
Hi Dan,

I solved the last problem copying libraries (xmlsec-1.3.0.jar, 
wss4j-1.5.1.jar, cxr-rt-ws-securitity-2.0.2-...) from the WAR-Part to the 
EAR-Part:
(WebContent/WEB-INF/lib -> EarContent/lib)

One Problem solved another arises:

Client writes the SecurityHeader:
..
<wsse:Security xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
" soap:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
" wsu:Id="UsernameToken-12189822">
<wsse:Username>chef</wsse:Username>
<wsse:Password Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest
">MxsuASsgtCzGlTTif0kcbqXIHxM=</wsse:Password>
<wsse:Nonce>HAYlnYvfdo0dddeYXGsxdw==</wsse:Nonce>
<wsu:Created>2008-07-25T11:22:20.886Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
...

Server is configured with the interceptor:
@InInterceptors(interceptors={ "de.mypath.WSSecurityInterceptor" })

In this class I configure 3 Interceptors:
        public void handleMessage(Message message) throws Fault {
                Map<String, Object> props = new HashMap<String, Object>();
                props.put(WSHandlerConstants.ACTION, 
WSHandlerConstants.USERNAME_TOKEN);
                props.put(WSHandlerConstants.PASSWORD_TYPE, 
WSConstants.PW_DIGEST);
                props.put(WSHandlerConstants.PW_CALLBACK_CLASS, 
ServerPasswordCallback.class.getName());

                WSS4JInInterceptor           wss4jInInterceptor   = new 
WSS4JInInterceptor(props);
                ValidateUserTokenInterceptor userTokenInterceptor = new 
ValidateUserTokenInterceptor(Phase.POST_PROTOCOL);

                message.getInterceptorChain().add(wss4jInInterceptor);
                //org.apache.cxf.binding.soap.SoapFault: No SOAPMessage 
DOM was found. Please enable the SAAJInInterceptor.
                message.getInterceptorChain().add(new 
SAAJInInterceptor()); 
 message.getInterceptorChain().add(userTokenInterceptor);
        }

UserTokenInterceptor works fine, SAAJInInterceptor is necessary otherwise 
excepton but now I get an exception on the wss4jInInterceptor:

25.07.2008 13:03:44 org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor 
handleMessage
WARNUNG: Request does not contain required Security header
25.07.2008 13:03:44 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: Request does not contain required 
Security header.
        at 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:153)
        at 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:60)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)

How do I know what is wrong with my SecurityHeader?

-Josef




Daniel Kulp <dk...@apache.org> 
23.07.2008 14:42
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie
user@geronimo.apache.org
Thema
Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes







On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:

> Hi Kevin, Lin, Daniel, Glen,
>
> @Daniel: Your VM-Parameters solved this problem. Thank you very much 
> for
> your help.

Yea, but it definitely shouldn't have been necessary.

> @Glen: Thank you very much for your tipp, we will wait for Geronimo 
> 2.1.2
> and then we have Apache CXF2.0.6...

Actually, CXF 2.0.8.    :-)


> @All: Now I have two new issues ;-)
> 1) The client is written like described in
> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server 
> part -
> because of JavaEE5 - we choose
> 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/

> .
> In the first run I added
> @InInterceptors 
> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
> the WS-Implementation-Class and nothing happend. Afterwards I had a 
> try
> with the interface class and added the same
> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
> After this changed the class de.myapp.WSSecurityInterceptor was 
> accessed.
> Why do I have to add @... in implementation AND interface?

Not sure on that.   Feel free to log a CXF bug.    It should be 
possible to just put it on the implementation.   The interface should 
be shareable between clients/servers and having interceptors defined 
on it that should just be there for the server is not a good thing.


> 2) In the handleMessage(Message message) I receive after:
> ...
>                props.put(WSHandlerConstants.PASSWORD_TYPE,
> WSConstants.PW_TEXT);
>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> ServerPasswordCallback.class.getName());
>
>                WSS4JInInterceptor wss4jInHandler = new
> WSS4JInInterceptor(props);
> ...
>
> .........................
>
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
>        at
> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java: 
> 661)
>        at
> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java: 
> 2134)
>        at
>

With CXF 2.0.2, that stack could result from a BUNCH of things.  We 
actually would get that stack if the server sent back and html error 
page without setting a 404 or similar.   Several things can cause 
it.   If you can tcpdump or wireshark the wire transfers to see what's 
going on, that would be helpful.    Good news is that this changed in 
2.0.5 to get a better error message.   :-)


---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog






BGS Beratungsgesellschaft 
Software Systemplanung AG         Niederlassung Rhein/Main 
Robert-Koch-Stra�e 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de Gesch�ftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 


  

Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Daniel Kulp <dk...@apache.org>.
On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:

> Hi Kevin, Lin, Daniel, Glen,
>
> @Daniel: Your VM-Parameters solved this problem. Thank you very much  
> for
> your help.

Yea, but it definitely shouldn't have been necessary.

> @Glen: Thank you very much for your tipp, we will wait for Geronimo  
> 2.1.2
> and then we have Apache CXF2.0.6...

Actually, CXF 2.0.8.    :-)


> @All: Now I have two new issues ;-)
> 1) The client is written like described in
> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server  
> part -
> because of JavaEE5 - we choose
> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/
> .
> In the first run I added
> @InInterceptors 
> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
> the WS-Implementation-Class and nothing happend. Afterwards I had a  
> try
> with the interface class and added the same
> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
> After this changed the class de.myapp.WSSecurityInterceptor was  
> accessed.
> Why do I have to add @... in implementation AND interface?

Not sure on that.   Feel free to log a CXF bug.    It should be  
possible to just put it on the implementation.   The interface should  
be shareable between clients/servers and having interceptors defined  
on it that should just be there for the server is not a good thing.


> 2) In the handleMessage(Message message) I receive after:
> ...
>                props.put(WSHandlerConstants.PASSWORD_TYPE,
> WSConstants.PW_TEXT);
>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> ServerPasswordCallback.class.getName());
>
>                WSS4JInInterceptor wss4jInHandler = new
> WSS4JInInterceptor(props);
> ...
>
> .........................
>
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
>        at
> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java: 
> 661)
>        at
> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java: 
> 2134)
>        at
>

With CXF 2.0.2, that stack could result from a BUNCH of things.  We  
actually would get that stack if the server sent back and html error  
page without setting a 404 or similar.   Several things can cause  
it.   If you can tcpdump or wireshark the wire transfers to see what's  
going on, that would be helpful.    Good news is that this changed in  
2.0.5 to get a better error message.   :-)


---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Re: Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Daniel Kulp <dk...@apache.org>.
On Jul 23, 2008, at 7:24 AM, Josef.Eisele@bgs-ag.de wrote:

> Hi Kevin, Lin, Daniel, Glen,
>
> @Daniel: Your VM-Parameters solved this problem. Thank you very much  
> for
> your help.

Yea, but it definitely shouldn't have been necessary.

> @Glen: Thank you very much for your tipp, we will wait for Geronimo  
> 2.1.2
> and then we have Apache CXF2.0.6...

Actually, CXF 2.0.8.    :-)


> @All: Now I have two new issues ;-)
> 1) The client is written like described in
> http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server  
> part -
> because of JavaEE5 - we choose
> http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/
> .
> In the first run I added
> @InInterceptors 
> (interceptors={   "de.myapp.WSSecurityInterceptor" })  to
> the WS-Implementation-Class and nothing happend. Afterwards I had a  
> try
> with the interface class and added the same
> @InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }).
> After this changed the class de.myapp.WSSecurityInterceptor was  
> accessed.
> Why do I have to add @... in implementation AND interface?

Not sure on that.   Feel free to log a CXF bug.    It should be  
possible to just put it on the implementation.   The interface should  
be shareable between clients/servers and having interceptors defined  
on it that should just be there for the server is not a good thing.


> 2) In the handleMessage(Message message) I receive after:
> ...
>                props.put(WSHandlerConstants.PASSWORD_TYPE,
> WSConstants.PW_TEXT);
>                props.put(WSHandlerConstants.PW_CALLBACK_CLASS,
> ServerPasswordCallback.class.getName());
>
>                WSS4JInInterceptor wss4jInHandler = new
> WSS4JInInterceptor(props);
> ...
>
> .........................
>
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
>        at
> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java: 
> 661)
>        at
> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java: 
> 2134)
>        at
>

With CXF 2.0.2, that stack could result from a BUNCH of things.  We  
actually would get that stack if the server sent back and html error  
page without setting a 404 or similar.   Several things can cause  
it.   If you can tcpdump or wireshark the wire transfers to see what's  
going on, that would be helpful.    Good news is that this changed in  
2.0.5 to get a better error message.   :-)


---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Jo...@bgs-ag.de.
Hi Kevin, Lin, Daniel, Glen,

@Daniel: Your VM-Parameters solved this problem. Thank you very much for 
your help.

@Lin: I start my Geronimo with this script:
export JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre"
export JAVA_OPTS="-javaagent:"/home/mypath/geronimo/bin/jpa.jar" 
-Djava.ext.dirs="/home/mypath/geronimo/lib/ext:/usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/ext" 
-Djava.endorsed.dirs="/home/mypath/geronimo/lib/endorsed:/usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/endorsed" 
-Xms128m -Xmx512m -XX:MaxPermSize=256m"
export GERONIMO_HOME=/home/mypath/geronimo
export GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.provider=cxf 
-Dorg.apache.geronimo.saaj.provider=sun" 
/home/mypath/geronimo/bin/geronimo.sh jpda start

@Kevin: We use Geronimo 2.1.1 with Tomcat. Because of 
https://issues.apache.org/jira/browse/AXIS2-3808 und 
http://www.nabble.com/JAX-WS-2.1-WebService-inside-Geronimo-2.0.1-td17088122s134.html#a17328111 
we want to use Apache CXF.

@Glen: Thank you very much for your tipp, we will wait for Geronimo 2.1.2 
and then we have Apache CXF2.0.6...

@All: Now I have two new issues ;-) 
1) The client is written like described in 
http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server part - 
because of JavaEE5 - we choose 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/
. 
In the first run I added 
@InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" })  to 
the WS-Implementation-Class and nothing happend. Afterwards I had a try 
with the interface class and added the same 
@InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }). 
After this changed the class de.myapp.WSSecurityInterceptor was accessed. 
Why do I have to add @... in implementation AND interface?
2) In the handleMessage(Message message) I receive after:
...
                props.put(WSHandlerConstants.PASSWORD_TYPE, 
WSConstants.PW_TEXT);
                props.put(WSHandlerConstants.PW_CALLBACK_CLASS, 
ServerPasswordCallback.class.getName());

                WSS4JInInterceptor wss4jInHandler = new 
WSS4JInInterceptor(props);
...

the exception:
[DEBUG] [MyWSImpl] >> Webservice-Methode 'receiveData' wird aufgerufen.
23.07.2008 11:07:53 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:191)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        at $Proxy21.receiveData(Unknown Source)
        at de.myproject.ws.MyWSImpl.callWebservice(MyWSImpl.java:156)
        at de.myproject.ws.MyWSImpl.readData(MyWSImpl.java:58)
        at de.myproject.ws.MyWSImplTest.testreadData(MyWSImplTest.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
        at 
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
        at 
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
        at 
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
        at 
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
        at 
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:85)
        .. 37 more
javax.xml.ws.soap.SOAPFaultException: Error reading XMLStreamReader.
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
        at $Proxy21.receiveData(Unknown Source)
        at de.myproject.ws.MyWSImpl.callWebservice(MyWSImpl.java:156)
        at de.myproject.ws.MyWSImpl.readData(MyWSImpl.java:58)
        at de.myproject.ws.MyWSImplTest.testreadData(MyWSImplTest.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.apache.cxf.binding.soap.SoapFault: Error reading 
XMLStreamReader.
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:191)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        .. 24 more
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
        at 
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
        at 
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
        at 
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
        at 
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
        at 
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:85)
        .. 37 more


Any suggestions for this problem?!

-Josef




Kevan Miller <ke...@gmail.com> 
18.07.2008 18:50
Bitte antworten an
user@geronimo.apache.org


An
user@geronimo.apache.org
Kopie

Thema
Re: WS-Stack Apache CXF asks for Axis2-Classes







On Jul 18, 2008, at 11:51 AM, Lin Sun wrote:

Looks like it is still using Axis2's saaj impl even if you set to use 
Sun's.

I wonder if your GERONIMO_OPTS configuration is picked up correctly.
How are you starting the server?

Lin
On Fri, Jul 18, 2008 at 10:22 AM,  <Jo...@bgs-ag.de> wrote:

Hi all,

Step for Step I created a webservice for Apache CXF under Geronimo 2.1.1.
After implementing and testing I wanted to go on with the implementation 
of
WS-Security Features. I tried to do my best using the howto under
http://cwiki.apache.org/CXF20DOC/ws-security.html

I had to add some more libraries into my WAR-File like
cxf-rt-ws-security-2.0.2-incubator.jar
wss4j-1.5.1.jar
xmlsec-1.3.0.jar

I start Geronimo with the VM-Parameter:
export GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.provider=cxf
-Dorg.apache.geronimo.saaj.provider=sun"

And now after if I call my webservice-method, I get the error:
..
Provider org.apache.axis2.saaj.MessageFactoryImpl not found
Provider org.apache.axis2.saaj.SOAPFactoryImpl not found

Pretty sure that the problem is we're picking up two resource files from 
the axis2-saaj jar file. In particular:

META-INF/services/javax.xml.soap.SOAPConnectionFactory
META-INF/services/javax.xml.soap.MessageFactory

Can you remind me of your configuration/setup?

You're running on Geronimo 2.1.1. 
Are you using Tomcat? 
Which default web services provider are you using? Axis2 would be the 
default... 
You are attempting to deploy your own CXF libraries with your .war file?
Finally, the reason you are deploying with hidden-classes is to avoid -- 
https://issues.apache.org/jira/browse/GERONIMO-4029 ?

--kevan


BGS Beratungsgesellschaft 
Software Systemplanung AG         Niederlassung Rhein/Main 
Robert-Koch-Stra�e 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de Gesch�ftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 


  

Antwort: Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Jo...@bgs-ag.de.
Hi Kevin, Lin, Daniel, Glen,

@Daniel: Your VM-Parameters solved this problem. Thank you very much for 
your help.

@Lin: I start my Geronimo with this script:
export JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre"
export JAVA_OPTS="-javaagent:"/home/mypath/geronimo/bin/jpa.jar" 
-Djava.ext.dirs="/home/mypath/geronimo/lib/ext:/usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/ext" 
-Djava.endorsed.dirs="/home/mypath/geronimo/lib/endorsed:/usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/endorsed" 
-Xms128m -Xmx512m -XX:MaxPermSize=256m"
export GERONIMO_HOME=/home/mypath/geronimo
export GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.provider=cxf 
-Dorg.apache.geronimo.saaj.provider=sun" 
/home/mypath/geronimo/bin/geronimo.sh jpda start

@Kevin: We use Geronimo 2.1.1 with Tomcat. Because of 
https://issues.apache.org/jira/browse/AXIS2-3808 und 
http://www.nabble.com/JAX-WS-2.1-WebService-inside-Geronimo-2.0.1-td17088122s134.html#a17328111 
we want to use Apache CXF.

@Glen: Thank you very much for your tipp, we will wait for Geronimo 2.1.2 
and then we have Apache CXF2.0.6...

@All: Now I have two new issues ;-) 
1) The client is written like described in 
http://cwiki.apache.org/CXF20DOC/ws-security.html. For the server part - 
because of JavaEE5 - we choose 
http://depressedprogrammer.wordpress.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/
. 
In the first run I added 
@InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" })  to 
the WS-Implementation-Class and nothing happend. Afterwards I had a try 
with the interface class and added the same 
@InInterceptors(interceptors={   "de.myapp.WSSecurityInterceptor" }). 
After this changed the class de.myapp.WSSecurityInterceptor was accessed. 
Why do I have to add @... in implementation AND interface?
2) In the handleMessage(Message message) I receive after:
...
                props.put(WSHandlerConstants.PASSWORD_TYPE, 
WSConstants.PW_TEXT);
                props.put(WSHandlerConstants.PW_CALLBACK_CLASS, 
ServerPasswordCallback.class.getName());

                WSS4JInInterceptor wss4jInHandler = new 
WSS4JInInterceptor(props);
...

the exception:
[DEBUG] [MyWSImpl] >> Webservice-Methode 'receiveData' wird aufgerufen.
23.07.2008 11:07:53 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:191)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        at $Proxy21.receiveData(Unknown Source)
        at de.myproject.ws.MyWSImpl.callWebservice(MyWSImpl.java:156)
        at de.myproject.ws.MyWSImpl.readData(MyWSImpl.java:58)
        at de.myproject.ws.MyWSImplTest.testreadData(MyWSImplTest.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
        at 
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
        at 
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
        at 
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
        at 
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
        at 
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:85)
        .. 37 more
javax.xml.ws.soap.SOAPFaultException: Error reading XMLStreamReader.
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
        at $Proxy21.receiveData(Unknown Source)
        at de.myproject.ws.MyWSImpl.callWebservice(MyWSImpl.java:156)
        at de.myproject.ws.MyWSImpl.readData(MyWSImpl.java:58)
        at de.myproject.ws.MyWSImplTest.testreadData(MyWSImplTest.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.apache.cxf.binding.soap.SoapFault: Error reading 
XMLStreamReader.
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:191)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at 
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at 
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        .. 24 more
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
        at 
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
        at 
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
        at 
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
        at 
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
        at 
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:85)
        .. 37 more


Any suggestions for this problem?!

-Josef




Kevan Miller <ke...@gmail.com> 
18.07.2008 18:50
Bitte antworten an
user@geronimo.apache.org


An
user@geronimo.apache.org
Kopie

Thema
Re: WS-Stack Apache CXF asks for Axis2-Classes







On Jul 18, 2008, at 11:51 AM, Lin Sun wrote:

Looks like it is still using Axis2's saaj impl even if you set to use 
Sun's.

I wonder if your GERONIMO_OPTS configuration is picked up correctly.
How are you starting the server?

Lin
On Fri, Jul 18, 2008 at 10:22 AM,  <Jo...@bgs-ag.de> wrote:

Hi all,

Step for Step I created a webservice for Apache CXF under Geronimo 2.1.1.
After implementing and testing I wanted to go on with the implementation 
of
WS-Security Features. I tried to do my best using the howto under
http://cwiki.apache.org/CXF20DOC/ws-security.html

I had to add some more libraries into my WAR-File like
cxf-rt-ws-security-2.0.2-incubator.jar
wss4j-1.5.1.jar
xmlsec-1.3.0.jar

I start Geronimo with the VM-Parameter:
export GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.provider=cxf
-Dorg.apache.geronimo.saaj.provider=sun"

And now after if I call my webservice-method, I get the error:
..
Provider org.apache.axis2.saaj.MessageFactoryImpl not found
Provider org.apache.axis2.saaj.SOAPFactoryImpl not found

Pretty sure that the problem is we're picking up two resource files from 
the axis2-saaj jar file. In particular:

META-INF/services/javax.xml.soap.SOAPConnectionFactory
META-INF/services/javax.xml.soap.MessageFactory

Can you remind me of your configuration/setup?

You're running on Geronimo 2.1.1. 
Are you using Tomcat? 
Which default web services provider are you using? Axis2 would be the 
default... 
You are attempting to deploy your own CXF libraries with your .war file?
Finally, the reason you are deploying with hidden-classes is to avoid -- 
https://issues.apache.org/jira/browse/GERONIMO-4029 ?

--kevan


BGS Beratungsgesellschaft 
Software Systemplanung AG 
  
  
  
  
Niederlassung Rhein/Main 
Robert-Koch-Stra�e 41 
55129 Mainz 
Fon: +49 (0) 6131 / 914-0 
Fax: +49 (0) 6131 / 914-400 
www.bgs-ag.de 
Gesch�ftssitz Mainz 
Registergericht 
Amtsgericht Mainz 
HRB 62 50 
  
Aufsichtsratsvorsitzender 
Klaus Hellwig 
Vorstand 
Hanspeter Gau 
Hermann Kiefer 
Nils Manegold 


  

Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Kevan Miller <ke...@gmail.com>.
On Jul 18, 2008, at 11:51 AM, Lin Sun wrote:

> Looks like it is still using Axis2's saaj impl even if you set to  
> use Sun's.
>
> I wonder if your GERONIMO_OPTS configuration is picked up correctly.
> How are you starting the server?
>
> Lin
> On Fri, Jul 18, 2008 at 10:22 AM,  <Jo...@bgs-ag.de> wrote:
>>
>> Hi all,
>>
>> Step for Step I created a webservice for Apache CXF under Geronimo  
>> 2.1.1.
>> After implementing and testing I wanted to go on with the  
>> implementation of
>> WS-Security Features. I tried to do my best using the howto under
>> http://cwiki.apache.org/CXF20DOC/ws-security.html
>>
>> I had to add some more libraries into my WAR-File like
>> cxf-rt-ws-security-2.0.2-incubator.jar
>> wss4j-1.5.1.jar
>> xmlsec-1.3.0.jar
>>
>> I start Geronimo with the VM-Parameter:
>> export GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.provider=cxf
>> -Dorg.apache.geronimo.saaj.provider=sun"
>>
>> And now after if I call my webservice-method, I get the error:
>> ..
>> Provider org.apache.axis2.saaj.MessageFactoryImpl not found
>> Provider org.apache.axis2.saaj.SOAPFactoryImpl not found

Pretty sure that the problem is we're picking up two resource files  
from the axis2-saaj jar file. In particular:

META-INF/services/javax.xml.soap.SOAPConnectionFactory
META-INF/services/javax.xml.soap.MessageFactory

Can you remind me of your configuration/setup?

You're running on Geronimo 2.1.1.
Are you using Tomcat?
Which default web services provider are you using? Axis2 would be the  
default...
You are attempting to deploy your own CXF libraries with your .war file?
Finally, the reason you are deploying with hidden-classes is to avoid  
-- https://issues.apache.org/jira/browse/GERONIMO-4029 ?

--kevan


Re: WS-Stack Apache CXF asks for Axis2-Classes

Posted by Lin Sun <li...@gmail.com>.
Looks like it is still using Axis2's saaj impl even if you set to use Sun's.

I wonder if your GERONIMO_OPTS configuration is picked up correctly.
How are you starting the server?

Lin
On Fri, Jul 18, 2008 at 10:22 AM,  <Jo...@bgs-ag.de> wrote:
>
> Hi all,
>
> Step for Step I created a webservice for Apache CXF under Geronimo 2.1.1.
> After implementing and testing I wanted to go on with the implementation of
> WS-Security Features. I tried to do my best using the howto under
> http://cwiki.apache.org/CXF20DOC/ws-security.html
>
> I had to add some more libraries into my WAR-File like
> cxf-rt-ws-security-2.0.2-incubator.jar
> wss4j-1.5.1.jar
> xmlsec-1.3.0.jar
>
> I start Geronimo with the VM-Parameter:
> export GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.provider=cxf
> -Dorg.apache.geronimo.saaj.provider=sun"
>
> And now after if I call my webservice-method, I get the error:
> ..
> Provider org.apache.axis2.saaj.MessageFactoryImpl not found
> Provider org.apache.axis2.saaj.SOAPFactoryImpl not found
> ...
>
> 18.07.2008 15:58:02 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: SOAPEXCEPTION
>         at
> org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOutInterceptor.java:83)
>         at
> org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOutInterceptor.java:57)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>         at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>         at $Proxy20.receiveDataDelta(Unknown Source)
>         at
> de.mydomain.myproj.replikation.intranet.ws.WSClientImpl.callWebservice(WSClientImpl.java:156)
>         at
> de.mydomain.myproj.replikation.intranet.ws.WSClientImpl.readData(WSClientImpl.java:58)
>         at
> de.mydomain.myproj.replikation.intranet.ws.WSClientImplTest.testreadData(WSClientImplTest.java:31)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
>         at
> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
>         at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
>         at
> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
>         at
> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
>         at
> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
>         at
> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
>         at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>         at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
>         at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: javax.xml.soap.SOAPException: Unable to create message factory
> for SOAP: Provider org.apache.axis2.saaj.MessageFactoryImpl not found
>         at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:89)
>         at
> org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOutInterceptor.java:71)
>         ... 30 more
> javax.xml.ws.WebServiceException: Cannot create SAAJ factory instance.
>         at
> org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl.getSOAPFactory(SOAPBindingImpl.java:118)
>         at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:151)
>         at $Proxy20.receiveDataDelta(Unknown Source)
>         at
> de.mydomain.myproj.replikation.intranet.ws.WSClientImpl.callWebservice(WSClientImpl.java:156)
>         at
> de.mydomain.myproj.replikation.intranet.ws.WSClientImpl.readData(WSClientImpl.java:58)
>         at
> de.mydomain.myproj.replikation.intranet.ws.WSClientImplTest.testreadData(WSClientImplTest.java:31)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
>         at
> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
>         at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
>         at
> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
>         at
> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
>         at
> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
>         at
> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
>         at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>         at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
>         at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory:
> Provider org.apache.axis2.saaj.SOAPFactoryImpl not found
>         at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:126)
>         at
> org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl.getSOAPFactory(SOAPBindingImpl.java:113)
>         ... 25 more
>
> I don't understand why Axis2-Classes are called. Because of a Axis2-Bug I
> have a filter in geronimo-application.xml:
>
>         <sys:hidden-classes>
>             <sys:filter>org.apache.axis2</sys:filter>
>             <sys:filter>javax.xml.bind</sys:filter>
>             <sys:filter>javax.xml.namespace</sys:filter>
>         </sys:hidden-classes>
>
> -Josef
> ________________________________
> BGS Beratungsgesellschaft
> Software Systemplanung AG
>   Niederlassung Rhein/Main
> Robert-Koch-Straße 41
> 55129 Mainz
> Fon: +49 (0) 6131 / 914-0
> Fax: +49 (0) 6131 / 914-400
> www.bgs-ag.de Geschäftssitz Mainz
> Registergericht
> Amtsgericht Mainz
> HRB 62 50
>   Aufsichtsratsvorsitzender
> Klaus Hellwig
> Vorstand
> Hanspeter Gau
> Hermann Kiefer
> Nils Manegold
>
>