facebook

web service parameter names

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #296879 Reply

    watta
    Member

    Hi!
    I1m currently evaulating myEclipse 7.1. I have a simple class with only 1 login method. this method has 2 params: username, password. If I generate a webservice from this class using the New Webservice wizard (bottom-up scenario), the myEclipse generates the binding class with argxxx parameters:
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlRootElement;
    import javax.xml.bind.annotation.XmlType;

    @XmlRootElement(name = “Login”, namespace = “http://ws.helpdesk.griffsoft/”)
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = “Login”, namespace = “http://ws.helpdesk.griffsoft/”, propOrder = {
    “arg0”,
    “arg1”
    })
    public class Login {

    @XmlElement(name = “arg0”, namespace = “”)
    private String arg0;
    @XmlElement(name = “arg1”, namespace = “”)
    private String arg1;

    Is there any way to see my original parameter names in the generated files?
    Thanks.

    #296907 Reply

    Brian Fernandes
    Moderator

    watta,

    These files are generated by the annotation processing tool which is part of the JAX-WS RI (Project Metro). I did research the matter but as far as I know, there is no way to customize the names of the generated parameters or any of the code that is generated by their annotation processor.

    Sorry we couldn’t be of more help.

    #296936 Reply

    Hi!

    Thanks for the answer. The only problem is the xxxdelegate class, which is generated by the wizard of the New Webservice creation. As far as I know the apt tool generates the binding classes based on the delegate, and without the @WebParam annotation the apt generates the defaults (arg0, arg1, …). So if I modify the delegate class and put the @WebParam annotation into the existing method definition, and make this file readonly, everything works fine (myEclipse displays an errormessage at the end of the wizard, but the files are ok).

    The queston: is it possible to generate the delegate class with @WebParam annotations?

    Zsolt

    #296937 Reply

    Brian Fernandes
    Moderator

    Zsolt,

    Instead of supplying the bottom up wizard with the original class, you could specify the Delegate class directly, in which case MyEclipse should not generate another delegate.
    Could you try modifying your delegate as required and use that as input to the wizard?

    Please let us know how it goes.

    #297219 Reply

    watta
    Member

    Hi Brian,

    My delegate is ok now, because I’ve specified it manually, however I have problem with the web service creation. I don’t know which one is the wizard that you’ve mentioned where I have to use my delegate class as input. Because the New Web Service wizard overwrites my delegate…

    Thanks: Zsolt

    #298251 Reply

    kfreeman
    Member

    (bump) I’d like to know the answer to this too.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: web service parameter names

You must be logged in to post in the forum log in