MyEclispe and web service JAX-WS parameter generation is always arg

This topic contains 8 replies, has 3 voices, and was last updated by  support-swapna 10 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #473792 Reply

    Max Mirabito
    Participant

    Dear support

    I am using MyEclipse 2015 CI19 and I am trying to generate a web service interface bottom up (i.e. from java class) using the “New web Service” wizard. The WDSL and XSD are generated but I noticed that the parameter names of the methods are described on the XSD using the “arg0, arg1, etc.) see example below:

    I tried specifying the webparm annotation on the class itself that I want to generate as a delegate as shown below but it does not appear to work
    public String getProfileAsJson(@WebParam(name="userId") String userId) throws NoUserProfileFoundException

    I tried modifying the XSD manually and change from arg0 to userId and then I can see the parameter name via the MyEclipse web service explorer but it does not appear to work when the client files are generated from WSDL.

    Can you tell me what I need to do to ensure that the parameter names are generated properly? Am I doing something wrong?

    Thanks in advance,

    max

    Attachments:
    You must be logged in to view attached files.
    #473853 Reply

    support-swapna
    Moderator

    Max,

    I am afraid there is no other workaround apart from manually modifying the XSD and changing from arg to a parameter name.I have filed an enhancement request for the dev team.

    Sorry for inconvenience caused. Let us know if you see any issues.

    –Swapna
    MyEclipse Support

    #495496 Reply

    Max Mirabito
    Participant

    Hi Swapna,

    Just following back up on this issue we have started using the MyEclipse 2016 CI 5 for the last 2 month and we had hoped the problem may have been resolved. But we are still having the ame issue, any chance you could indicate if you plan to address it or am I the only one who is asking for this to be fixed :-).

    Lately we are noticing that renaming the arguments in the XSD is not very practical when we have complicated services with lots of arguments. This can lead to bad things causing the service to not work properly and we are left chasing our tale. Other than doing a manual rename can you suggest any other alternative?

    thanks
    max

    • This reply was modified 2 years, 1 month ago by  Max Mirabito.
    #495498 Reply

    Max Mirabito
    Participant

    Hi Swapna,

    Sorry to pester you but I did a little more testing and what I am seeing is that if I modify the XSD and change the parameter names (for example arg0 -> id, arg1 -> name) when I invoke the service the arguments coming in into the method call are always null. I tested it using SOAP UI. If I revert back to arg0 and arg1 then the service is invoked properly. So now I am wondering what am I missing when I rename the args.

    thanks again
    max

    #495504 Reply

    support-swapna
    Moderator

    Max,

    The bug is not yet targeted as the dev team is busy with other higher priority issues. You are the only one who raised this issue. I will check with the team and get back to you soon.

    Do you see any errors of interest logged in the .log file located at <workspace dir>/.metadata/.log when trying to invoke the service after modifying the parameter names in the XSD manually? If yes, then please share the error details for further investigation.

    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

    #495585 Reply

    Max Mirabito
    Participant

    Swapna,

    My apologies for my delayed response. Unfortunately I do not see any exception in the myeclipse log.

    Herewith attached I created a sample project that illustrates the issues. To limit the size of the zip I stripped out the jar files from the lib folder. In the project I created 3 services.

    1. Myservice1 use the default arguments arg0, arg1.. argN. Used SoapUI to invoke with no problem

    2. Myservice2 I manually modify the schema and replaced the parameter names with friendly ones. When I use SoapUI to invoke the service I can see the new parameter names but when it’s invoked the parameters are null on the receiving end

    3. Myservice3 I tried using annotation and name the parameters but the WSDL schema still shows the default names
    public String getInfo1(@WebParam(name = "userId") String userId, @WebParam(name = "password") String password)

    I am also attachingscreen shots of SoapUI

    Strange that I am the only one with the problem. Everyone else must be generating the definition and delegates in other ways. Do you see anything I am doing wrong? I hoping you can point me in the right direction.

    Thanks for your patience and guidance.

    max

    • This reply was modified 2 years, 1 month ago by  Max Mirabito.
    • This reply was modified 2 years, 1 month ago by  Max Mirabito.
    • This reply was modified 2 years, 1 month ago by  Max Mirabito.
    Attachments:
    You must be logged in to view attached files.
    #495602 Reply

    support-swapna
    Moderator

    Max,

    Thank you for the project files. We are looking into it.
    Thank you for your patience.

    –Swapna
    MyEclipse Support

    #545803 Reply

    mongonv
    Participant

    I am also having this issue and it seems to be persisting thru the 2016 and 2017 versions of ME. As we have hundreds of methods being generated, the workaround of changing the XSD is a total killer in being able to upgrade the apps. As we have started the upgrade process, we now have to revert to a previous version which causing us a great deal of time.

    Is there anything happening on this issue, cause without a fix we will have to look at other options for our development tools.

    Ed

    #545854 Reply

    support-swapna
    Moderator

    Ed,

    Sorry that you are seeing this issue. We have already fixed this issue in MyEclipse 2016 CI 7. The parameter names will no longer be generated as arg0,arg1. Sorry that we missed updating this thread about the fix.

    I just tried this tutorial in the latest MyEclipse 2017 CI 10 : https://www.genuitec.com/docs/web-services/creating-jax-ws-web-service-client/

    In the generated XSD, I see names instead of ‘arg0′,’arg1’ as below :

    If you are still seeing the issue in MyEclipse 2017, then please share with us your project files along with the .log file located at workspace dir/.metadata/.log to help us investigate further.

    If you want to share the files privately, then you can either ‘Private Message’ or send an email to support@genuitec.com along with a reference to this thread.

    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: MyEclispe and web service JAX-WS parameter generation is always arg