Petals Getting started - day 3 - Expose a FTP Service in SOAP

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (22)

View Page History

*Install and Deploy BC-FTP*
* [Download Petals ESB components|http://petals.ow2.org/download-jbi-components.html]
* [Download Petals-BC-FTP|http://petals.ow2.org/download-jbi-components.html].
* Deploy BC-FTP in Petals ESB.

*Configure and deploy a FTP Service-Unit for* *[ftp.petalslink.com]*
## Password: *demo*
## Folder: *_/_*
{note}<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{note}
## Transfer Type: *auto*
## Connection Mode: *active*

{note}
<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
{note}
# Finish.
# Give a look at the generated _jbi.xml._ You see the component configuration.
You should have a jbi.xml like that :
# Look the generated _jbi.xml_ component configuration. It should look like:
{code:lang=xml|title=jbi.xml}<jbi:provides
interface-name="generatedNs:FtpInterface"
</jbi:provides>{code}

# Give a look at the generated _FtpService.wsdl_. You see all operations available on the service.
# Look the generated _FtpService.wsdl_ sources. Operations available on service are described here.
# On the left "Petals projects" tree, right click on the Service-Unit Project : "_su-FtpTutorial-provide_" => Petals => Fast Export for Petals.
{note:title=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_ :

This is a known bug in Petals Studio 1.1.0. It should be corrected in version 1.1.1{note}
# 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.
# Drop the generated _sa-FTP-FtpTutorial-provide.zip_ to ./_petals-platform-xxx/install/_ folder to deploy it.
# Check Petals ESB traces to be sure the SA was deployed successfully.

h2. Test and monitor in Webconsole
# Start the Webconsole
# Server:0 => Text panel => Send
# Select:
## Endpoint: FtpTutorialEndpoint
## Operation: dir
## MEP: InOut
# Submit
The response message should list files on the Ftp.

*Monitor services*
h2. Test with SOAP UI

*Install SOAP UI*
[Download SOAPUI|http://sourceforge.net/projects/soapui/] and install it. SOAP UI is a client to send and receive messages with SOAP messages. protocol.

Create a SOAPUIproject with the proxified FTP (10min)
*Find the WSDL URL*
# You just deployed _sa-SOAP-FtpTutorial-consume_. Look at Petals ESB traces. Among the last messages, find one similar to the one following. And find the root URL, here "http://127.0.0.1:8084"
# Copy the SoapFtpTutorial WSDL URL

Test the FTP with SOAPUI (10min)
*Create a SOAP UI Project*
# Lauch SOAP UI
# PetalsFtpTutorial => FtpServiceSoapBinding => dir.
# Right clic on "Request1" => Show Request Editor: A window with a pre-generated messages appears
# Delete the optional part of the message ( <connection> node and all its children)
{code:lang=xml|title=Your message looks like this}
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ver="http://petals.ow2.org/components/ftp/version-3">
Try reading "HelloWorld.txt" into "Integration" folder.{info}

Webconsole technical monitoring
*Webconsole technical monitoring*
# Activate monitoring on Webconsole
# Send a few test message
This was more "real" usecase, hum ? Difficulty goes increasing, your knowledge as well.


*Tomorrow you will create a Petals service based on a custom Java class (annotated JSR 181)*