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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:30:17+00:00 2026-06-06T09:30:17+00:00

I am creating a WebService in Java using JAXWS RI. The WSDL file is

  • 0

I am creating a WebService in Java using JAXWS RI.
The WSDL file is created when deploying the application WAR automatically.
The problem is that I want the arguments (that each operation recieves) in the WSDL file to have significant names, but they appear as arg0, arg1, arg2 …
Is there a way to define the names for this parameters and don’t use the default names?

I have implemented the following:

The WebService Interface

@WebService
@SOAPBinding(style = Style.RPC)
public interface WS2 {
    @WebMethod String confirmaXML(String lrt_id);
}

The WebService Interface Implementation

@WebService(endpointInterface = "vital.tde.ws2.WS2")
public class WS2Imp implements WS2{
    public String confirmaXML(String lrt_id) {
        String respuesta = null;
        //CODE
        return respuesta;
    }

sun-jaxws.xml

<?xml version="1.0" encoding="UTF-8"?>
<endpoints
    xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime"
    version="2.0">
    <endpoint name="WS2" implementation="vital.tde.ws2.WS2Imp" url-pattern="/WS2" />
</endpoints>

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
  <display-name>WS2</display-name>
  <listener>
    <listener-class>
                com.sun.xml.ws.transport.http.servlet.WSServletContextListener
        </listener-class>
  </listener>
  <servlet>
    <servlet-name>WS2</servlet-name>
    <servlet-class>
            com.sun.xml.ws.transport.http.servlet.WSServlet
        </servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>WS2</servlet-name>
    <url-pattern>/WS2</url-pattern>
  </servlet-mapping>
  <session-config>
    <session-timeout>120</session-timeout>
  </session-config>
</web-app>
  • 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-06T09:30:18+00:00Added an answer on June 6, 2026 at 9:30 am

    If you’re generating your WSDL from your web service class, you may add WebParam annotations to the parameters of your methods to enforce naming in the WSDL. For example:

    @WebService
    public class FooService
    {
        @WebMethod(operationName = "barMethod")
        public void bar (@WebParam(name = "bazArg") int baz)
        {
            ...
        }
    }
    

    The above snippet configures JAX-WS to use the name “bazArg” for the method’s parameter name in the WSDL.

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

Sidebar

Related Questions

I am planning to work on creating a perl webservice[using XML::Compile::SOAP] and want to
i am creating a web service using 3rd party wsdl that helps me in
I am using a java-based tool that includes jaxws-rt-2.1.4.jar for accessing web services. I
Application configuration: Web application using java first method of creating JAX-WS 2.0 Web Services
I am creating one simple conference application (Java based) and using RESTFull Web Service
I'm creating a webservice and I want to store the source on github and
I am creating an application which involves so many web-service calls. I am using
I am creating an application in which I want to access a web service
I am using JBoss 4.0 for creating a simple Web Service using the @WebService
I am having trouble creating a Web Service in Java that contains two methods

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.