I am working on integrating JIRA (5.2.2) with other systems, and am planning on having the listener post a message to an external web service.
This external web service is capable of receiving SOAP messages; I've tried creating a JAX-WS client but ran into the problem mentioned here. I then created an Axis2 client library to consume the service, and I am still running into a problem.
When the listener tries to build the message, a ClassNotFoundException is thrown on org.w3c.dom.Node, and obviously the message never gets sent. If I run the same code outside of being in a JIRA plugin, it works just fine, so I'm pretty sure that the problem lies in how XML-API is exposed to the plugin.
When I look in the OSGi console, org.w3c.dom is a private import with the plugin, and I would expect it to be a public import. My OSGi knowledge is lacking, so I may just have a simple misunderstanding there.
If it makes a difference, I am trying to send a message to a WSO2 ESB (v4.6.0) service.
So, does anyone have a JIRA plugin communicating with a SOAP web service?
Alternatives I am going to pursue:
Community moderators have prevented the ability to post new answers.
I found a workaround/solution to this.
First of all, WSO2 ESB supports JSON natively, so instead of worrying about creating a SOAP+XML message, we can POST a JSON message. This can be done in a listener plugin without issue.
Secondly, assuming we want to continue down the path of using a SOAP+XML message, as long as that message can be constructed (through a custom class not using XML-API), Apache Commons' HttpClient library can be easily used to POST the SOAP+XML message and consume the response.
This doesn't solve the spirit of the original problem (i.e., it's not using Axis2 or JAX-WS to consume the service), but it does solve the problem
Hi Thomas,
SOAP is deprecated in JIRA from version 6 on -> https://developer.atlassian.com/display/JIRADEV/SOAP+and+XML-RPC+API+Deprecated+in+JIRA+6.0
Regards Steve
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok, mea culpa
do you have a dependency on org.w3c.dom in your pom?
If not, add it. This will embed the dependency in your bundle.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did ... however, this has taken a different route, as the latest release of WSO2 ESB can handle JSON natively (it could before but there were limitations that made it unusable).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.