Just to let you know. I can reproduce this issue. I have a fix that I'm testing now and hope to have committed to SVN shortly.
Dan On Friday 31 August 2007, exgorth wrote: > 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> > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>exec-maven-plugin</artifactId> > <executions> > <execution> > <goals> > <goal>java</goal> > </goals> > </execution> > </executions> > <configuration> > > <includeProjectDependencies>true</includeProjectDependencies> > > <mainClass>ru.invito.ws.client.bronni.App</mainClass> </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.initializeParamet >er(JaxWsServiceFactoryBean.java:391) at > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeClassIn >fo(JaxWsServiceFactoryBean.java:358) at > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOpe >ration(JaxWsServiceFactoryBean.java:173) at > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initialize >WSDLOperations(ReflectionServiceFactoryBean.java:319) at > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOpe >rations(JaxWsServiceFactoryBean.java:182) at > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServi >ceFromWSDL(ReflectionServiceFactoryBean.java:211) at > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initialize >ServiceModel(ReflectionServiceFactoryBean.java:262) at > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Ref >lectionServiceFactoryBean.java:143) at > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServi >ceFactoryBean.java:89) at > org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(Abstrac >tEndpointFactory.java:82) at > org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.jav >a:50) at > org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFacto >ryBean.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, and then > mvn compile exec:java. -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog
