Using Wadl generated code, when creating a issue with post command it creates 5 entries
Hi,
With 4.1.1 and 4.1.2 i see this behaviour. Can someone confirm this and open a yt issue
thanks in advance
Jorge Costa
With 4.1.1 and 4.1.2 i see this behaviour. Can someone confirm this and open a yt issue
thanks in advance
Jorge Costa
Please sign in to leave a comment.
Thanks
Jorge Costa
Sorry for not responding earlier. I've just checked this and everything works fine. Could you please provide a bit more details?
Regards,
Alexander
No problem with delay, was just worried about the big ammount to spam mails in the forum.
So here are the steps:
1. Get application.wadl from rest/application.wadl
2. generate source using the following commands:
E:\wadl-dist-1.1.4-SNAPSHOT\bin>wadl2java.bat -o out -p org.sonar.plugins.issuetracker.soap application.wadl
This generated the java file that ive imported into my project (attach file 1, BGit_Rest.java):
3. Need to modify the generated file to make it compile, some import functions(attached file 3, YouTrack_Rest.java)
4. create a small client apit (YouTrackRestSession.java):
From a test run:
YouTrackRestSession myYTSession = new YouTrackRestSession(new URL("http://localhost:83/rest/"));
myYTSession.logIn("", "Buildmaster", "Buildmaster");
myYTSession.CreateIssue(-1, "TT", "To be imported Manually", "Bug", "Manual Import", "Show-Stopper", "Bug", "", "Open", "", "", "", "");
This code creates the 5 entries. Can be sure what is the problem, but im guessing the generation of the Wadl file.
By the way this is related with youtrack issue to create a sonar plugin for youtrack. Pretty sure it will be handy in the future.
Thanks in advance
JC
BGit_Rest.java (2MB)
YouTrack_Rest.java (2MB)
YouTrackRestSession.java (19KB)
YouTrackIssue.java (2.2KB)
I think you are correct assuming that the situation is caused by the generated code behaviour — I just tried this with a simple client that allows sending POST and PUT requests.
Regards,
Alexander
Thanks in advance
Br,
Jorge Costa