You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by mieke <mm...@zag.com> on 2008/05/30 22:23:07 UTC

org.apache.cxf.binding.soap.SoapFault: Fault occurred while processing

I have a former xfire service that I'm upgrading to cxf. I think I have the
service part down i.e., I have it deployed (Resin 3.1.6, Spring 2.0.6) using
the simple server/aegis binding set up and I see the WSDL when I access the
service URL. The problem I'm having appears to be with the client. My client
looks as follows:

public class SessionServiceClientImpl implements MessageSourceAware,
SessionService {
    private SessionService sei = null;
    ...
    public SessionService getProxyService() {
        
        String oldAddress = address;
        address = messageSource.getMessage("sessionservice.endpoint", null,
Locale.US);

        if (sei == null || !oldAddress.equals(address)) {
            ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
            factory.setDataBinding(new AegisDatabinding());
            factory.setServiceClass(SessionService.class);
            factory.setAddress(address);
            sei = (SessionService) factory.create();
        }
        return sei;

    }
...

}

When I attempt to access the service using this client via my unit test I
get the following error ...

org.apache.cxf.binding.soap.SoapFault: Fault occurred while processing.
	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:221)
	at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96)
	at
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:65)
	at
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1988)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1824)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:583)
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
	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.frontend.ClientProxy.invoke(ClientProxy.java:68)
	at $Proxy17.setValue(Unknown Source)
	at
com.zag.sessionservice.client.SessionServiceClientImpl.setValue(SessionServiceClientImpl.java:48)
	at
com.zag.sessionservice.client.TestSessionService.testSessionService(TestSessionService.java:27)
	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 junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
	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)

WSDL looks as follows ...

    <wsdl:definitions name="SessionService"
targetNamespace="http://common.sessionservice.zag.com/">
        
        <wsdl:types>
            
            <xsd:schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
                targetNamespace="http://common.sessionservice.zag.com/">
                <xsd:element name="cleanUp" type="tns:cleanUp"/>
                
                <xsd:complexType name="cleanUp">
                    <xsd:sequence/>
                </xsd:complexType>
                <xsd:element name="cleanUpResponse"
type="tns:cleanUpResponse"/>
                
                <xsd:complexType name="cleanUpResponse">
                    
                    <xsd:sequence>
                        <xsd:element name="return" type="xsd:int"/>
                    </xsd:sequence>
                </xsd:complexType>
                <xsd:element name="getValue" type="tns:getValue"/>
                
                <xsd:complexType name="getValue">
                    
                    <xsd:sequence>
                        <xsd:element minOccurs="0" name="arg0"
type="xsd:string"/>
                        <xsd:element minOccurs="0" name="arg1"
type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
                <xsd:element name="getValueResponse"
type="tns:getValueResponse"/>
                
                <xsd:complexType name="getValueResponse">
                    
                    <xsd:sequence>
                        <xsd:element minOccurs="0" name="return"
type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
                <xsd:element name="setValue" type="tns:setValue"/>
                
                <xsd:complexType name="setValue">
                    
                    <xsd:sequence>
                        <xsd:element minOccurs="0" name="arg0"
type="xsd:string"/>
                        <xsd:element minOccurs="0" name="arg1"
type="xsd:string"/>
                        <xsd:element minOccurs="0" name="arg2"
type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
                <xsd:element name="setValueResponse"
type="tns:setValueResponse"/>
                
                <xsd:complexType name="setValueResponse">
                    <xsd:sequence/>
                </xsd:complexType>
                <xsd:element name="touchSession" type="tns:touchSession"/>
                
                <xsd:complexType name="touchSession">
                    
                    <xsd:sequence>
                        <xsd:element minOccurs="0" name="arg0"
type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
                <xsd:element name="touchSessionResponse"
type="tns:touchSessionResponse"/>
                
                <xsd:complexType name="touchSessionResponse">
                    
                    <xsd:sequence>
                        <xsd:element name="return" type="xsd:boolean"/>
                    </xsd:sequence>
                </xsd:complexType>
                <xsd:element name="expireSession" type="tns:expireSession"/>
                
                <xsd:complexType name="expireSession">
                    
                    <xsd:sequence>
                        <xsd:element minOccurs="0" name="arg0"
type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
                <xsd:element name="expireSessionResponse"
type="tns:expireSessionResponse"/>
                
                <xsd:complexType name="expireSessionResponse">
                    <xsd:sequence/>
                </xsd:complexType>
            </xsd:schema>
        </wsdl:types>
        
        <wsdl:message name="expireSessionResponse">
            <wsdl:part element="tns:expireSessionResponse"
name="parameters">
            </wsdl:part>
        </wsdl:message>
        
        <wsdl:message name="setValueResponse">
            <wsdl:part element="tns:setValueResponse" name="parameters">
            </wsdl:part>
        </wsdl:message>
        
        <wsdl:message name="cleanUp">
            <wsdl:part element="tns:cleanUp" name="parameters">
            </wsdl:part>
        </wsdl:message>
        
        <wsdl:message name="expireSession">
            <wsdl:part element="tns:expireSession" name="parameters">
            </wsdl:part>
        </wsdl:message>
        
        <wsdl:message name="getValue">
            <wsdl:part element="tns:getValue" name="parameters">
            </wsdl:part>
        </wsdl:message>
        
        <wsdl:message name="touchSessionResponse">
            <wsdl:part element="tns:touchSessionResponse" name="parameters">
            </wsdl:part>
        </wsdl:message>
        
        <wsdl:message name="touchSession">
            <wsdl:part element="tns:touchSession" name="parameters">
            </wsdl:part>
        </wsdl:message>
        
        <wsdl:message name="cleanUpResponse">
            <wsdl:part element="tns:cleanUpResponse" name="parameters">
            </wsdl:part>
        </wsdl:message>
        
        <wsdl:message name="setValue">
            <wsdl:part element="tns:setValue" name="parameters">
            </wsdl:part>
        </wsdl:message>
        
        <wsdl:message name="getValueResponse">
            <wsdl:part element="tns:getValueResponse" name="parameters">
            </wsdl:part>
        </wsdl:message>
        
        <wsdl:portType name="SessionServicePortType">
            
            <wsdl:operation name="cleanUp">
                <wsdl:input message="tns:cleanUp" name="cleanUp">
                </wsdl:input>
                <wsdl:output message="tns:cleanUpResponse"
name="cleanUpResponse">
                </wsdl:output>
            </wsdl:operation>
            
            <wsdl:operation name="getValue">
                <wsdl:input message="tns:getValue" name="getValue">
                </wsdl:input>
                <wsdl:output message="tns:getValueResponse"
