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

  • SEARCH
  • Home
  • 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 8218785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:55:16+00:00 2026-06-07T12:55:16+00:00

I have a web service client which works perfectly fine, within which there is

  • 0

I have a web service client which works perfectly fine, within which there is a line that defines the location of the WSDL:

@WebServiceClient(name = "CReceiveMOMessageService", 
                  targetNamespace = "http://...", 
                  wsdlLocation = "CReceiveMOMessageService.wsdl")

The code piece should be exported as a runnable JAR and is intended to work on a remote location.

When I define the location of the WSDL as above, it looks for a WSDL file at the directory in which I run the JAR file. Instead what I would like to do is to add the WSDL file to the project folder and export as JAR after that, and configure wsdlLocation parameter in a way that it points to the WSDL within the JAR file.

How can this be achieved?

  • 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-06-07T12:55:17+00:00Added an answer on June 7, 2026 at 12:55 pm

    It is possible to add the WSDL to the JAR. It seems that the convention is to place the WSDL in the JAR at the META-INF/wsdl location (although Oracle tools seem to favor META-INF/wsdls (see point 9 of this Oracle tutorial for example).

    I haven’t used the Oracle Enterprise Pack for Eclipse and I guess the OEPE ClientGen task does the correct generation of the client classes when you specify to package the WSDL inside the JAR but I don’t think it’s the same as passing a -wsdllocation META-INF/wsdls/YourService.wsdl parameter when running wsimport.exe:

    wsimport.exe will output @WebServiceClient(... wsdlLocation = "META-INF/wsdls/YourService.wsdl") but will also normally generate code like this in the static initializer of the class:

    baseUrl = YourService.class.getResource(".");
    url = new URL(baseUrl, "META-INF/wsdls/YourService.wsdl");
    

    which will still point to a root folder to which it then adds the provided WSDL path to finally get a non existent path.

    You will have to change the class after it’s generated to include something like this instead:

    url = YourService.class.getClassLoader().getResource("META-INF/wsdls/YourService.wsdl");
    

    which will now point within the JAR. Off course you must pack the WSDL at that location when building the client JAR.

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

Sidebar

Related Questions

I have a client program that consumes a web service. It works quite well
i have a c# wcf web service and a c# client which makes calls
I have a web service client that has an Authenticator class. The Authenticator requires
I have a .NET Web Service running in VS2005 and a client that consumes
I have a windows forms client that consumes an ASP.net web service. It's my
I have a web service with a client written in Java. The service works
I Have an asp.net web service that uses an oracle database. It works when
I have a .NET 2.0 Smart client and with web service back end that
I have implemented a web service with server and client authentication using keytool. The
I have a Java web service and a Java web client making use of

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.