You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by charliec <cl...@yahoo.com> on 2007/08/10 20:41:39 UTC

Re: How to generate a wsdl file at build time (not at runtime) ?

Hi, 

I'm getting the same error, has anyone been able to generate a wsdl using
the wsdlgen command?

Thanks


hgkrt wrote:
> 
> I tried it, and still got error.
> I am sure the Not Found Class is there.
> Why it says cast error ? ( Failed to convert property value of type
> [java.lang.String] to required type [java.lang.Class
> ] for property 'serviceClass')
> 
> 
> 
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Error executing ant tasks
>> 
>> Embedded error: org.springframework.beans.factory.BeanCreationException:
>> Error creating bean with name 'org.codehaus.xfire.spring.ServiceBean'
>> defined in file
>> [C:\opt\project\jsr181-sample\wsdl-generate-sample\wsdlgen-jsr181-su\src\main\resources\services.xml]:
>> Error setting property values; nested
>> exception is org.springframework.beans.PropertyAccessExceptionsException:
>> PropertyAccessExceptionsException (1 errors); nested
>> propertyAccessExceptions are:
>> [org.springframework.beans.TypeMismatchException: Failed to convert
>> property value of type [java.lang.String] to required type
>> [java.lang.Class
>> ] for property 'serviceClass'; nested exception is
>> java.lang.IllegalArgumentException: Class not found:
>> com.sample.ExampleService]
>> 
> 
> 
> 
> hgkrt wrote:
>> 
>> hi Gert, 
>> 
>> Thank you for your reply.
>> I know the wsdl-first maven archetype generate the pom.xml works fine.
>> You mean I should use this section to replace the section I use annotated
>> maven archetype generated.
>> 
>> I will try it.
>> 
>> 
>> Gert Vanthienen wrote:
>>> 
>>> hgkrt,
>>> 
>>> If I use the wsdl-first maven archetype, it generates this in the 
>>> pom.xml file.
>>>        <executions>
>>>           <execution>
>>>             <phase>generate-sources</phase>
>>>             <goals>
>>>               <goal>run</goal>
>>>             </goals>
>>>             <configuration>....
>>> 
>>> This generator is executed correctly, so perhaps you can try to change 
>>> your pom.xml file like this as well.
>>> 
>>> Gert
>>> 
>>> 
>>> hgkrt wrote:
>>>> I try to use this setting to generate wsdl at build time, but I can't
>>>> make it
>>>> work..
>>>>
>>>> Can anyone tell me what's wrong with this ?
>>>>
>>>>
>>>>
>>>>   
>>>>> <plugin>
>>>>> 				<artifactId>maven-antrun-plugin</artifactId>
>>>>> 				<executions>
>>>>> 					<execution>
>>>>> 						<phase>test</phase>
>>>>> 						<configuration>
>>>>> 							<tasks>
>>>>> 								<taskdef
>>>>> 									classname="org.codehaus.xfire.gen.WsdlGenTask"
>>>>> 									name="wsdlgen">
>>>>> 									<classpath>
>>>>> 										<pathelement
>>>>> 											path="${basedir}/target/classes" />
>>>>> 										<pathelement
>>>>> 											path="${basedir}/src/main/java" />
>>>>> 										<path
>>>>> 											refid="maven.test.classpath" />
>>>>> 									</classpath>
>>>>> 								</taskdef>
>>>>> 								<wsdlgen
>>>>> 									configUrl="${basedir}/src/main/resources/services.xml"
>>>>> 									outputDirectory="${basedir}/src/main/resources" />
>>>>> 							</tasks>
>>>>> 							<sourceRoot>
>>>>> 								${basedir}/src/main/java
>>>>> 							</sourceRoot>
>>>>> 						</configuration>
>>>>> 						<goals>
>>>>> 							<goal>run</goal>
>>>>> 						</goals>
>>>>> 					</execution>
>>>>> 				</executions>
>>>>> 				<dependencies>
>>>>> 					<dependency>
>>>>> 						<groupId>org.codehaus.xfire</groupId>
>>>>> 						<artifactId>xfire-generator</artifactId>
>>>>> 						<version>${xfire-version}</version>
>>>>> 						<exclusions>
>>>>> 							<exclusion>
>>>>> 								<groupId>javax.xml</groupId>
>>>>> 								<artifactId>jsr173</artifactId>
>>>>> 							</exclusion>
>>>>> 						</exclusions>
>>>>> 					</dependency>
>>>>> 					<dependency>
>>>>> 						<groupId>org.codehaus.xfire</groupId>
>>>>> 						<artifactId>xfire-jaxws</artifactId>
>>>>> 						<version>${xfire-version}</version>
>>>>> 					</dependency>
>>>>> 					<dependency>
>>>>> 						<groupId>javax.servlet</groupId>
>>>>> 						<artifactId>servlet-api</artifactId>
>>>>> 						<version>2.4</version>
>>>>> 					</dependency>
>>>>> 				</dependencies>
>>>>> 			</plugin>
>>>>>
>>>>>     
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-generate-a-wsdl-file-at-build-time-%28not-at-runtime%29---tf3956133s12049.html#a12096873
Sent from the ServiceMix - User mailing list archive at Nabble.com.