Kyle,

From the stack trace, it's getting a fault back from the server.   Thus, 
the question is: why is the server sending back a fault?

Two things that would help figure that out:

1) If you can use wireshark or tcpdump or something to get the wirelevel 
messages, that can sometimes help.   Alternatively, look at:
http://cwiki.apache.org/CXF20DOC/debugging.html
to turn on various logging things.

2) Check the server side logs to see if there is anything like a stack 
trace or similar there.   That could potentially be the biggest help.

Dan



On Wednesday 13 February 2008, Kyle.Bober wrote:
> I have a Simple WSDL from which I generate the client and server code
> using the applicable Maven2 plugins. My WSDL is as follows:
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <wsdl:definitions name="UserService"
>       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>       xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>       xmlns:user-service="http://ws.user.service.websend.agfa.com";
>       xmlns:user-model="http://model.ws.user.service.websend.agfa.com";
>       targetNamespace="http://ws.user.service.websend.agfa.com";>
>
>   <wsdl:types>
>     <xsd:schema
>       targetNamespace="http://model.ws.user.service.websend.agfa.com";
>       xmlns:user-model="http://model.ws.user.service.websend.agfa.com";>
>
>       <xsd:element name="logonRequest"
> type="user-model:UserSO"></xsd:element>
>       <xsd:element name="logonResponse"
> type="user-model:UserSO"></xsd:element>
>
>       <xsd:complexType name="UserSO">
>               <xsd:sequence>
>                       <xsd:element name="username" type="xsd:string"/>
>                       <xsd:element name="password" type="xsd:string"/>
>                       <xsd:element name="validated" type="xsd:boolean"/>
>               </xsd:sequence>
>       </xsd:complexType>
>
>     </xsd:schema>
>   </wsdl:types>
>
>   <wsdl:message name="logonRequest">
>       <wsdl:part element="user-model:logonRequest" name="in"/>
>   </wsdl:message>
>   <wsdl:message name="logonResponse">
>       <wsdl:part element="user-model:logonResponse" name="out"/>
>   </wsdl:message>
>
>   <wsdl:portType name="UserServicePortType">
>     <wsdl:operation name="logon">
>       <wsdl:input name="logonRequest"
> message="user-service:logonRequest"/> <wsdl:output name="logonRespons"
> message="user-service:logonResponse"/> </wsdl:operation>
>   </wsdl:portType>
>
>   <wsdl:binding name="UserServiceBinding"
> type="user-service:UserServicePortType">
>     <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>
>     <wsdl:operation name="logon">
>       <soap:operation soapAction="" style="document"/>
>       <wsdl:input>
>         <soap:body use="literal"/>
>       </wsdl:input>
>       <wsdl:output>
>         <soap:body use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>
>   </wsdl:binding>
>
>   <wsdl:service name="UserService">
>     <wsdl:port name="UserService"
> binding="user-service:UserServiceBinding"> <soap:address
> location="http://localhost:8080/UserService"/> </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
>
> Whenever I run the generated Client code I receive the following
> error:
>
> Feb 13, 2008 5:00:29 PM
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromWSDL
> INFO: Creating Service
> {http://ws.user.service.websend.agfa.com}UserService from WSDL:
> http://localhost:8080/com.agfa.websend.server.ws.user/services/UserSer
>vice?wsdl Invoking logon...
> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Fault
> occurred while processing.
>       at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175
>) at $Proxy25.logon(Unknown Source)
>       at
> com.agfa.websend.service.user.ws.UserServicePortType_UserService_Clien
>t.main(UserServicePortType_UserService_Client.java:44) Caused by:
> org.apache.cxf.binding.soap.SoapFault: Fault occurred while
> processing.
>       at
> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handl
>eMessage(Soap11FaultInInterceptor.java:70) at
> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handl
>eMessage(Soap11FaultInInterceptor.java:35) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rChain.java:208) at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessa
>ge(AbstractFaultChainInitiatorObserver.java:96) at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleM
>essage(ReadHeadersInterceptor.java:183) at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleM
>essage(ReadHeadersInterceptor.java:56) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rChain.java:208) at
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRe
>sponse(HTTPConduit.java:1955) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HT
>TPConduit.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$MessageSenderEndin
>gInterceptor.handleMessage(MessageSenderInterceptor.java:62) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rChain.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
>) ... 2 more
>
> Is this a bug with CXF or is my WSDL bad??? I also run the validate
> option for the wsdl2java command I have included my Maven2 POM as
> well:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0";
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd";>
>
>       <modelVersion>4.0.0</modelVersion>
>       <groupId>com.agfa.websend.server.ws</groupId>
>       <artifactId>user</artifactId>
>       <version>1.0.0</version>
>       <packaging>war</packaging>
>
>       <repositories>
>               <repository>
>                       <id>apache-snapshots</id>
>                       <name>Apache SNAPSHOT Repository</name>
>                       
> <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
>                       <snapshots>
>                               <enabled>true</enabled>
>                       </snapshots>
>               </repository>
>               <repository>
>                       <id>apache-incubating</id>
>                       <name>Apache Incubating Repository</name>
>                       
> <url>http://people.apache.org/repo/m2-incubating-repository/</url>
>               </repository>
>         <!-- for jaxb-impl -->
>         <repository>
>             <id>java.net</id>
>             <url>http://download.java.net/maven/1/</url>
>             <layout>legacy</layout>
>         </repository>
>       </repositories>
>
>       <pluginRepositories>
>               <pluginRepository>
>                       <id>apache-plugin-snapshots</id>
>                       <name>Apache Maven Plugin Snapshots</name>
>                       
> <url>http://people.apache.org/repo/m2-snapshot-repository</url>
>                       <releases>
>                               <enabled>false</enabled>
>                       </releases>
>                       <snapshots>
>                               <enabled>true</enabled>
>                       </snapshots>
>               </pluginRepository>
>         <pluginRepository>
>                <id>apache-plugin-incubating</id>
>                <name>Apache Plugin Incubating Repository</name>
>
> <url>http://people.apache.org/repo/m2-incubating-repository/</url>
>               </pluginRepository>
>       </pluginRepositories>
>
>       <properties>
>               <spring.version>2.5</spring.version>
>               <cxf.version>2.0.4-incubator</cxf.version>
>       </properties>
>       <dependencies>
>               <dependency>
>                       <groupId>org.springframework</groupId>
>                       <artifactId>spring-core</artifactId>
>                       <version>${spring.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.springframework</groupId>
>                       <artifactId>spring-beans</artifactId>
>                       <version>${spring.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.springframework</groupId>
>                       <artifactId>spring-context</artifactId>
>                       <version>${spring.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.springframework</groupId>
>                       <artifactId>spring-web</artifactId>
>                       <version>${spring.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>log4j</groupId>
>                       <artifactId>log4j</artifactId>
>                       <version>1.2.14</version>
>                       <scope>compile</scope>
>               </dependency>
>
>               <!-- Depending on your requirements you may need more or less
> modules from cxf -->
>               <dependency>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-rt-core</artifactId>
>                       <version>${cxf.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-rt-frontend-simple</artifactId>
>                       <version>${cxf.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-rt-frontend-jaxws</artifactId>
>                       <version>${cxf.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-rt-databinding-aegis</artifactId>
>                       <version>${cxf.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-rt-transports-local</artifactId>
>                       <version>${cxf.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-rt-transports-http</artifactId>
>                       <version>${cxf.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-rt-transports-http-jetty</artifactId>
>                       <version>${cxf.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-rt-transports-jms</artifactId>
>                       <version>${cxf.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-rt-management</artifactId>
>                       <version>${cxf.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-common-utilities</artifactId>
>                       <version>${cxf.version}</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.mortbay.jetty</groupId>
>                       <artifactId>jetty</artifactId>
>                       <version>6.1.5</version>
>                       <scope>compile</scope>
>               </dependency>
>               <dependency>
>                       <groupId>junit</groupId>
>                       <artifactId>junit</artifactId>
>                       <version>4.4</version>
>                       <scope>test</scope>
>               </dependency>
>       </dependencies>
>
>       <build>
>           <finalName>user</finalName>
>               <plugins>
>                       <plugin>
>                               <groupId>org.apache.cxf</groupId>
>                               <artifactId>cxf-codegen-plugin</artifactId>
>                               <version>2.0.4-incubator</version>
>                               <executions>
>                                       <execution>
>                                               <id>generate-sources</id>
>                                               <phase>generate-sources</phase>
>                                               <configuration>
>                                                       
> <sourceRoot>${basedir}/src/main/java</sourceRoot>
>                                                       <wsdlOptions>
>                                                               <wsdlOption>
>                                                                       
> <wsdl>${basedir}/src/main/wsdl/UserService.wsdl</wsdl>
>                                                                       
> <extraargs>
>                                                                               
> <extraarg>-validate</extraarg>
>                                                                       
> <extraarg>-all</extraarg>
>                                                                       
> </extraargs>
>                                                               </wsdlOption>
>                                                       </wsdlOptions>
>                                               </configuration>
>                                               <goals>
>                                                       <goal>wsdl2java</goal>
>                                               </goals>
>                                       </execution>
>                               </executions>
>                       </plugin>
>
>                       <plugin>
>                               <artifactId>maven-compiler-plugin</artifactId>
>                               <configuration>
>                                       <source>1.6</source>
>                                       <target>1.6</target>
>                               </configuration>
>                       </plugin>
>               </plugins>
>       </build>
> </project>
>
> Any help here would be much appreciated!!!
>
> Regards,
> Kyle



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to