name="getValueResponse">
                </wsdl:output>
            </wsdl:operation>
            
            <wsdl:operation name="setValue">
                <wsdl:input message="tns:setValue" name="setValue">
                </wsdl:input>
                <wsdl:output message="tns:setValueResponse"
name="setValueResponse">
                </wsdl:output>
            </wsdl:operation>
            
            <wsdl:operation name="touchSession">
                <wsdl:input message="tns:touchSession" name="touchSession">
                </wsdl:input>
                <wsdl:output message="tns:touchSessionResponse"
name="touchSessionResponse">
                </wsdl:output>
            </wsdl:operation>
            
            <wsdl:operation name="expireSession">
                <wsdl:input message="tns:expireSession"
name="expireSession">
                </wsdl:input>
                <wsdl:output message="tns:expireSessionResponse"
name="expireSessionResponse">
                </wsdl:output>
            </wsdl:operation>
        </wsdl:portType>
        
        <wsdl:binding name="SessionServiceSoapBinding"
type="tns:SessionServicePortType">
            <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
            
            <wsdl:operation name="cleanUp">
                <soap:operation soapAction="" style="document"/>
                
                <wsdl:input name="cleanUp">
                    <soap:body use="literal"/>
                </wsdl:input>
                
                <wsdl:output name="cleanUpResponse">
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            
            <wsdl:operation name="getValue">
                <soap:operation soapAction="" style="document"/>
                
                <wsdl:input name="getValue">
                    <soap:body use="literal"/>
                </wsdl:input>
                
                <wsdl:output name="getValueResponse">
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            
            <wsdl:operation name="setValue">
                <soap:operation soapAction="" style="document"/>
                
                <wsdl:input name="setValue">
                    <soap:body use="literal"/>
                </wsdl:input>
                
                <wsdl:output name="setValueResponse">
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            
            <wsdl:operation name="touchSession">
                <soap:operation soapAction="" style="document"/>
                
                <wsdl:input name="touchSession">
                    <soap:body use="literal"/>
                </wsdl:input>
                
                <wsdl:output name="touchSessionResponse">
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            
            <wsdl:operation name="expireSession">
                <soap:operation soapAction="" style="document"/>
                
                <wsdl:input name="expireSession">
                    <soap:body use="literal"/>
                </wsdl:input>
                
                <wsdl:output name="expireSessionResponse">
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        
        <wsdl:service name="SessionService">
            
            <wsdl:port binding="tns:SessionServiceSoapBinding"
name="SessionServicePort">
                <soap:address
location="http://localhost:50080/SessionService/SessionService"/>
            </wsdl:port>
        </wsdl:service>
    </wsdl:definitions>

Appreciate any help.

Thanks,

Mieke
-- 
View this message in context: http://www.nabble.com/org.apache.cxf.binding.soap.SoapFault%3A-Fault-occurred-while-processing-tp17567296p17567296.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: org.apache.cxf.binding.soap.SoapFault: Fault occurred while processing

Posted by Mieke Mocke <mm...@zag.com>.
Great - I have it working now - the end result is simply accessing the 
impl bean e.g.

    <simple:server id="SessionService" 
serviceClass="com.zag.sessionservice.common.SessionService"
        address="/SessionService">
        <simple:dataBinding>
            <bean 
class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
        </simple:dataBinding>
        <simple:serviceBean>
            <ref bean="sessionService"/>
        </simple:serviceBean>
    </simple:server>

<bean id="sessionServiceDAO" 
class="com.zag.sessionservice.dao.hibernate.HibernateSessionServiceDAO">
    <property name="sessionFactory" ref="sessionFactorySS"/>
</bean>

<bean id="sessionService" 
class="com.zag.sessionservice.service.SessionServiceImpl">
    <property name="sessionServiceDAO" ref="sessionServiceDAO"/>
</bean>

All good and onto the next service upgrade.

Thanks,

Mieke

