Hi again Petals Padawan. Glad to see you're still on board !
For your 3rd day, you will connect Petals to an FTP server, and expose the created FTP service as a SOAP web-service, outside Petals ESB.
- Petals ESB 3.1
- Petals Studio 1.1.0
- Petals SE RMI 1.1.1
- Petals BC SOAP 4.0.2
- Petals Webconsole 2.0.3
- Tomcat 6.0.29
- JDK 6 update 20
Added in this tutorial :
- Petals BC FTP 3.2.1
- soapUI 3.6
Deploy a FTP Service Unit
Install and Deploy BC-FTP
- Download Petals ESB components
- Deploy BC-FTP in Petals ESB
Configure and deploy a FTP Service-Unit for [ftp.petalslink.com]
- Start Petals ESB.
- Launch Petals Studio.
- File => New => Service Unit Project: Service Unit - Select the kind of service to create.
- Select: Provide / FTP / Current_Version => Next: FTP Service-Unit - Defines the JBI properties of the service to import.
- Service Name: FtpTutorial
- Next => Next: FTP Service-Unit - Define the specific properties for this version of the component.
- Server: ftp.petalslink.com
- Port: 21
- User: petals
- Password: demo
- Folder: /
<folder> attribute is written as optionnal in Studio, but it is not. It will be optional in BC-FTP v3, so as soon as it is published, you will not need to specify the folder attribute for the tutorial - Transfer Type: auto
- Connection Mode: active
- Finish.
- Give a look at the generated jbi.xml. You see the component configuration.
You should have a jbi.xml like that :jbi.xml<jbi:provides interface-name="generatedNs:FtpInterface" service-name="generatedNs:FtpTutorial" endpoint-name="FtpTutorialEndpoint"> <\!-\- CDK specific elements --> <petalsCDK:timeout>30000</petalsCDK:timeout> <petalsCDK:validate-wsdl>true</petalsCDK:validate-wsdl> <petalsCDK:forward-security-subject>false</petalsCDK:forward-security-subject> <petalsCDK:forward-message-properties>false</petalsCDK:forward-message-properties> <petalsCDK:forward-attachments>false</petalsCDK:forward-attachments> <petalsCDK:wsdl>FtpService.wsdl</petalsCDK:wsdl> <\!-\- Component specific elements --> <ftp:server>ftp.petalslink.com</ftp:server> <ftp:port>21</ftp:port> <ftp:user>petals</ftp:user> <ftp:password>demo</ftp:password> <ftp:folder>/</ftp:folder> <ftp:transfer-type>auto</ftp:transfer-type> <ftp:connection-mode>active</ftp:connection-mode> </jbi:provides>
- Give a look at the generated FtpService.wsdl. You see all operations available on the service.
- On the left "Petals projects" tree, right click on the Service-Unit Project : "su-FtpTutorial-provide" => Petals => Fast Export for Petals.
Known bug for Studio v1.1.0 !
Please check jbi.xml and FtpService !
"interface-name" attribute in jbi.xml and "portType name" in the WSDL should have the same value. If not, please correct FtpService.wsdl :- SELECT:
<wsdl:portType name="Ftp"> - REPLACE BY:
<wsdl:portType name="FtpInterface">
ALTERNATIVE SOLUTION:
Open the WSDL file in Studio, go on "general" tab, Clic "Helpers" on the Up-Right => Clic "Update the service end-point in the WSDL".This is a known bug in Petals Studio 1.1.0. It should be corrected in version 1.1.1
- SELECT:
- Copy-Paste the generated sa-FTP-FtpTutorial-provide.zip to Petals ESB ./install/ folder to deploy it.
- Check that the SA deployed successfully in Petals ESB traces.
Test and monitor in Webconsole
Send DIR Operation on root folder
- Start the Webconsole
- Server:0 => Text panel => Send
- Select
- Endpoint: FtpTutorialEndpoint
- Operation: dir
- MEP: InOut
- Submit
Change destination folder
- Got to ftp://ftp.petalslink.com in your web or ftp browser, using previous login. You see there is an "Integration" folder. Let's go there.
- Go to Petals Studio
- Edit FtpTutorial jbi.xml
- Change <folder>/</folder> to <folder>Integration</folder>
- Uninstall the previous SA
- Fast export for Petals ESB
Redeploy the component
- Go in Webconsole/Server:0/Administration/Service-Assemblies
- Uninstall the previous FtpTutorial SA (Stop=>Shutdown=>Uninstall)
As for installing, you can use three methods: - Webconsole. Stop=>Shutdown=>Uninstall (alternatives if needed: "force undeploy" or "clear all")
- Autoloader: Remove the corresponding .ZIP package from ./petals-platform-xxx/installed/
- Command Line: hu or hotundeploy
Expose the FTP in SOAP
Proxify the FTP operations with SOAP (15min)
Test with SOAP UI
Download SOAPUI and install it. SOAP UI is a client to send and receive SOAP messages.
Create a SOAPUIproject with the proxified FTP (10min)
Test the FTP with SOAPUI (10min)
Webconsole technical monitoring (5min)