This is probably a configuration problem with Geronimo. Basically, we just call the javax.xml.soap.MessageFactory.newInstance() call to create a SAAJ MessageFactory. Under the covers, it checks the META- INF/services dirs on the classpath for a file and if not found, uses the default burned into the saaj-api jar. Geronimo uses the geronimo-specs version of the saaj-api jar which burns the Axis2 version into it. The sun saaj-impl jar doesn't have the META-INF/ services thing so that's why it's trying to pick up the axis2 version.

So, if you have -Dorg.apache.geronimo.saaj.provider=sun, it really needs to use the sun saaj-api jar as well OR add another jar that has the apprporiate META-INF/services file to allow it to pick up the sun implementation.

You MIGHT be able to get this to work if you set some system properties:
- Djavax .xml .soap .MessageFactory =com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl - Djavax .xml .soap.MetaFactory=com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl - Djavax .xml .soap .SOAPFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl
or similar.


Dan



On Jul 18, 2008, at 10:34 AM, [EMAIL PROTECTED] wrote:

Hi,

I sent this question to "[EMAIL PROTECTED]". But its kind of a
specific 'Apache CXF' Question. So I ask the real Apache CXF - Experts as
well.

Geronimo 2.1.1 uses Apache CXF 2.0.2 Incubator

-Josef

__________________

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


---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog




Reply via email to