Mieke Mocke wrote:
> Sorry - my previous reply was on the wrong message - it's the end of 
> the week! here it is again ...
>
> Mieke Mocke wrote:
>> Thanks for the pointer Dan. There is indeed a NPE being thrown as my 
>> SessionServiceImpl class on the service side is supposed to have the 
>> 'sessionServiceDAO' bean injected, so my config here below is missing 
>> that ...
>>
>>    <simple:server id="SessionService" 
>> serviceClass="com.zag.sessionservice.common.SessionService"
>>        address="/SessionService">
>>        <simple:dataBinding>
>>            <bean 
>> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
>>        </simple:dataBinding>
>>        <simple:serviceBean>
>>            <bean 
>> class="com.zag.sessionservice.service.SessionServiceImpl">
>>            </bean>
>>        </simple:serviceBean>
>>    </simple:server>
>>
>> <bean id="sessionServiceDAO" 
>> class="com.zag.sessionservice.dao.hibernate.HibernateSessionServiceDAO">
>>    <property name="sessionFactory" ref="sessionFactorySS"/>
>> </bean>
>>
>> Mieke 
>
>
> Daniel Kulp wrote:
>>
>> A generic "Fault occurred while processing" message like that usually 
>> means there was an exception thrown on the server side someplace that 
>> didn't include a message in it.   The most common of those are 
>> NullPointerExceptions, but there definitely are others.     I would 
>> check the server side logs to see if anything is there.
>>
>> You MAY need to try with the latest snapshots.   The latest snapshots 
>> are fixed to dump full stacktraces for unchecked exceptions.   
>> Previously, you would need to enable FINE level logging to get them.
>>
>> Dan
>>
>>
>>
>> On May 30, 2008, at 4:23 PM, mieke wrote:
>>
>>>
>>> I have a former xfire service that I'm upgrading to cxf. I think I 
>>> have the
>>> service part down i.e., I have it deployed (Resin 3.1.6, Spring 
>>> 2.0.6) using
>>> the simple server/aegis binding set up and I see the WSDL when I 
>>> access the
>>> service URL. The problem I'm having appears to be with the client. 
>>> My client
>>> looks as follows:
>>>
>>> public class SessionServiceClientImpl implements MessageSourceAware,
>>> SessionService {
>>>    private SessionService sei = null;
>>>    ...
>>>    public SessionService getProxyService() {
>>>
>>>        String oldAddress = address;
>>>        address = messageSource.getMessage("sessionservice.endpoint", 
>>> null,
>>> Locale.US);
>>>
>>>        if (sei == null || !oldAddress.equals(address)) {
>>>            ClientProxyFactoryBean factory = new 
>>> ClientProxyFactoryBean();
>>>            factory.setDataBinding(new AegisDatabinding());
>>>            factory.setServiceClass(SessionService.class);
>>>            factory.setAddress(address);
>>>            sei = (SessionService) factory.create();
>>>        }
>>>        return sei;
>>>
>>>    }
>>> ...
>>>
>>> }
>>>
>>> When I attempt to access the service using this client via my unit 
>>> test I
>>> get the following error ...
>>>
>>> org.apache.cxf.binding.soap.SoapFault: Fault occurred while processing.
>>>     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:221) 
>>>
>>>     at
>>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96) 
>>>
>>>     at
>>> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:65) 
>>>
>>>     at
>>> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34) 
>>>
>>>     at
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) 
>>>
>>>     at 
>>> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
>>>     at
>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1988) 
>>>
>>>     at
>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1824) 
>>>
>>>     at 
>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>     at 
>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:583)
>>>     at
>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) 
>>>
>>>     at
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) 
>>>
>>>     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.frontend.ClientProxy.invoke(ClientProxy.java:68)
>>>     at $Proxy17.setValue(Unknown Source)
>>>     at
>>> com.zag.sessionservice.client.SessionServiceClientImpl.setValue(SessionServiceClientImpl.java:48) 
>>>
>>>     at
>>> com.zag.sessionservice.client.TestSessionService.testSessionService(TestSessionService.java:27) 
>>>
>>>     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 junit.framework.TestCase.runTest(TestCase.java:168)
>>>     at junit.framework.TestCase.runBare(TestCase.java:134)
>>>     at junit.framework.TestResult$1.protect(TestResult.java:110)
>>>     at junit.framework.TestResult.runProtected(TestResult.java:128)
>>>     at junit.framework.TestResult.run(TestResult.java:113)
>>>     at junit.framework.TestCase.run(TestCase.java:124)
>>>     at junit.framework.TestSuite.runTest(TestSuite.java:232)
>>>     at junit.framework.TestSuite.run(TestSuite.java:227)
>>>     at
>>> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81) 
>>>
>>>     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) 
>>>
>>>
>>> WSDL looks as follows ...
>>>
>>>    <wsdl:definitions name="SessionService"
>>> targetNamespace="http://common.sessionservice.zag.com/">
>>>
>>>        <wsdl:types>
>>>
>>>            <xsd:schema attributeFormDefault="unqualified"
>>> elementFormDefault="qualified"
>>>                targetNamespace="http://common.sessionservice.zag.com/">
>>>                <xsd:element name="cleanUp" type="tns:cleanUp"/>
>>>
>>>                <xsd:complexType name="cleanUp">
>>>                    <xsd:sequence/>
>>>                </xsd:complexType>
>>>                <xsd:element name="cleanUpResponse"
>>> type="tns:cleanUpResponse"/>
>>>
>>>                <xsd:complexType name="cleanUpResponse">
>>>
>>>                    <xsd:sequence>
>>>                        <xsd:element name="return" type="xsd:int"/>
>>>                    </xsd:sequence>
>>>                </xsd:complexType>
>>>                <xsd:element name="getValue" type="tns:getValue"/>
>>>
>>>                <xsd:complexType name="getValue">
>>>
>>>                    <xsd:sequence>
>>>                        <xsd:element minOccurs="0" name="arg0"
>>> type="xsd:string"/>
>>>                        <xsd:element minOccurs="0" name="arg1"
>>> type="xsd:string"/>
>>>                    </xsd:sequence>
>>>                </xsd:complexType>
>>>                <xsd:element name="getValueResponse"
>>> type="tns:getValueResponse"/>
>>>
>>>                <xsd:complexType name="getValueResponse">
>>>
>>>                    <xsd:sequence>
>>>                        <xsd:element minOccurs="0" name="return"
>>> type="xsd:string"/>
>>>                    </xsd:sequence>
>>>                </xsd:complexType>
>>>                <xsd:element name="setValue" type="tns:setValue"/>
>>>
>>>                <xsd:complexType name="setValue">
>>>
>>>                    <xsd:sequence>
>>>                        <xsd:element minOccurs="0" name="arg0"
>>> type="xsd:string"/>
>>>                        <xsd:element minOccurs="0" name="arg1"
>>> type="xsd:string"/>
>>>                        <xsd:element minOccurs="0" name="arg2"
>>> type="xsd:string"/>
>>>                    </xsd:sequence>
>>>                </xsd:complexType>
>>>                <xsd:element name="setValueResponse"
>>> type="tns:setValueResponse"/>
>>>
>>>                <xsd:complexType name="setValueResponse">
>>>                    <xsd:sequence/>
>>>                </xsd:complexType>
>>>                <xsd:element name="touchSession" 
>>> type="tns:touchSession"/>
>>>
>>>                <xsd:complexType name="touchSession">
>>>
>>>                    <xsd:sequence>
>>>                        <xsd:element minOccurs="0" name="arg0"
>>> type="xsd:string"/>
>>>                    </xsd:sequence>
>>>                </xsd:complexType>
>>>                <xsd:element name="touchSessionResponse"
>>> type="tns:touchSessionResponse"/>
>>>
>>>                <xsd:complexType name="touchSessionResponse">
>>>
>>>                    <xsd:sequence>
>>>                        <xsd:element name="return" type="xsd:boolean"/>
>>>                    </xsd:sequence>
>>>                </xsd:complexType>
>>>                <xsd:element name="expireSession" 
>>> type="tns:expireSession"/>
>>>
>>>                <xsd:complexType name="expireSession">
>>>
>>>                    <xsd:sequence>
>>>                        <xsd:element minOccurs="0" name="arg0"
>>> type="xsd:string"/>
>>>                    </xsd:sequence>
>>>                </xsd:complexType>
>>>                <xsd:element name="expireSessionResponse"
>>> type="tns:expireSessionResponse"/>
>>>
>>>                <xsd:complexType name="expireSessionResponse">
>>>                    <xsd:sequence/>
>>>                </xsd:complexType>
>>>            </xsd:schema>
>>>        </wsdl:types>
>>>
>>>        <wsdl:message name="expireSessionResponse">
>>>            <wsdl:part element="tns:expireSessionResponse"
>>> name="parameters">
>>>            </wsdl:part>
>>>        </wsdl:message>
>>>
>>>        <wsdl:message name="setValueResponse">
>>>            <wsdl:part element="tns:setValueResponse" name="parameters">
>>>            </wsdl:part>
>>>        </wsdl:message>
>>>
>>>        <wsdl:message name="cleanUp">
>>>            <wsdl:part element="tns:cleanUp" name="parameters">
>>>            </wsdl:part>
>>>        </wsdl:message>
>>>
>>>        <wsdl:message name="expireSession">
>>>            <wsdl:part element="tns:expireSession" name="parameters">
>>>            </wsdl:part>
>>>        </wsdl:message>
>>>
>>>        <wsdl:message name="getValue">
>>>            <wsdl:part element="tns:getValue" name="parameters">
>>>            </wsdl:part>
>>>        </wsdl:message>
>>>
>>>        <wsdl:message name="touchSessionResponse">
>>>            <wsdl:part element="tns:touchSessionResponse" 
>>> name="parameters">
>>>            </wsdl:part>
>>>        </wsdl:message>
>>>
>>>        <wsdl:message name="touchSession">
>>>            <wsdl:part element="tns:touchSession" name="parameters">
>>>            </wsdl:part>
>>>        </wsdl:message>
>>>
>>>        <wsdl:message name="cleanUpResponse">
>>>            <wsdl:part element="tns:cleanUpResponse" name="parameters">
>>>            </wsdl:part>
>>>        </wsdl:message>
>>>
>>>        <wsdl:message name="setValue">
>>>            <wsdl:part element="tns:setValue" name="parameters">
>>>            </wsdl:part>
>>>        </wsdl:message>
>>>
>>>        <wsdl:message name="getValueResponse">
>>>            <wsdl:part element="tns:getValueResponse" name="parameters">
>>>            </wsdl:part>
>>>        </wsdl:message>
>>>
>>>        <wsdl:portType name="SessionServicePortType">
>>>
>>>            <wsdl:operation name="cleanUp">
>>>                <wsdl:input message="tns:cleanUp" name="cleanUp">
>>>                </wsdl:input>
>>>                <wsdl:output message="tns:cleanUpResponse"
>>> name="cleanUpResponse">
>>>                </wsdl:output>
>>>            </wsdl:operation>
>>>
>>>            <wsdl:operation name="getValue">
>>>                <wsdl:input message="tns:getValue" name="getValue">
>>>                </wsdl:input>
>>>                <wsdl:output message="tns:getValueResponse"
>>> name="getValueResponse">
>>>                </wsdl:output>
>>>            </wsdl:operation>
>>>
>>>            <wsdl:operation name="setValue">
>>>                <wsdl:input message="tns:setValue" name="setValue">
>>>                </wsdl:input>
>>>                <wsdl:output message="tns:setValueResponse"
>>> name="setValueResponse">
>>>                </wsdl:output>
>>>            </wsdl:operation>
>>>
>>>            <wsdl:operation name="touchSession">
>>>                <wsdl:input message="tns:touchSession" 
>>> name="touchSession">
>>>                </wsdl:input>
>>>                <wsdl:output message="tns:touchSessionResponse"
>>> name="touchSessionResponse">
>>>                </wsdl:output>
>>>            </wsdl:operation>
>>>
>>>            <wsdl:operation name="expireSession">
>>>                <wsdl:input message="tns:expireSession"
>>> name="expireSession">
>>>                </wsdl:input>
>>>                <wsdl:output message="tns:expireSessionResponse"
>>> name="expireSessionResponse">
>>>                </wsdl:output>
>>>            </wsdl:operation>
>>>        </wsdl:portType>
>>>
>>>        <wsdl:binding name="SessionServiceSoapBinding"
>>> type="tns:SessionServicePortType">
>>>            <soap:binding style="document"
>>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>>
>>>            <wsdl:operation name="cleanUp">
>>>                <soap:operation soapAction="" style="document"/>
>>>
>>>                <wsdl:input name="cleanUp">
>>>                    <soap:body use="literal"/>
>>>                </wsdl:input>
>>>
>>>                <wsdl:output name="cleanUpResponse">
>>>                    <soap:body use="literal"/>
>>>                </wsdl:output>
>>>            </wsdl:operation>
>>>
>>>            <wsdl:operation name="getValue">
>>>                <soap:operation soapAction="" style="document"/>
>>>
>>>                <wsdl:input name="getValue">
>>>                    <soap:body use="literal"/>
>>>                </wsdl:input>
>>>
>>>                <wsdl:output name="getValueResponse">
>>>                    <soap:body use="literal"/>
>>>                </wsdl:output>
>>>            </wsdl:operation>
>>>
>>>            <wsdl:operation name="setValue">
>>>                <soap:operation soapAction="" style="document"/>
>>>
>>>                <wsdl:input name="setValue">
>>>                    <soap:body use="literal"/>
>>>                </wsdl:input>
>>>
>>>                <wsdl:output name="setValueResponse">
>>>                    <soap:body use="literal"/>
>>>                </wsdl:output>
>>>            </wsdl:operation>
>>>
>>>            <wsdl:operation name="touchSession">
>>>                <soap:operation soapAction="" style="document"/>
>>>
>>>                <wsdl:input name="touchSession">
>>>                    <soap:body use="literal"/>
>>>                </wsdl:input>
>>>
>>>                <wsdl:output name="touchSessionResponse">
>>>                    <soap:body use="literal"/>
>>>                </wsdl:output>
>>>            </wsdl:operation>
>>>
>>>            <wsdl:operation name="expireSession">
>>>                <soap:operation soapAction="" style="document"/>
>>>
>>>                <wsdl:input name="expireSession">
>>>                    <soap:body use="literal"/>
>>>                </wsdl:input>
>>>
>>>                <wsdl:output name="expireSessionResponse">
>>>                    <soap:body use="literal"/>
>>>                </wsdl:output>
>>>            </wsdl:operation>
>>>        </wsdl:binding>
>>>
>>>        <wsdl:service name="SessionService">
>>>
>>>            <wsdl:port binding="tns:SessionServiceSoapBinding"
>>> name="SessionServicePort">
>>>                <soap:address
>>> location="http://localhost:50080/SessionService/SessionService"/>
>>>            </wsdl:port>
>>>        </wsdl:service>
>>>    </wsdl:definitions>
>>>
>>> Appreciate any help.
>>>
>>> Thanks,
>>>
>>> Mieke
>>> --View this message in context: 
>>> http://www.nabble.com/org.apache.cxf.binding.soap.SoapFault%3A-Fault-occurred-while-processing-tp17567296p17567296.html 
>>>
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>>
>>
>>
>>
>

