Cannot read WSDL
GoogleCodeExporter opened this issue · 10 comments
What steps will reproduce the problem?
1. Set Wsdl Descriptor Url to
http://bugs.gluteus.se:8080/rpc/soap/jirasoapservice-v2?wsdl
2. run jira2-login with some username / password
What is the expected output? What do you see instead?
I expect to be logged in, but I get the error message:
"xml-parse-tag: XML: (Well-Formed) Invalid character"
Tried out the WSDL in some other validators and it seems to work.
Please provide any additional information below.
What version of the product are you using? On what operating system?
GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3) of 2010-03-26 on
palmer, modified by Debian
Seems like a nice library none the less! Look forward to trying it out.
Original issue reported on code.google.com by arvid.ja...@gmail.com
on 30 Mar 2010 at 11:12
I cannot seem to access the url for the WSDL. Can you please download the WSDL
file
in your browser and attach it to this issue?
It looks like the xml parsing fails on the WSDL document... this happens before
soap-client.el gets a chance to look at the document...
Thanks,
Alex.
Original comment by AlexHars...@gmail.com
on 31 Mar 2010 at 12:34
Thanks for the quick reply! Attaching the WSDL-file. I forgot to mention that
I'm
running the latest hg-version of the client.
Original comment by arvid.ja...@gmail.com
on 31 Mar 2010 at 4:54
Attachments:
The file you attached is parsed fine by soap client (I used `soap-load-wsdl'
which
reads a WSDL document from a file instead of an URL) I suspect there is a
problem
retrieving the WSDL from the URL. To test that, can you please try the
following:
* Put the WSDL XML file somewhere on disc
* Set `jira2-wsdl-descriptor-url' to point to the WSDL file
* In `jira2-load-wsdl' replace the call to `soap-load-wsdl-from-url' with
`soap-load-wsdl'
* Try logging in using `jira2-login' again.
Note that the WSDL document contains the address of the web service, so the jira
client will connect to the right server after loading the WSDL file from disk.
I have also attached a patch that adds some error checking to the URL retrieve
operation, you can try that too, see if you get a better error message.
Original comment by AlexHars...@gmail.com
on 31 Mar 2010 at 5:09
Attachments:
Loading from file worked just fine :D Thoughts:
After logging in, there was no indication of success, so I checked if it worked
by
calling (jira2-add-comment ...) which worked. I also tried jira2-add-comment
which
worked, but it returned nil which was kind of confusing.
Strangely enough, loading from URL worked after I applied your patch for better
error
reporting. From the messages buffer:
Contacting host: bugs.gluteus.se:8080
Reading 4k...
/usr/bin/mail is not an executable. Setting mail-interactive to t.
Processed 328
Processed 329
Processed 580
Processed 584
Processed 619
Processed 625
After this I could get issues and add comments. I tried reversing the patch...
and it
still works. Seems like there never was an issue in the first place :S Weird!
Original comment by arvid.ja...@gmail.com
on 31 Mar 2010 at 6:34
Well I'm glad it fixed the problem :-) I will check-in the patch anyway as it
will
probably give a better error report if the URL cannot be retrieved...
As for the jira2 API, all the defined functions are just wrappers around
`soap-invoke' for the respective operation (e.g `jira2-login' is just a wrapper
for
the "login" SOAP operation, `jira2-add-comment' is just a wrapper for the
"addComment" SOAP operation). As such, these functions return whatever the
wrapped
SOAP operation returns. It seems that the JIRA SOAP API is defined such that it
either returns a useful value or throws an exception. Try adding a comment to a
non-existent issue for example.
Also, you don't need to call `jira2-login' yourself, it will be called by all
the
other jira2 functions when it is needed (when you didn't log in yet or your
login has
expired). You can invoke the jira2 functions directly and you will be prompted
for a
username/password as needed.
Cheers,
Alex.
Original comment by AlexHars...@gmail.com
on 31 Mar 2010 at 6:46
Original comment by AlexHars...@gmail.com
on 16 Feb 2014 at 9:21
- Added labels: Jira-Soap
One more thing about reversing the patch. The WSDL is only downloaded once,
after
that it is stored in `jira2-wsdl'. That value will not be overridden when you
modify
and reload jira2.el.
If you reverse the patch and reload jira2.el, make sure you set that variable
to nil
before trying to use the jira2 functions again...
Original comment by AlexHars...@gmail.com
on 31 Mar 2010 at 6:49
Tried clearing that variable, and it still works. Well, now that it works I can
do
what i set out to do. I'm trying to hook up timelog to jira so that whenever i
clock
in / clock out, the time spent is logged to an issue. I wrote a wrapper around
addWorklogAndAutoAdjustRemaingenEstimate, and it works just fine.
http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atla
ssian/jira/rpc/soap/JiraSoapService.html#addWorklogAndAutoAdjustRemainingEstimat
e(java.lang.String,%20java.lang.String,%20com.atlassian.jira.rpc.soap.beans.Remo
teWorklog)
I've attached the file but at the same time it seems kind of pointless adding
all
these wrappers, since they're very simple. What is your opinion? What is your
plan
for this client? I could think of a million things I do in Jira that would be
nice to
do from emacs.
Original comment by arvid.ja...@gmail.com
on 31 Mar 2010 at 7:07
Attachments:
I have added your patch for updating the issue worklog, but I have reformatted
the
documentation for the defun to match Emacs documentation conventions. This code
definitely belongs to jira2.el as the purpose of that file is to define wrapers
for
the jira SOAP calls. So far I have only added wrappers for the functionality I
use,
but this is only because I could not be bothered to wrap the entire JIRA api at
once :-)
Beyond this I don't have any clear plans for the client. I use the wrapper
functions
to automate some of the workflows at my workplace, but they are too specific to
be of
general use. I have thought of documenting these on the EmacsWiki as sample
workflows, but never got around to do it. Your timelog hook sounds like a good
candidate for such a page.
Another alternative is to start another project for Emacs-Jira integration.
Original comment by AlexHars...@gmail.com
on 31 Mar 2010 at 11:47
Closing issue, as it seems it is fixed.
Original comment by AlexHars...@gmail.com
on 10 Oct 2010 at 7:49
- Changed state: Fixed