Hello, I've generated the client for the 3rd party service: http://touralliance.bronni.ru/Loader.asmx?wsdl
with the following: <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>ru.invito.ws.client.bronni</groupId> <artifactId>spyglass-ws-client-bronni</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>spyglass-ws-client-bronni</name> <url>http://maven.apache.org</url> <build> <plugins> <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>2.1-incubator-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-bindings-soap</artifactId> <version>2.1-incubator-SNAPSHOT</version> </dependency> </dependencies> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <wsdlOptions> <wsdlOption> <wsdl>http://touralliance.bronni.ru/Loader.asmx?wsdl</wsdl> <extraargs> <extraarg>-exsh</extraarg> <extraarg>true</extraarg> <extraarg>-verbose</extraarg> <extraarg>-all</extraarg> </extraargs> </wsdlOption> </wsdlOptions> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>2.1-incubator-SNAPSHOT</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>2.1-incubator-SNAPSHOT</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.1</version> <scope>test</scope> </dependency> </dependencies> <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> </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> </pluginRepositories> </project> And when i invoke the generated with the code: Loader ss = new Loader(); LoaderSoap client = ss.getLoaderSoap(); System.out.println("Invoking login..."); String login = ""; String password = ""; Holder<UserSessionId> userSessionId = new Holder<UserSessionId>(); client.login(login, password, userSessionId); System.out.println("login._login_userSessionId=" + userSessionId.value); i'm getting error: INFO: Creating Service {http://tourml.ru/service/2006-03-14}Loader from WSDL: http://touralliance.bronni.ru/Loader.asmx?wsdl Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Could not find a message part matching name {http://tourml.ru/serviceSecurity/2006-03-14/}UserSessionId. Possible values are [{http://tourml.ru/service/2006-03-14}UserSessionId]. at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:243) at javax.xml.ws.Service.getPort(Service.java:94) at ru.tourml.service._2006_03_14.Loader.getLoaderSoap(Loader.java:51) at ru.invito.ws.client.bronni.App.main(App.java:23) Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Could not find a message part matching name {http://tourml.ru/serviceSecurity/2006-03-14/}UserSessionId. Possible values are [{http://tourml.ru/service/2006-03-14}UserSessionId]. at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeParameter(JaxWsServiceFactoryBean.java:391) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeClassInfo(JaxWsServiceFactoryBean.java:358) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation(JaxWsServiceFactoryBean.java:173) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOperations(ReflectionServiceFactoryBean.java:319) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:182) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:211) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:262) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:143) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:89) at org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:82) at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:50) at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:89) at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:336) at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:241) ... 3 more the "UserSessionId" is a complextype that should be in header. Please, could anyone say what's wrong? To reproduce the error you'll only need to paste the xml into the pom.xml, then compile/run or eclipse:eclipse and run. -- View this message in context: http://www.nabble.com/CXF-Client-not-working-tf4359854.html#a12425416 Sent from the cxf-user mailing list archive at Nabble.com.