-- 
Mieke Mocke
Sr. Software Developer
Zag.com
800.584-5000
mmocke@zag.com



Re: org.apache.cxf.binding.soap.SoapFault: Fault occurred while processing

Posted by Mieke Mocke <mm...@zag.com>.
Sorry - my previous reply was on the wrong message - it's the end of the 
week! here it is again ...

Mieke Mocke wrote:
> Thanks for the pointer Dan. There is indeed a NPE being thrown as my 
> SessionServiceImpl class on the service side is supposed to have the 
> 'sessionServiceDAO' bean injected, so my config here below is missing 
> that ...
>
>    <simple:server id="SessionService" 
> serviceClass="com.zag.sessionservice.common.SessionService"
>        address="/SessionService">
>        <simple:dataBinding>
>            <bean 
> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
>        </simple:dataBinding>
>        <simple:serviceBean>
>            <bean 
> class="com.zag.sessionservice.service.SessionServiceImpl">
>            </bean>
>        </simple:serviceBean>
>    </simple:server>
>
> <bean id="sessionServiceDAO" 
> class="com.zag.sessionservice.dao.hibernate.HibernateSessionServiceDAO">
>    <property name="sessionFactory" ref="sessionFactorySS"/>
> </bean>
>
> Mieke 


Daniel Kulp wrote:
>
> A generic "Fault occurred while processing" message like that usually 
> means there was an exception thrown on the server side someplace that 
> didn't include a message in it.   The most common of those are 
> NullPointerExceptions, but there definitely are others.     I would 
> check the server side logs to see if anything is there.
>
> You MAY need to try with the latest snapshots.   The latest snapshots 
> are fixed to dump full stacktraces for unchecked exceptions.   
> Previously, you would need to enable FINE level logging to get them.
>
> Dan
>
>
>
> On May 30, 2008, at 4:23 PM, mieke wrote:
>
>>
>> I have a former xfire service that I'm upgrading to cxf. I think I 
>> have the
>> service part down i.e., I have it deployed (Resin 3.1.6, Spring 
>> 2.0.6) using
>> the simple server/aegis binding set up and I see the WSDL when I 
>> access the
>> service URL. The problem I'm having appears to be with the client. My 
>> client
>> looks as follows:
>>
>> public class SessionServiceClientImpl implements MessageSourceAware,
>> SessionService {
>>    private SessionService sei = null;
>>    ...
>>    public SessionService getProxyService() {
>>
>>        String oldAddress = address;
>>        address = messageSource.getMessage("sessionservice.endpoint", 
>> null,
>> Locale.US);
>>
>>        if (sei == null || !oldAddress.equals(address)) {
>>            ClientProxyFactoryBean factory = new 
>> ClientProxyFactoryBean();
>>            factory.setDataBinding(new AegisDatabinding());
>>            factory.setServiceClass(SessionService.class);
>>            factory.setAddress(address);
>>            sei = (SessionService) factory.create();
>>        }
>>        return sei;
>>
>>    }
>> ...
>>
>> }
>>
>> When I attempt to access the service using this client via my unit 
>> test I
>> get the following error ...
>>
>> org.apache.cxf.binding.soap.SoapFault: Fault occurred while processing.
>>     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:221) 
>>
>>     at
>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96) 
>>
>>     at
>> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:65) 
>>
>>     at
>> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34) 
>>
>>     at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) 
>>
>>     at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
>>     at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1988) 
>>
>>     at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1824) 
>>
>>     at 
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>     at 
>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:583)
>>     at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) 
>>
>>     at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) 
>>
>>     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.frontend.ClientProxy.invoke(ClientProxy.java:68)
>>     at $Proxy17.setValue(Unknown Source)
>>     at
>> com.zag.sessionservice.client.SessionServiceClientImpl.setValue(SessionServiceClientImpl.java:48) 
>>
>>     at
>> com.zag.sessionservice.client.TestSessionService.testSessionService(TestSessionService.java:27) 
>>
>>     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 junit.framework.TestCase.runTest(TestCase.java:168)
>>     at junit.framework.TestCase.runBare(TestCase.java:134)
>>     at junit.framework.TestResult$1.protect(TestResult.java:110)
>>     at junit.framework.TestResult.runProtected(TestResult.java:128)
>>     at junit.framework.TestResult.run(TestResult.java:113)
>>     at junit.framework.TestCase.run(TestCase.java:124)
>>     at junit.framework.TestSuite.runTest(TestSuite.java:232)
>>     at junit.framework.TestSuite.run(TestSuite.java:227)
>>     at
>> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81) 
>>
>>     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) 
>>
>>
>> WSDL looks as follows ...
>>
>>    <wsdl:definitions name="SessionService"
>> targetNamespace="http://common.sessionservice.zag.com/">
>>
>>        <wsdl:types>
>>
>>            <xsd:schema attributeFormDefault="unqualified"
>> elementFormDefault="qualified"
>>                targetNamespace="http://common.sessionservice.zag.com/">
>>                <xsd:element name="cleanUp" type="tns:cleanUp"/>
>>
>>                <xsd:complexType name="cleanUp">
>>                    <xsd:sequence/>
>>                </xsd:complexType>
>>                <xsd:element name="cleanUpResponse"
>> type="tns:cleanUpResponse"/>
>>
>>                <xsd:complexType name="cleanUpResponse">
>>
>>                    <xsd:sequence>
>>                        <xsd:element name="return" type="xsd:int"/>
>>                    </xsd:sequence>
>>                </xsd:complexType>
>>                <xsd:element name="getValue" type="tns:getValue"/>
>>
>>                <xsd:complexType name="getValue">
>>
>>                    <xsd:sequence>
>>                        <xsd:element minOccurs="0" name="arg0"
>> type="xsd:string"/>
>>                        <xsd:element minOccurs="0" name="arg1"
>> type="xsd:string"/>
>>                    </xsd:sequence>
>>                </xsd:complexType>
>>                <xsd:element name="getValueResponse"
>> type="tns:getValueResponse"/>
>>
>>                <xsd:complexType name="getValueResponse">
>>
>>                    <xsd:sequence>
>>                        <xsd:element minOccurs="0" name="return"
>> type="xsd:string"/>
>>                    </xsd:sequence>
>>                </xsd:complexType>
>>                <xsd:element name="setValue" type="tns:setValue"/>
>>
>>                <xsd:complexType name="setValue">
>>
>>                    <xsd:sequence>
>>                        <xsd:element minOccurs="0" name="arg0"
>> type="xsd:string"/>
>>                        <xsd:element minOccurs="0" name="arg1"
>> type="xsd:string"/>
>>                        <xsd:element minOccurs="0" name="arg2"
>> type="xsd:string"/>
>>                    </xsd:sequence>
>>                </xsd:complexType>
>>                <xsd:element name="setValueResponse"
>> type="tns:setValueResponse"/>
>>
>>                <xsd:complexType name="setValueResponse">
>>                    <xsd:sequence/>
>>                </xsd:complexType>
>>                <xsd:element name="touchSession" 
>> type="tns:touchSession"/>
>>
>>                <xsd:complexType name="touchSession">
>>
>>                    <xsd:sequence>
>>                        <xsd:element minOccurs="0" name="arg0"
>> type="xsd:string"/>
>>                    </xsd:sequence>
>>                </xsd:complexType>
>>                <xsd:element name="touchSessionResponse"
>> type="tns:touchSessionResponse"/>
>>
>>                <xsd:complexType name="touchSessionResponse">
>>
>>                    <xsd:sequence>
>>                        <xsd:element name="return" type="xsd:boolean"/>
>>                    </xsd:sequence>
>>                </xsd:complexType>
>>                <xsd:element name="expireSession" 
>> type="tns:expireSession"/>
>>
>>                <xsd:complexType name="expireSession">
>>
>>                    <xsd:sequence>
>>                        <xsd:element minOccurs="0" name="arg0"
>> type="xsd:string"/>
>>                    </xsd:sequence>
>>                </xsd:complexType>
>>                <xsd:element name="expireSessionResponse"
>> type="tns:expireSessionResponse"/>
>>
>>                <xsd:complexType name="expireSessionResponse">
>>                    <xsd:sequence/>
>>                </xsd:complexType>
>>            </xsd:schema>
>>        </wsdl:types>
>>
>>        <wsdl:message name="expireSessionResponse">
>>            <wsdl:part element="tns:expireSessionResponse"
>> name="parameters">
>>            </wsdl:part>
>>        </wsdl:message>
>>
>>        <wsdl:message name="setValueResponse">
>>            <wsdl:part element="tns:setValueResponse" name="parameters">
>>            </wsdl:part>
>>        </wsdl:message>
>>
>>        <wsdl:message name="cleanUp">
>>            <wsdl:part element="tns:cleanUp" name="parameters">
>>            </wsdl:part>
>>        </wsdl:message>
>>
>>        <wsdl:message name="expireSession">
>>            <wsdl:part element="tns:expireSession" name="parameters">
>>            </wsdl:part>
>>        </wsdl:message>
>>
>>        <wsdl:message name="getValue">
>>            <wsdl:part element="tns:getValue" name="parameters">
>>            </wsdl:part>
>>        </wsdl:message>
>>
>>        <wsdl:message name="touchSessionResponse">
>>            <wsdl:part element="tns:touchSessionResponse" 
>> name="parameters">
>>            </wsdl:part>
>>        </wsdl:message>
>>
>>        <wsdl:message name="touchSession">
>>            <wsdl:part element="tns:touchSession" name="parameters">
>>            </wsdl:part>
>>        </wsdl:message>
>>
>>        <wsdl:message name="cleanUpResponse">
>>            <wsdl:part element="tns:cleanUpResponse" name="parameters">
>>            </wsdl:part>
>>        </wsdl:message>
>>
>>        <wsdl:message name="setValue">
>>            <wsdl:part element="tns:setValue" name="parameters">
>>            </wsdl:part>
>>        </wsdl:message>
>>
>>        <wsdl:message name="getValueResponse">
>>            <wsdl:part element="tns:getValueResponse" name="parameters">
>>            </wsdl:part>
>>        </wsdl:message>
>>
>>        <wsdl:portType name="SessionServicePortType">
>>
>>            <wsdl:operation name="cleanUp">
>>                <wsdl:input message="tns:cleanUp" name="cleanUp">
>>                </wsdl:input>
>>                <wsdl:output message="tns:cleanUpResponse"
>> name="cleanUpResponse">
>>                </wsdl:output>
>>            </wsdl:operation>
>>
>>            <wsdl:operation name="getValue">
>>                <wsdl:input message="tns:getValue" name="getValue">
>>                </wsdl:input>
>>                <wsdl:output message="tns:getValueResponse"
>> name="getValueResponse">
>>                </wsdl:output>
>>            </wsdl:operation>
>>
>>            <wsdl:operation name="setValue">
>>                <wsdl:input message="tns:setValue" name="setValue">
>>                </wsdl:input>
>>                <wsdl:output message="tns:setValueResponse"
>> name="setValueResponse">
>>                </wsdl:output>
>>            </wsdl:operation>
>>
>>            <wsdl:operation name="touchSession">
>>                <wsdl:input message="tns:touchSession" 
>> name="touchSession">
>>                </wsdl:input>
>>                <wsdl:output message="tns:touchSessionResponse"
>> name="touchSessionResponse">
>>                </wsdl:output>
>>            </wsdl:operation>
>>
>>            <wsdl:operation name="expireSession">
>>                <wsdl:input message="tns:expireSession"
>> name="expireSession">
>>                </wsdl:input>
>>                <wsdl:output message="tns:expireSessionResponse"
>> name="expireSessionResponse">
>>                </wsdl:output>
>>            </wsdl:operation>
>>        </wsdl:portType>
>>
>>        <wsdl:binding name="SessionServiceSoapBinding"
>> type="tns:SessionServicePortType">
>>            <soap:binding style="document"
>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>
>>            <wsdl:operation name="cleanUp">
>>                <soap:operation soapAction="" style="document"/>
>>
>>                <wsdl:input name="cleanUp">
>>                    <soap:body use="literal"/>
>>                </wsdl:input>
>>
>>                <wsdl:output name="cleanUpResponse">
>>                    <soap:body use="literal"/>
>>                </wsdl:output>
>>            </wsdl:operation>
>>
>>            <wsdl:operation name="getValue">
>>                <soap:operation soapAction="" style="document"/>
>>
>>                <wsdl:input name="getValue">
>>                    <soap:body use="literal"/>
>>                </wsdl:input>
>>
>>                <wsdl:output name="getValueResponse">
>>                    <soap:body use="literal"/>
>>                </wsdl:output>
>>            </wsdl:operation>
>>
>>            <wsdl:operation name="setValue">
>>                <soap:operation soapAction="" style="document"/>
>>
>>                <wsdl:input name="setValue">
>>                    <soap:body use="literal"/>
>>                </wsdl:input>
>>
>>                <wsdl:output name="setValueResponse">
>>                    <soap:body use="literal"/>
>>                </wsdl:output>
>>            </wsdl:operation>
>>
>>            <wsdl:operation name="touchSession">
>>                <soap:operation soapAction="" style="document"/>
>>
>>                <wsdl:input name="touchSession">
>>                    <soap:body use="literal"/>
>>                </wsdl:input>
>>
>>                <wsdl:output name="touchSessionResponse">
>>                    <soap:body use="literal"/>
>>                </wsdl:output>
>>            </wsdl:operation>
>>
>>            <wsdl:operation name="expireSession">
>>                <soap:operation soapAction="" style="document"/>
>>
>>                <wsdl:input name="expireSession">
>>                    <soap:body use="literal"/>
>>                </wsdl:input>
>>
>>                <wsdl:output name="expireSessionResponse">
>>                    <soap:body use="literal"/>
>>                </wsdl:output>
>>            </wsdl:operation>
>>        </wsdl:binding>
>>
>>        <wsdl:service name="SessionService">
>>
>>            <wsdl:port binding="tns:SessionServiceSoapBinding"
>> name="SessionServicePort">
>>                <soap:address
>> location="http://localhost:50080/SessionService/SessionService"/>
>>            </wsdl:port>
>>        </wsdl:service>
>>    </wsdl:definitions>
>>
>> Appreciate any help.
>>
>> Thanks,
>>
>> Mieke
>> --View this message in context: 
>> http://www.nabble.com/org.apache.cxf.binding.soap.SoapFault%3A-Fault-occurred-while-processing-tp17567296p17567296.html 
>>
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>

