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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:27:22+00:00 2026-05-16T17:27:22+00:00

I am new to webservices in general. I am trying to write a Java

  • 0

I am new to webservices in general. I am trying to write a Java stand-alone client which can get a response back from a webservice.

I tried searching SO and Google but now I got more confused. The below are the links I went through extensively.

  • Simple (standalone) Java SOAP web service client from WSDL using Maven
  • Java webservice (soap) client – use certificates
  • java webservice client
  • https://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html
  • Java Webservice Client (Best way)
  • Steps in creating a web service using Axis2 – The client code

I have a url like: http://api.something.com/remote/wsdl/SomeEncryptedText

I also have a SOAP request something like:

<?xml version="1.0" encoding="utf-8"?> 
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> 
<soap12:Body> 
<AuthUsername>someName@someWhere.com</AuthUsername> 
<AuthPassword>mypassword</AuthPassword> 
<Sid>12121</Sid> 
<DynamicProductFeedsRequest xmlns="http://api.something.com/remote/SomeEncryptedText"> 
</DynamicProductFeedsRequest> 
</soap12:Body> 
</soap12:Envelope> 

With this how do I write a stand-alone Java client which I would want to integrate with some web application at a later stage?

From the resources mentioned earlier looks there is a wide choice of softwares: SoapUI, WSDL2Java, Apache Axis, Maven Plugin, JAX-WS, Apache CXF.

I used http://www.soapclient.com/soaptest.html in one of the SO answers mentioned above and I am able to get a perfect html/xml file on the browser.

Now I am confused on which is the software I should use? The information in the links are little in bits and pieces which I am unable to correlate with one another since I do not know anything in SOA.

Could anyone please tell me the high level steps in writing a stand-alone Java client which takes in the WSDL URL and SOAP request and gives me the output of it?

Please let me know if I missed any information.

  • 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-16T17:27:22+00:00Added an answer on May 16, 2026 at 5:27 pm

    This question all depends on the following:

    • The JDK version of your Java compiler.
    • Your WSDL version (there’s 1.0, 1.2 and 2.0).

    Basically, if you are using Java annotations to generate web services, then you’ll need Java 5 related Web Services libraries (which supports annotations).

    Some articles on Using Java Web Services with annotations (JAX-WS):

    • Introducing JAX-WS 2.0 With the Java SE 6 Platform
    • JAX-WS 2.0

    I’ll start from generating Web Service client with Java that doesn’t support annotations. The well known client that generates WSDL to Java is Apache Axis (the last version is 1.4 released in 22 April 2006). This basically takes a WSDL definition and generates it back to client. It supports the old version of WSDL (1.0) and crashes if you use the newer versions of WSDL (1.2 and 2.0).

    What this basically does, it takes your WSDL and generates a java Proxy that communicates to your Web Service. It can allow RPC based as well as XML based communication.

    For Java that supports annotations there are, effectively, 2 ways of doing this:

    • Using Java’s own wsimport command (the executable is found under the JDK_HOME/bin/ folder).
    • Using 3rd Party libaries such as Apache Axis 2 (which effectively replaces Apache Axis and supports WSDL version 2.0) or Apache CXF (which supports WSDL up to 1.2).

    To use wsimport, you basically need to go to a shell command (or write a script) and effectively do something of this effect:

    wsimport -d [outputdir] wsdl_file
    

    and your java proxy will be found in the [outputdir] folder.

    wsimport is found in JDK 1.6 (I don’t know if it exists in earlier versions). More source here, and here.

    For Apache Axis, Apache Axis 2 or Apache CXF, there’s a WSDL2Java class file that does source code generation.

    Here’s a guide on how to use WSDL2Java in Apache CXF and in Apache Axis 2.

    I hope this helps you in some way as much as I spent like 30 minutes off work doing this. 🙂

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

Sidebar

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.