Some users want to automate BPEL deployment using external tools. This blog post discuss how you can use BPEL Uploader admin service for this purpose.
Applies to WSO2 BPS 3.x. ( Tested on 3.2.0 )
Viewing wsdl of BPEL Uploader admin service
- Change "HideAdminServiceWSDLs" to false in Carbon.xml.
- (Re)Start WSO2 BPS server.
- Now you can view BPEL uploader admin service WSDL from
- https://localhost:9443/services/BPELUploader?wsdl
Method 1 - Using SOAP UI.
Create SOAP UI project using "https://localhost:9443/services/BPELUploader?wsdl"
- Open upload service request and add an attachment using Attachment tab.
- Select your BPEL file from file system. ( eg: Async-Client.zip )
- Give File Name in SOAP request ( Async-Client.zip )
- Type "cid:Myzip-File" in dataHandler.
- Select Myzip-File in Part column in attachment tab.
- In Auth tab. Configure Basic authentication ( Usernname/passowrd admin/admin - Authenticate Pre-Emptively)
Now you will able to upload BPEL file using SOAP UI.
Note: When you send above request, SOAP UI automatically replace dataHandler content with base64 encoded content of zip file.
Method 2 - Using Curl Command line tool.
- First Convert zip file content into base64 format. For that use base64 command line tool as follows,
- Create request.xml file with following content. Replace dataHandler text with content of base64.txt
- Use following curl command to upload your BPEL file.
$ base64 Async-Client.zip > base64.txt
curl --user admin:admin -k -s -v --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction: urn:uploadService" --data @request.xml https://localhost:9443/services/BPELUploader
-- End --