-- 
Mieke Mocke
Sr. Software Developer
Zag.com
800.584-5000
mmocke@zag.com



Re: org.apache.cxf.binding.soap.SoapFault: Fault occurred while processing

Posted by Daniel Kulp <dk...@apache.org>.
A generic "Fault occurred while processing" message like that usually  
means there was an exception thrown on the server side someplace that  
didn't include a message in it.   The most common of those are  
NullPointerExceptions, but there definitely are others.     I would  
check the server side logs to see if anything is there.

You MAY need to try with the latest snapshots.   The latest snapshots  
are fixed to dump full stacktraces for unchecked exceptions.    
Previously, you would need to enable FINE level logging to get them.

Dan



On May 30, 2008, at 4:23 PM, mieke wrote:

>
> I have a former xfire service that I'm upgrading to cxf. I think I  
> have the
> service part down i.e., I have it deployed (Resin 3.1.6, Spring  
> 2.0.6) using
> the simple server/aegis binding set up and I see the WSDL when I  
> access the
> service URL. The problem I'm having appears to be with the client.  
> My client
> looks as follows:
>
> public class SessionServiceClientImpl implements MessageSourceAware,
> SessionService {
>    private SessionService sei = null;
>    ...
>    public SessionService getProxyService() {
>
>        String oldAddress = address;
>        address = messageSource.getMessage("sessionservice.endpoint",  
> null,
> Locale.US);
>
>        if (sei == null || !oldAddress.equals(address)) {
>            ClientProxyFactoryBean factory = new  
> ClientProxyFactoryBean();
>            factory.setDataBinding(new AegisDatabinding());
>            factory.setServiceClass(SessionService.class);
>            factory.setAddress(address);
>            sei = (SessionService) factory.create();
>        }
>        return sei;
>
>    }
> ...
>
> }
>
> When I attempt to access the service using this client via my unit  
> test I
> get the following error ...
>
> org.apache.cxf.binding.soap.SoapFault: Fault occurred while  
> processing.
> 	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: 
> 221)
> 	at
> org 
> .apache 
> .cxf 
> .interceptor 
> .AbstractFaultChainInitiatorObserver 
> .onMessage(AbstractFaultChainInitiatorObserver.java:96)
> 	at
> org 
> .apache 
> .cxf 
> .binding 
> .soap 
> .interceptor 
> .CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:65)
> 	at
> org 
> .apache 
> .cxf 
> .binding 
> .soap 
> .interceptor 
> .CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
> 	at
> org 
> .apache 
> .cxf 
> .phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java: 
> 221)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
> 	at
> org.apache.cxf.transport.http.HTTPConduit 
> $WrappedOutputStream.handleResponse(HTTPConduit.java:1988)
> 	at
> org.apache.cxf.transport.http.HTTPConduit 
> $WrappedOutputStream.close(HTTPConduit.java:1824)
> 	at  
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java: 
> 66)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java: 
> 583)
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor 
> $ 
> MessageSenderEndingInterceptor 
> .handleMessage(MessageSenderInterceptor.java:62)
> 	at
> org 
> .apache 
> .cxf 
> .phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java: 
> 221)
> 	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.frontend.ClientProxy.invoke(ClientProxy.java:68)
> 	at $Proxy17.setValue(Unknown Source)
> 	at
> com 
> .zag 
> .sessionservice 
> .client 
> .SessionServiceClientImpl.setValue(SessionServiceClientImpl.java:48)
> 	at
> com 
> .zag 
> .sessionservice 
> .client 
> .TestSessionService.testSessionService(TestSessionService.java:27)
> 	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 junit.framework.TestCase.runTest(TestCase.java:168)
> 	at junit.framework.TestCase.runBare(TestCase.java:134)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:124)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:232)
> 	at junit.framework.TestSuite.run(TestSuite.java:227)
> 	at
> org 
> .junit 
> .internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
> 	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)
>
> WSDL looks as follows ...
>
>    <wsdl:definitions name="SessionService"
> targetNamespace="http://common.sessionservice.zag.com/">
>
>        <wsdl:types>
>
>            <xsd:schema attributeFormDefault="unqualified"
> elementFormDefault="qualified"
>                targetNamespace="http:// 
> common.sessionservice.zag.com/">
>                <xsd:element name="cleanUp" type="tns:cleanUp"/>
>
>                <xsd:complexType name="cleanUp">
>                    <xsd:sequence/>
>                </xsd:complexType>
>                <xsd:element name="cleanUpResponse"
> type="tns:cleanUpResponse"/>
>
>                <xsd:complexType name="cleanUpResponse">
>
>                    <xsd:sequence>
>                        <xsd:element name="return" type="xsd:int"/>
>                    </xsd:sequence>
>                </xsd:complexType>
>                <xsd:element name="getValue" type="tns:getValue"/>
>
>                <xsd:complexType name="getValue">
>
>                    <xsd:sequence>
>                        <xsd:element minOccurs="0" name="arg0"
> type="xsd:string"/>
>                        <xsd:element minOccurs="0" name="arg1"
> type="xsd:string"/>
>                    </xsd:sequence>
>                </xsd:complexType>
>                <xsd:element name="getValueResponse"
> type="tns:getValueResponse"/>
>
>                <xsd:complexType name="getValueResponse">
>
>                    <xsd:sequence>
>                        <xsd:element minOccurs="0" name="return"
> type="xsd:string"/>
>                    </xsd:sequence>
>                </xsd:complexType>
>                <xsd:element name="setValue" type="tns:setValue"/>
>
>                <xsd:complexType name="setValue">
>
>                    <xsd:sequence>
>                        <xsd:element minOccurs="0" name="arg0"
> type="xsd:string"/>
>                        <xsd:element minOccurs="0" name="arg1"
> type="xsd:string"/>
>                        <xsd:element minOccurs="0" name="arg2"
> type="xsd:string"/>
>                    </xsd:sequence>
>                </xsd:complexType>
>                <xsd:element name="setValueResponse"
> type="tns:setValueResponse"/>
>
>                <xsd:complexType name="setValueResponse">
>                    <xsd:sequence/>
>                </xsd:complexType>
>                <xsd:element name="touchSession"  
> type="tns:touchSession"/>
>
>                <xsd:complexType name="touchSession">
>
>                    <xsd:sequence>
>                        <xsd:element minOccurs="0" name="arg0"
> type="xsd:string"/>
>                    </xsd:sequence>
>                </xsd:complexType>
>                <xsd:element name="touchSessionResponse"
> type="tns:touchSessionResponse"/>
>
>                <xsd:complexType name="touchSessionResponse">
>
>                    <xsd:sequence>
>                        <xsd:element name="return" type="xsd:boolean"/>
>                    </xsd:sequence>
>                </xsd:complexType>
>                <xsd:element name="expireSession"  
> type="tns:expireSession"/>
>
>                <xsd:complexType name="expireSession">
>
>                    <xsd:sequence>
>                        <xsd:element minOccurs="0" name="arg0"
> type="xsd:string"/>
>                    </xsd:sequence>
>                </xsd:complexType>
>                <xsd:element name="expireSessionResponse"
> type="tns:expireSessionResponse"/>
>
>                <xsd:complexType name="expireSessionResponse">
>                    <xsd:sequence/>
>                </xsd:complexType>
>            </xsd:schema>
>        </wsdl:types>
>
>        <wsdl:message name="expireSessionResponse">
>            <wsdl:part element="tns:expireSessionResponse"
> name="parameters">
>            </wsdl:part>
>        </wsdl:message>
>
>        <wsdl:message name="setValueResponse">
>            <wsdl:part element="tns:setValueResponse"  
> name="parameters">
>            </wsdl:part>
>        </wsdl:message>
>
>        <wsdl:message name="cleanUp">
>            <wsdl:part element="tns:cleanUp" name="parameters">
>            </wsdl:part>
>        </wsdl:message>
>
>        <wsdl:message name="expireSession">
>            <wsdl:part element="tns:expireSession" name="parameters">
>            </wsdl:part>
>        </wsdl:message>
>
>        <wsdl:message name="getValue">
>            <wsdl:part element="tns:getValue" name="parameters">
>            </wsdl:part>
>        </wsdl:message>
>
>        <wsdl:message name="touchSessionResponse">
>            <wsdl:part element="tns:touchSessionResponse"  
> name="parameters">
>            </wsdl:part>
>        </wsdl:message>
>
>        <wsdl:message name="touchSession">
>            <wsdl:part element="tns:touchSession" name="parameters">
>            </wsdl:part>
>        </wsdl:message>
>
>        <wsdl:message name="cleanUpResponse">
>            <wsdl:part element="tns:cleanUpResponse" name="parameters">
>            </wsdl:part>
>        </wsdl:message>
>
>        <wsdl:message name="setValue">
>            <wsdl:part element="tns:setValue" name="parameters">
>            </wsdl:part>
>        </wsdl:message>
>
>        <wsdl:message name="getValueResponse">
>            <wsdl:part element="tns:getValueResponse"  
> name="parameters">
>            </wsdl:part>
>        </wsdl:message>
>
>        <wsdl:portType name="SessionServicePortType">
>
>            <wsdl:operation name="cleanUp">
>                <wsdl:input message="tns:cleanUp" name="cleanUp">
>                </wsdl:input>
>                <wsdl:output message="tns:cleanUpResponse"
> name="cleanUpResponse">
>                </wsdl:output>
>            </wsdl:operation>
>
>            <wsdl:operation name="getValue">
>                <wsdl:input message="tns:getValue" name="getValue">
>                </wsdl:input>
>                <wsdl:output message="tns:getValueResponse"
> name="getValueResponse">
>                </wsdl:output>
>            </wsdl:operation>
>
>            <wsdl:operation name="setValue">
>                <wsdl:input message="tns:setValue" name="setValue">
>                </wsdl:input>
>                <wsdl:output message="tns:setValueResponse"
> name="setValueResponse">
>                </wsdl:output>
>            </wsdl:operation>
>
>            <wsdl:operation name="touchSession">
>                <wsdl:input message="tns:touchSession"  
> name="touchSession">
>                </wsdl:input>
>                <wsdl:output message="tns:touchSessionResponse"
> name="touchSessionResponse">
>                </wsdl:output>
>            </wsdl:operation>
>
>            <wsdl:operation name="expireSession">
>                <wsdl:input message="tns:expireSession"
> name="expireSession">
>                </wsdl:input>
>                <wsdl:output message="tns:expireSessionResponse"
> name="expireSessionResponse">
>                </wsdl:output>
>            </wsdl:operation>
>        </wsdl:portType>
>
>        <wsdl:binding name="SessionServiceSoapBinding"
> type="tns:SessionServicePortType">
>            <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>
>            <wsdl:operation name="cleanUp">
>                <soap:operation soapAction="" style="document"/>
>
>                <wsdl:input name="cleanUp">
>                    <soap:body use="literal"/>
>                </wsdl:input>
>
>                <wsdl:output name="cleanUpResponse">
>                    <soap:body use="literal"/>
>                </wsdl:output>
>            </wsdl:operation>
>
>            <wsdl:operation name="getValue">
>                <soap:operation soapAction="" style="document"/>
>
>                <wsdl:input name="getValue">
>                    <soap:body use="literal"/>
>                </wsdl:input>
>
>                <wsdl:output name="getValueResponse">
>                    <soap:body use="literal"/>
>                </wsdl:output>
>            </wsdl:operation>
>
>            <wsdl:operation name="setValue">
>                <soap:operation soapAction="" style="document"/>
>
>                <wsdl:input name="setValue">
>                    <soap:body use="literal"/>
>                </wsdl:input>
>
>                <wsdl:output name="setValueResponse">
>                    <soap:body use="literal"/>
>                </wsdl:output>
>            </wsdl:operation>
>
>            <wsdl:operation name="touchSession">
>                <soap:operation soapAction="" style="document"/>
>
>                <wsdl:input name="touchSession">
>                    <soap:body use="literal"/>
>                </wsdl:input>
>
>                <wsdl:output name="touchSessionResponse">
>                    <soap:body use="literal"/>
>                </wsdl:output>
>            </wsdl:operation>
>
>            <wsdl:operation name="expireSession">
>                <soap:operation soapAction="" style="document"/>
>
>                <wsdl:input name="expireSession">
>                    <soap:body use="literal"/>
>                </wsdl:input>
>
>                <wsdl:output name="expireSessionResponse">
>                    <soap:body use="literal"/>
>                </wsdl:output>
>            </wsdl:operation>
>        </wsdl:binding>
>
>        <wsdl:service name="SessionService">
>
>            <wsdl:port binding="tns:SessionServiceSoapBinding"
> name="SessionServicePort">
>                <soap:address
> location="http://localhost:50080/SessionService/SessionService"/>
>            </wsdl:port>
>        </wsdl:service>
>    </wsdl:definitions>
>
> Appreciate any help.
>
> Thanks,
>
> Mieke
> -- 
> View this message in context: http://www.nabble.com/org.apache.cxf.binding.soap.SoapFault%3A-Fault-occurred-while-processing-tp17567296p17567296.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

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