Skip to content

Commit

Permalink
Fix to support EI 6.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
keerthu committed May 31, 2019
1 parent 974dfa0 commit 400e07b
Show file tree
Hide file tree
Showing 22 changed files with 1,267 additions and 379 deletions.
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
#Fhir ESB Connector
### FHIR EI Connector

The FHIR connector allows you to work with resources in FHIR are the modular components of FHIR. The connector uses the FHIR RESTFul Api to interact with FHIR.
#Build
The FHIR [Connector](https://docs.wso2.com/display/EI650/Working+with+Connectors) allows you to work with resources in FHIR are the modular components of FHIR. The connector uses the FHIR RESTFul Api to interact with FHIR.

mvn clean install
#How You Can Contribute
## Compatibility

You can create a third party connector and publish in WSO2 Store.
| Connector version | Supported FHIR version | Supported WSO2 ESB/EI version |
| ------------- | ------------- | ------------- |
| [1.0.2](https://github.com/wso2-extensions/esb-connector-fhir/tree/org.wso2.carbon.connector.fhir-1.0.2) | 4.0.0 | EI 6.5.0 |

https://docs.wso2.com/display/ESBCONNECTORS/Creating+a+Third+Party+Connector+and+Publishing+in+WSO2+Store

## Getting started

#### Download and install the connector

1. Download the connector from the [WSO2 Store](https://store.wso2.com/store/assets/esbconnector/details/b4b29e84-37ad-4c2d-99d0-5a2a3ab4bc52) by clicking the Download Connector button.
2. Then you can follow this [Documentation](https://docs.wso2.com/display/EI650/Working+with+Connectors+via+the+Management+Console) to add and enable the connector via the Management Console in your EI instance.
3. For more information on using connectors and their operations in your EI configurations, see [Using a Connector](https://docs.wso2.com/display/EI650/Using+a+Connector).
4. If you want to work with connectors via EI tooling, see [Working with Connectors via Tooling](https://docs.wso2.com/display/EI650/Working+with+Connectors+via+Tooling).

## Building From the Source

Follow the steps given below to build the FHIR connector from the source code:

1. Get a clone or download the source from [Github](https://github.com/wso2-extensions/esb-connector-fhir).
2. Run the following Maven command from the `esb-connector-fhir` directory: `mvn clean install`.
3. The FHIR connector zip file is created in the `esb-connector-fhir/target` directory

## How You Can Contribute

As an open source project, WSO2 extensions welcome contributions from the community.
Check the [issue tracker](https://github.com/wso2-extensions/esb-connector-fhir/issues) for open issues that interest you. We look forward to receiving your contributions.
309 changes: 232 additions & 77 deletions pom.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/main/assembly/assemble-connector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
~ under the License.
-->
<assembly>
<id>connector</id>
<formats>
<format>zip</format>
</formats>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fhir-resource/update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<call>
<endpoint>
<http method="Put"
uri-template="{uri.var.base}/{uri.var.type}/{uri.var.idToUpdate}{+uri.var.format'}"/>
uri-template="{uri.var.base}/{uri.var.type}/{uri.var.idToUpdate}{+uri.var.format}"/>
</endpoint>
</call>
</sequence>
Expand Down
49 changes: 18 additions & 31 deletions src/test/INTEGRATION-TEST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,31 @@ Pre-requisites:
Tested Platform:

- Microsoft WINDOWS V-7
- UBUNTU 13.04,14.04
- WSO2 ESB 4.9.0,5.0.0-BETA
- Java 1.7
- UBUNTU 13.04,14.04, Mac OS 10.13.2
- WSO2 EI 6.5.0
- Java 1.8

Steps to follow in setting integration test.

1. Download ESB WSO2 ESB 5.0.0-BETA and add "-XX:-UseSplitVerifier" under $JVM_MEM_OPTS into {ESB_HOME}/bin/wso2server.sh".
1. Download ESB WSO2 EI from the official site".

2. This ESB should be configured as below;
i) Enable following message formatters
<messageFormatter contentType="text/html"
class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
2. This EI should be configured as below;
i) Enable following message formatters and builders in {EI_HOME}/conf/axis2/axis2.xml file.
```
<messageFormatter contentType="text/html"
class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>

3. Go to FHIR root URL(https://open-api.fhir.me) and then Extract the certificate from browser and place the certificate file in following
locations.
<messageBuilder contentType="application/fhir+json"
class="org.wso2.carbon.integrator.core.json.JsonStreamBuilder"/>
<messageBuilder contentType="text/html"
class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
```

i) "<FHIR_CONNECTOR_HOME>/fhir-connector/fhir-connector-1.0.0/org wso2.carbon.connector/src/test/resources/
keystores/products"
3. Go to FHIR root URL(For example: https://hapi.fhir.org/baseDstu3) and then Extract the certificate from browser and place the certificate file into {ESB_CONNECTOR_HOME}/repository/.

Navigate to the above location from command prompt and execute
'keytool -importcert -file CERT_FILE_NAME -keystore wso2carbon.jks -alias "fhircert"' in command line to import
FHIR certificate in to keystore. Give "wso2carbon" as password.
NOTE : CERT_FILE_NAME is the file name which was extracted from FHIR with the extension, change it accordingly.
Remove the copied certificate.
4. Compress modified EI as wso2ei-6.5.0.zip and copy that zip file into location "{ESB_CONNECTOR_HOME}/repository/".

ii) "<ESB_HOME>/repository/resources/security"

Navigate to the above location from command prompt and execute 'keytool -importcert -file CERT_FILE_NAME -keystore
client-truststore.jks -alias "fhircert"' in command line to import FHIR certificate in to keystore. Give
"wso2carbon" as password.
NOTE : CERT_FILE_NAME is the file name which was extracted from FHIR with the extension, change it accordingly.
Remove the copied certificate.


4. Compress modified ESB as wso2esb-4.9.0.zip/wso2esb-5.0.0-BETA.zip and copy that zip file into location "{ESB_CONNECTOR_HOME}/repository/".

5. Update the fhir properties file at location "<FHIR_CONNECTOR_HOME>/fhir-connector/fhir-connector-1.0.0/
org.wso2.carbon.connector/src/test/resources/artifacts/ESB/connector/config" as below.
5. Update the fhir properties file at location "<FHIR_CONNECTOR_HOME>/src/test/resources/artifacts/ESB/connector/config" as below.

i) base - The service root URL
ii) type - The name of the resource type
Expand All @@ -60,4 +47,4 @@ Steps to follow in setting integration test.
vii) idForHistory - The particular Id to retrieve the history

6. Navigate to "{ESB_CONNECTOR_HOME}/" and run the following command.
$ mvn clean install
```$ mvn clean install -Dskip-tests=false```
Loading

0 comments on commit 400e07b

Please sign in to comment.