Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7664373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:17:18+00:00 2026-05-31T14:17:18+00:00

I have a JAX-WS-driven web service whose WSDL we generate a web service client

  • 0

I have a JAX-WS-driven web service whose WSDL we generate a web service client from in another Maven module (which I’ll call ws-consumer).

For better or worse, we copy the “published WSDLs” (the version of the WSDL & XSDs that the service held/generated at point of release) to our src/wsdl folder of ws-consumer and then use jaxws-maven-plugin from org.jvnet to generate a client using jaxws:wsimport with the following (truncated) configuration:

    <plugin>
        <groupId>org.jvnet.jax-ws-commons</groupId>
        <artifactId>jaxws-maven-plugin</artifactId>
        <version>2.1</version>
        <executions>
            <execution>
                <!--phase>generate-sources</phase -->
                <goals>
                    <goal>wsimport</goal>
                </goals>
                <configuration>
                    <wsdlDirectory>src/main/resources/META-INF/wsdl/</wsdlDirectory>
                    <wsdlFiles>
                        <wsdlFile>MyWS/MyWS.wsdl</wsdlFile>
                    </wsdlFiles>
                </configuration>
            </execution>
        </executions>
    </plugin>

Now, the generated client code has the following annotations applied at the class level:

@WebServiceClient(name = "MyWS", targetNamespace = "http://myws/blah", wsdlLocation = "**file:/C:/some/absolute/path/src/main/resources/META-INF/wsdl/MyWS/MyWS.wsdl"**)

emphasis mine

As you can hopefully see, the wsdlLocation attribute value has a hard-coded absolute path that is going to be incorrect when the service is deployed.

Is there any way I can “control” this by setting it to just META-INF/wsdl/MyWS/MyWS.wsdl or some other value?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:17:20+00:00Added an answer on May 31, 2026 at 2:17 pm

    It is possible with the Codehaus plugin:

    <plugin>
       <groupId>org.codehaus.mojo</groupId>
       <artifactId>jaxws-maven-plugin</artifactId>
       <version>1.9</version>
       <executions>
         <execution>
           <goals>
             <goal>wsimport</goal>
           </goals>
         </execution>
       </executions>
       <configuration>
         <keep>true</keep>
         <verbose>true</verbose>
         <wsdlDirectory>../wscontract/src/main/resources/wsdl</wsdlDirectory>
         <wsdlLocation>wsdl/MaintainAddress.wsdl</wsdlLocation>
         <sourceDestDir>src/main/java</sourceDestDir>
         <bindingDirectory>.</bindingDirectory>
         <bindingFiles>
           <bindingFile>jaxb/xsdbindings.xml</bindingFile>
           <bindingFile>jaxb/wsdlbindings.xml</bindingFile>
         </bindingFiles>
       </configuration>
    </plugin>
    

    Perhaps the plugin you are using has a similar option or perhaps you can consider switching.

    You can also provision your WSDL explicitly, in which case this property is ignored, though that may not be appropriate in a container-managed application.

    Sample code here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have local WSDL file. i tried to create JAX-WS Web service client which
I have a WSDL file for a web service. I'm using JAX-WS/wsimport to generate
I am a newbie in web services. I have a JAX-WS service which I
I have a JAX-B java web service which I'm using to update a database.
Is it possible to have a JAX-RS web service redirect to another web page?
I have a Spring application that uses JAX-WS to consume another web service. Everything
In java i have created a JAX- web service, which is up and running,
I have a Servlet container (Glassfish/OC4J) which service some JAX-WS web service endpoints which
I have a wsdl and I'd like to generate jax-ws type Java source from
I have a web service (JAX-RS/Spring) that generates SQL queries which run against a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.