Renaming the argument name in JAX-WS

Posted by user182944 on Stack Overflow See other posts from Stack Overflow or by user182944
Published on 2012-09-16T03:00:11Z Indexed on 2012/09/16 3:37 UTC
Read the original article Hit count: 133

Filed under:
|
|
|
|

I created a web service using JAX-WS in RSA 7.5 and Websphere 7 using bottom-up approach. When I open the WSDL in SOAP UI, then the arguments section is appearing like this:

<!--Optional-->
<arg0>
    <empID>?</empId>
</arg0>
<!--Optional-->
<arg1>
    <empName>?</empName>
</arg1>
<!--Optional-->
<arg2>
    <empAddress>?</empAddress>
</arg2>
<!--Optional-->
<arg3>
    <empCountry>?</empCountry>
</arg3>

The service method takes the above 4 elements as the parameters to return the employee details.

1) I want to rename this arg0, arg1, and so on with some valid names.

2) I want to remove the <!--optional--> present above the arg tags. (For removing the <!--optional--> from elements name, I used @XMLElement(required=true)). But I am not sure where exactly to use this annotation in this case :(

Please help.

Regards,

© Stack Overflow or respective owner

Related posts about java

Related posts about Xml