Track 1 demonstrates an existing interface's main activity, transferring files from a data producer to a data consumer, while assuming that a default B2B interface had already been constructed. Track 2 takes a step back in order to introduce 2 new admin actions - each with its own HttpForm - required to actually setup a new B2B interface. Due to the constraints of the Demo and to restrictions on the scope of the software install, the topics and the subscriptions that you create with the demo Forms will not persist in a DataBase. Rather, each form submission binds the entities ( Topic, Subscription ) to your Session. For as long as your session lasts ( about 20 minutes ) you may run command line demos that trigger data interface activity on your new Topic and Subscription.
The First form binds a Topic to your session. One text field needs to be completed on the left of this
form.
Enter a name for your topic.
When you have filled it in use the submit topic button
.
The URL for the real form is
here.
The webapp requires authentication, so on a challenge, use the following for credentials:
Submission of the second form binds a Subscription to the session. Note that
successful creation of any
subscription is mirrored by a specific ChannelData Command (CDC) and that it's the
CDC that actually gets connections and moves data. Whenever a
Publish Event
occurs on your new topic, the Post Office dispatchs the
Channel Data Command as an Event Handler
to transfer data.
See Output Part 2
below for more details.
This time you complete 4 fields on the right hand side of this
form.
Set Server IP Value to any valid IP Address where there exists an FTP daemon
for which you posess valid Credentials. As an example, you may use the
IP="66.35.250.221"
for server, and the values
"anonymous"
and
"yourmail@myIsp.com"
for credentials.
Anything can be supplied for File Name
because this property is not used.
Successful submission of the form creates a CDC and returns it to the browser in this
view.
Any data that
is interfaced to this subscriber (66.35.250.221) will be deleted at the end of 24 hours.
Get a command shell on your system and enter the command line below, adjust it to the path requirements of your system, remembering Windows conventions require all the information on a single line and with a "\" as the path separator. Refer to help with Shell commands.
bin/b2bpo data.topic.name=yourtopic data.source.sourcedirectory=/data/outbnd data.source.regex=tm11.*
The above expression data.source.regex=tm11.*
,
results in an interface sending 2 files to the destination system defined by the
values provided to the Subscription Form.
This works because of a Demo Default scenario where
resources in the download include a couple of files in the
/data/outbnd
directory
that match the regex
property above.
You may change the values of these 2 properties and you may send your own files across the interface by using new values to point the properties at directories and files on your PC or LAN. Adjust the following properties to send your own files:
data.source.regex
and data.source.filename
are mutually exclusive, USE ONE OR
THE OTHER.
Instructions for setting properties are available by going to
Instructions(long)
and scrolling down to the command line parm
entry.
Note: demo will limit fileSizes to 20K. Larger files will be ignored unless you
really dig thru the install package to discover the workaround.
-- listing properties -- data.topic.action=publish data.source.sourcedirectory=\data/outbnd data.source.filename= rename.session.id.disp.from=0 wsdl.service.addr.port.name=urn:EchoAttachmentsService rename.session.id.disp.to=15 wsdl.service.addr.axis.webapp=axis/services data.source.regex=tm11.* soap.rpc.methodname.attachment=postFile wsdl.service.addr.host=http://localhost:80 data.source.lastfile=2001-11-01T15:23:30.609-08:00 data.topic.name=yourtopic ws.invocation.typ=soapconnparms
------=_Part_1_2545159.1062955328946 Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: binary Content-Id: <3990206B81F992EAB4BF692D2138096D> <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:postFileResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:EchoAttachmentsService"> <ns1:postFileReturn href="#id0"/> </ns1:postFileResponse> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" href="cid:6E694A6450ACC1E64539F645C4B5A4CC" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://xml.apache.org/xml-soap"/> </soapenv:Body> </soapenv:Envelope>
<exchangeSession> <session>3B6258C0887C26CABF7472F7F0E6FAC4</session> <asof>2003-09-10T13:34:48.128-08:00</asof> <endson>2003-09-10T13:34:48.128-08:00</endson> <host> <server>66.35.250.221</server> </host> <client> <username>anonymous</username> <password>******</password> </client> <items> <fileAssociation> <source> <filename>fff</filename> <sourcedirectory> G:\jakarta-tomcat-5\dist\work\Catalina\localhost\axis </sourcedirectory> <regex>DE2B887FF27FF18.*</regex> <lastfile>2003-09-10T13:34:48.128-08:00</lastfile> </source> <target> <targetdirectory>incoming</targetdirectory> </target> </fileAssociation> </items> </exchangeSession> </network_file_exchange> ------=_Part_1_2545159.1062955328946--
First wait 30 Seconds while the Dispatcher
at the Post Office
and threads that it runs perform the actual interface work,
getting subscriber connections and sending files over the connections.
Then, by going to the following URL
( if you used the suggested IP Address for the Subscription ) and observing files
within the list having a name
matching the value of the regex
element in
Output Part 3
above:
incoming
directory and then CD into it.
From there, you get the proper filelist.
Completing the example, note that in this snapshot
listing of files preserved at the time
that the sample demo was run,
you see DE2B887FF27FF18
as the prefix of 2 files interfaced
by the demo.
File Renaming:
As evidenced by 2 files that started this example on your PC with names like
tm1102a.txt
and finished up on SourceForge's Server named as
DE2B887FF27FF18testRpc0.txt
,
file renaming
is a software feature designed to preserve flexiblity
in managing the requirements for logging, for de-coupling and for availability.
More information on file renaming
is available by going to
Help then scrolling the table
for the following entries:
Output Part 3
contains the Channel Data Command whose property values
for server
and for target
determine where the data will be sent to.