[jboss-user] [JBoss Web Services] - Using relative wsdl location and maven-jaxws-tools-plugin.

Jeremy Whiting do-not-reply at jboss.com
Fri Feb 3 05:59:09 EST 2012


Jeremy Whiting [https://community.jboss.org/people/whitingjr] created the discussion

"Using relative wsdl location and maven-jaxws-tools-plugin."

To view the discussion, visit: https://community.jboss.org/message/714252#714252

--------------------------------------------------------------
Hi,
 I am having difficulty creating a ws client api using a wsdl. My mavenised project is using the maven-jaxws-tools-plugin plugin version 1.1.0.GA.

 Your example on the Wiki indicates the user can declare a relative wsdl location in the module.

 https://community.jboss.org/docs/DOC-13542#Examples_168533 https://community.jboss.org/wiki/JBossWS-Wsconsume#Examples_168533

  I have tested it with a HTTP url and that works. But that option needs a running AS7 to provide the response.
 Instead I want to use a relative path. Which should work. Given the example provided earlier. But my maven console shows no java classes are generated or saved in the source directory.

This is my pom.xml.

<project xmlns=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0  http://maven.apache.org/xsd/maven-4.0.0.xsd http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.jboss.perf.test</groupId>
   <artifactId>envEntryLookupClient</artifactId>
   <version>0.0.1-SNAPSHOT</version>
   <packaging>jar</packaging>

   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   </properties>

   <build>
      <finalName>${project.artifactId}</finalName>
      <plugins>
         <!-- Compiler plugin enforces Java 1.6 compatibility and activates 
            annotation processors -->
         <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
               <source>1.5</source>
               <target>1.5</target>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.jboss.ws.plugins</groupId>
            <artifactId>maven-jaxws-tools-plugin</artifactId>
            <version>1.1.0.GA</version>
            <configuration>
               <wsdlLocation> http://burtha02-wireless:8080/envEntryEmulatorSampleWeb/StaticService?wsdl http://burtha02-wireless:8080/envEntryEmulatorSampleWeb/StaticService?wsdl</wsdlLocation>
               <wsdls>
                  <wsdl>${basedir}/src/main/resources/StaticService.wsdl</wsdl>
               </wsdls>
               <targetPackage>org.jboss.performance.jndi.test.client</targetPackage>
               <sourceDirectory>src/main/java</sourceDirectory>
               <extension>true</extension>
               <verbose>true</verbose>
            </configuration>
         </plugin>
      </plugins>
   </build>

   <dependencies>
...
      <dependency>
         <groupId>org.jboss.spec.javax.xml.ws</groupId>
         <artifactId>jboss-jaxws-api_2.2_spec</artifactId>
         <version>2.0.0.Final</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>org.jboss.ws.cxf</groupId>
          <artifactId>jbossws-cxf-client</artifactId>
          <version>4.0.0.GA</version>
          <scope>provided</scope>
       </dependency>
       <dependency>
          <groupId>org.jboss.ws</groupId>
          <artifactId>jbossws-api</artifactId>
          <version>1.0.0.GA</version>
          <scope>provided</scope>
       </dependency>
   </dependencies>
</project>

maven console output 

$ mvn clean compile -DskipTests
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building envEntryLookupClient 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ envEntryLookupClient ---
[INFO] Deleting ..../envEntryLookupClient/target
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ envEntryLookupClient ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ envEntryLookupClient ---
[INFO] Compiling 1 source file to ...../envEntryLookupClient/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.815s
[INFO] Finished at: Fri Feb 03 10:52:06 GMT 2012
[INFO] Final Memory: 20M/162M
[INFO] ------------------------------------------------------------------------



The wsdl is located here 

./src/main/resources:
StaticService.wsdl

 Is there something else I should be doing with the plugin configuration to get this working with the plugin ?

Regards,
Jeremy
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/714252#714252]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120203/a5f3b2d1/attachment-0001.html 


More information about the jboss-user mailing list