Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Getting a web service client working within a JIRA plugin

Edward Sant March 21, 2012

I am trying to get a my jira plugin to call a simple web service within a jira plugin, but I am not having any luck.

I generated the classes using wsimport:

wsimport -keep -verbose http://localhost:5382/Service1.svc?wsdl

The code to use the service looks something like:

private String CreateIssue() {

 

        IssueService service = new IssueService();

        IIssueService binding = service.getBasicHttpBindingIIssueService();

 

        String issueID = binding.createIssue(type, description, steps, 
                                             expected, workaround, storage, 
                                             docType, actions, tools, external, 
                                             repeatability, workaroundType, severity, 
                                             pmSeverity, products, extensions, versions, 
                                             os, status, project, resolution, fixversions); 

        return issueID;
    }

Very simple and straight forward. Unfortunately when I try and call this code I get a: ClassNotFoundException: Provider com.sun.xml.ws.spi.ProviderImpl

After reading this: https://answers.atlassian.com/questions/16435/use-jax-ws-client-in-jira-plugin-v2

I feel like there is classloader issue or something I have tried with jaxws-rt as a dependency and without and nothing seems to work.

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 17, 2012

Hi,

Check out this answer - https://answers.atlassian.com/questions/44457/implement-jax-ws-in-jira-5-plugin/97748

With some hackery, I was able to get JAX-WS working from within a JIRA plugin. If you have the option, using Axis would be a much nicer experience.

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 17, 2019

Hello,

Have a look at my article, how to call a SOAP web service from Jira using jax-ws in Jira 7.2.x

https://community.atlassian.com/t5/Agile-articles/How-to-call-a-SOAP-Web-Service-from-Jira-7-2-x-plugin/ba-p/1010338

0 votes
Radek Kantor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 21, 2012

Hi,

SOAP client web servce runtime is Apache Axis? You must specify some runtime in client class generation process from wsdl. If it is Axis, import dependency into pom.xml

<dependency>
            <groupId>axis</groupId>
            <artifactId>axis</artifactId>
            <version>1.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>axis</groupId>
            <artifactId>axis-jaxrpc</artifactId>
            <version>1.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>axis</groupId>
            <artifactId>axis-saaj</artifactId>
            <version>1.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>axis</groupId>
            <artifactId>axis-wsdl4j</artifactId>
            <version>1.5.1</version>
            <scope>provided</scope>
        </dependency>

Edward Sant March 21, 2012

I think the client is using JAXWS not Apache axis. Can I generate an axis client from a wsdl?

TAGS
AUG Leaders

Atlassian Community Events