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 3854670
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:39:30+00:00 2026-05-19T17:39:30+00:00

I’m having trouble understanding how to make a web service client. The story is

  • 0

I’m having trouble understanding how to make a web service client.
The story is that I need to make a call to a web service. As I then understand it I need to somehow consume the web service to get the correct classes of the web service.

I’ve investigated a numerous of ways to do this. For example I’ve tried consuming them with a script and then just import the classes.

However, a colleague of my recommended that I would try using the Maven-plugin wsdl2code since we already use Maven-2 . Doing this works but creates a lot of junk files as I see it. I’ve added following into my pom.xml file:

<plugin>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
    <version>1.4</version>
     <executions>
         <execution>
            <goals>
                <goal>wsdl2code</goal>
            </goals>
            <configuration>
                <packageName>ws.client.test</packageName>
                <wsdlFile>http://localhost:8088/test?WSDL</wsdlFile>
                <databindingName>xmlbeans</databindingName>
                <outputDirectory>target/ws/test</outputDirectory>
            </configuration>
         </execution>
      </executions>
</plugin>

This creates the files successfully, but as said, there’s also a lot of junk files(
xmlsoap/schemas/soap/encoding/…) or at least a lot more files for no use (as I see it) than the other WSDLconsume I tried.

Questions

  • Is there a general guidelines how to
    consume a web service? Since the WSDL
    file is external it could also be
    changing, and therefor I thought
    it could be good having this done
    automatically in Maven (though there
    would be other side effects if the
    WSDL suddenly changed…).

  • If the wsdl2code is a good choice, should all the files always be created in the target-catalouge so
    that they are being removed when executing mvn clean)?

  • Is there any other tool that might fit better?

Update/Edit
By using for example JAX-WS wsimport I get the generated files that I desire.
However, by having these created in the /target-folder I want to reach them in the same project to actually call the web service. Is this possible?

  • 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-19T17:39:31+00:00Added an answer on May 19, 2026 at 5:39 pm

    If you have java-1.6 you can (should) use jax-ws, its very easy with onboard java tools. There is a good maven plugin that will create a webservice client, that can be used without any additional dependencies. Have a look at http://jax-ws-commons.java.net/jaxws-maven-plugin/

    See http://blogs.oracle.com/enterprisetechtips/entry/using_jax_ws_with_maven for a detailed walkthrough.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.