Access Keys:
Skip to content (Access Key - 0)
community header community tab mule tab ibeans tab muleforge tab

Transport Guide

Transport Configurations | Transformers | Service Components | [Questions and Answers]

Transport Configurations

Transport Properties

These are the properties supported by the transport:

Property Description Default Required
org.mule.providers.jira.soap.interface The JIRA SOAP service interface, generated by Axis WSDL2Java. com.atlassian.jira.rpc.soap.jirasoapservice_v2.JiraSoapService
org.mule.providers.jira.soap.locator.class The JIRA SOAP service locator, generated by Axis WSDL2Java. com.atlassian.jira.rpc.soap.jirasoapservice_v2.JiraSoapServiceServiceLocator
org.mule.providers.jira.soap.public.methods The public methods which do not require passing an authentication token while being invoked. login, logout

They should be set in the container context and can also be set via Java system property API (but not having a high overriding precedence), e.g.

<container-context name="jiraConnectorContainerContext" className="org.mule.impl.container.PropertiesContainerContext">
	<properties>
		<property name="org.mule.providers.jira.soap.public.methods" value="login, logout, whatever" />
	</properties>
</container-context>

Connector Properties

These are the properties supported by the connector:

Property Description Default Required
defaultUsername The default username used for connection establishment and subsequent invocations.  
defaultPassword The default password used for connection establishment and subsequent invocations.  
soapEndpointAddress The SOAP endpoint address. If this is not specified, the internal SOAP client of this transport will use the default of org.mule.providers.jira.soap.locator.class.  

Here is an example configuration:


<connector name="jiraConnector1" className="org.mule.providers.jira.JiraConnector">
	<properties>
		<property name="defaultUsername" value="admin" />
		<property name="defaultPassword" value="admin" />
		<property name="soapEndpointAddress" value="http://localhost:8080/rpc/soap/jirasoapservice-v2" />
	</properties>
</connector>

Endpoint Properties

Property Description Default Required
jsonParams The parameters required by the method invocation. If the method is a non-public method (see [Transport Properties], the first argument (authentication token) is not required.  
method The name of the method to invoke.  
username The username used for this invocation. Overriding 'defaultUsername' specified at connector.  
password The password of 'username'.  
commandType The currently supported commandType is SOAP. So this property has no significant effect at the moment. soap

Here is an example configuration:

<mule-descriptor name="testServiceComponent" implementation="org.mule.components.simple.EchoComponent">
	<inbound-router>
		<endpoint address="vm://input"></endpoint>
	</inbound-router>
	<outbound-router>
		<router className="org.mule.routing.outbound.OutboundPassThroughRouter">
			<endpoint address="jira://jira:jira@localhost.localdomain:8080?commandType=soap&amp;method=createIssue&amp;connector=jiraConnector1">
				<properties>
					<list name="jsonParams">
						<entry value="{'summary': ' ${name} ', 'description': '${description}', 'project': 'TPJ', 'type': '1', 'assignee': 'admin', 'components': [{'id': '10000'}]}" />
					</list>
				</properties>
			</endpoint>
		</router>
	</outbound-router>
</mule-descriptor>

In the example above, by sending a payload to vm://input, the message will be routed to the JIRA end to create an issue, extracting the payload's 'name' property and 'description' for summary and description of the issue.

More Features

Please refer to the following pages for other features shipped with this transport:

Configuring HTTP Receiver

This transport is also shipped with a HttpRequestToMethodInvocation transformer, which allows you to convert an HTTP request to a MethodInvocation object recognized by the transport's service (e.g. JiraSoapServiceComponent).

Please refer to the Transformers page for more information.

Receiving JSON Output

If your application is expecting a response with an interchangeable format, for instance, from a JavaScript which invokes the service via HTTP and does not recognize a RemotePriority[] object, you can use the ObjectToJsonString transformer as the endpoint response transformer, e.g.

<endpoint address="http://localhost:8081/jira" transformers="HttpRequestToMethodInvocation" synchronous="true" responseTransformers="ObjectToJsonString"></endpoint>

By requesting this URL:

http://localhost:8081/jira?method=getPriorities

You will receive a response with a body similar to this:

{
   "object":[
      {
         "color":"#cc0000",
         "icon":"http://localhost:8090/images/icons/priority_blocker.gif",
         "description":"Blocks development and/or testing work, production could not run.",
         "name":"Blocker",
         "id":"1"
      },
      {
         "color":"#ff0000",
         "icon":"http://localhost:8090/images/icons/priority_critical.gif",
         "description":"Crashes, loss of data, severe memory leak.",
         "name":"Critical",
         "id":"2"
      }, ...
   ],
   "type":"[Lcom.atlassian.jira.rpc.soap.beans.RemotePriority;"
}

Please refer to the Transformers page for more information.

References

  1. Atlassian JIRA RPC plugin API Documentation
Adaptavist Theme Builder (3.3.3-conf210) Powered by Atlassian Confluence 2.10, the Enterprise Wiki.
Free theme builder license