cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sertic Mirko, Bedag" <Mirko.Ser...@bedag.ch>
Subject AW: AW: Problem with CXF wsdl2java
Date Mon, 24 Aug 2009 16:11:53 GMT
Hi

We are using Maven too :-)

Use the following in your pom:

			<plugin>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-codegen-plugin</artifactId>
				<version>${cxf.version}</version>
				<executions>
					<execution>
						<id>generate-sources</id>
						<phase>generate-sources</phase>
						<configuration>
							<wsdlOptions>
								<wsdlOption>
									<wsdl>service/EnumService.wsdl</wsdl>
									<bindingFiles>
										<bindingFile>bindings.xml</bindingFile>
      								</bindingFiles>
									<extraargs>
										<extraarg>-validate</extraarg>
        								<extraarg>-client</extraarg>
        								<extraarg>-verbose</extraarg>
        								<extraarg>-xjc-verbose</extraarg>
      								</extraargs>
								</wsdlOption>
							</wsdlOptions>
							<verbose/>
						</configuration>
						<goals>
							<goal>wsdl2java</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

And the following in the bindings.xml

<jaxb:bindings version="2.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
	xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<jaxb:globalBindings mapSimpleTypeDef="true">
		<xjc:generateElementProperty>false</xjc:generateElementProperty>
	</jaxb:globalBindings>
</jaxb:bindings>

Regards
Mirko

-----Urspr√ľngliche Nachricht-----
Von: manoj.java [mailto:m.manojsingh@gmail.com] 
Gesendet: Montag, 24. August 2009 13:43
An: users@cxf.apache.org
Betreff: Re: AW: Problem with CXF wsdl2java


Hi,
I am using Maven to perform this task.
Could you please let me know how to use binding file in maven while
generating code from wsdl file.

Thanks.


Sertic Mirko, Bedag wrote:
> 
> Hi
> 
> Try to use the following in your binding file:
> 
> <xjc:generateElementProperty>false</xjc:generateElementProperty>
> 
> Regards
> Mirko
> 
> -----Urspr√ľngliche Nachricht-----
> Von: manoj.java [mailto:m.manojsingh@gmail.com] 
> Gesendet: Montag, 24. August 2009 09:13
> An: users@cxf.apache.org
> Betreff: Problem with CXF wsdl2java
> 
> 
> I am using CXF to expose my web service and also using wsdl2java to
> generate
> the code from wsdl.
> For optional element of type String CXF generate JAXBElement.
> 
> Is there any way to create element of String Type in place of JAXBElement.
> 
> Please suggest. 
> -- 
> View this message in context:
> http://www.nabble.com/Problem-with-CXF-wsdl2java-tp25111534p25111534.html
> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-CXF-wsdl2java-tp25111534p25114578.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message