Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Standalone Private Processes Tutorial : Running the Tutorial

Running the Tutorial
The following parts demonstrate how to run the standalone private processes on the initiator and responder machines, and how to view the audit logs.
Running the Standalone Private Processes
To run the tutorial, perform the following steps:
1.
2.
Open the runSOAPServer.bat or runsoapserver file in the TIBCO_HOME/bc/version_number/protocols/soap/samples/server directory on the responder machine with a text editor and make the following changes:
In the line SET BC_INSTANCE=%%BC_INSTANCE%%, replace %%BC_INSTANCE%% with the name of your installation, such as BC-Responder.
In the line SET JDK_DIR = %%JDK_DIR%%, replace %%JDK_DIR%% with JAVA_directory, such as C:\tibco\tibcojre\1.7.0.
In the line SET RV_DIR=%%RV_DIR%%, replace the value %%RV_DIR%% with the RV library location, such as C:\tibco\tibrv\8.4.
A sample edited runSOAPServer.bat file looks as follows:

 
@ECHO OFF
SET BC_INSTANCE=BC-Responder
SET JDK_DIR=C:\tibco\tibcojre\1.7.0
SET RV_DIR=C:\tibco\tibrv\8.4
 
SET CLASSPATH=
.;.\..\..\..\..\lib\common\configstore-core.jar;%RV_DIR%\lib\tibrvj.jar;%CLASSPATH%
%JDK_DIR%\bin\java SOAPServer SOAPServer.properties %BC_INSTANCE% body.xml header.xml

 
3.
Start the responder private process on the responder machine, navigate to the TIBCO_HOME/bc/version_number/protocols/soap/samples/server directory and run the following command on a command line:
Windows  runSOAPServer.bat
UNIX  ./runsoapserver
The sample example is performed on a Microsoft Windows machine.
Example: runSOAPServer.bat

 
C:\tibco\bc\6.2\protocols\soap\samples\server>runSOAPServer.bat
**** SOAP Server Private Process *****
listening on: AX.BC.BC-Responder.SOAP.RESPONDER.REQUEST

 
4.
Open the runSOAPClient.bat or runsoapclient file in the TIBCO_HOME/bc/version_number/protocols/soap/samples/client directory on the initiator machine with a text editor and make the following changes:
In the line SET BC_INSTANCE=%%BC_INSTANCE%%, replace %%BC_INSTANCE%% with the name of your installation, such as BC-Initiator.
In the line SET JDK_DIR = %%JDK_DIR%%, replace %%JDK_DIR%% with JAVA_directory, such as C:\tibco\tibcojre\1.7.0.
In the line SET RV_DIR=%%RV_DIR%%, replace the value %%RV_DIR%% with the RV library location, such as C:\tibco\tibrv\8.4.
A sample edited runSOAPClient.bat file looks as follows:

 
@ECHO OFF
SET BC_INSTANCE=BC-Initiator
SET JDK_DIR=C:\tibco\tibcojre\1.7.0
SET RV_DIR=C:\tibco\tibrv\8.4
TITLE SOAP Client private process
 
SET CLASSPATH=
.;.\..\..\..\..\lib\common\configstore-core.jar;%RV_DIR%\lib\tibrvlib.jar;%CLASSPATH%
%JDK_DIR%\bin\java SOAPClient SOAPClient.properties %BC_INSTANCE% body.xml header.xml

 
5.
On the initiator machine, start the initiator private process, navigate to the TIBCO_HOME/bc/version_number/protocols/soap/samples/client directory and run the following command on a command line:
Windows  runSOAPClient.bat
UNIX  ./runsoapclient
In this example, the following operations are processed:
The following text is displayed when SOAP Protocol 1.1 is selected:
Example: runSOAPClient.bat

 
**** SOAPClient Private Process *****
listening on: AX.BC.BC-Initiator.SOAP.INITIATOR.RESPONSE
 
Hit [Enter] to send request:
Sending request...
publishing on subject: AX.BC.BC-Initiator.SOAP.INITIATOR.REQUEST
Sending request:
Trading partner: SOAPServer
Operation ID: POInterface/1.0/POSync
Header: <ep:endpoints xmlns:ep="http://user.org/header" >
<ep:to>
<ep:address>
<name>Book Orders</name>
<street>1st Street</street>
<city>New York</city>
<zip>1111</zip>
</ep:address>
</ep:to>
<ep:from>
<ep:address>
<name>Book Lovers</name>
<street>1st Street</street>
<city>Los Angeles</city>
<zip>90210</zip>
</ep:address>
</ep:from>
</ep:endpoints>
<prop:properties xmlns:prop = "http://user.org/header" >
<identity>uuid:74b9f5d0-33fb-4a81-b02b-5b760641c1d6</identity>
<sentAt>2000-05-14T03:00:00+08:00</sentAt>
<expiresAt>2000-05-15T04:00:00+08:00</expiresAt>
<topic>http://electrocommerce.org/purchase_order/</topic>
</prop:properties>
 
 
Body: <cpo:CommonPO xmlns:cpo="http://po.org/body" >
<cpo:POHeader CreationDate="2000-06-23" Number="12345" Purpose="PO" Type="EZ" />
<cpo:BillTo/>
<cpo:ShipTo ContactName="BonifazLuis" ContactNumber="12345" ContactType ="CT"/>
<cpo:Item>
<cpo:ItemHeader ExtendedPrice="499.75" Price="99.95" Quantity="5" UnitOfMeasure="EA"/>
<cpo:ItemDescription Description="Word Processing Application" Type="F"/>
</cpo:Item>
<cpo:Total LineItemTotal="87" POTotal="544.15" QuantityTotal="34">12.34</cpo:Total>
           <cpo:Description>VGhpcyBpcyBhIHB1cmNoYXNlIG9yZGVyIGRlc2NyaXB0aW9uLg==</cpo:Description>
</cpo:CommonPO>
 
 
 
Attachment : po.txt
Attachment : image.gif
 
 
Hit [Enter] to send request:
 
Received message from BusinessConnect:
Status code: 200
Status message: OK
operation id: POInterface/1.0/POSync
transaction id: bcsoap:DA75A27A-5BCA-401F-930E-1B7BF0EEB59D
response header: <ep:endpoints xmlns:ep="http://user.org/header">
<ep:to>
<ep:address>
<name>Book Orders</name>
<street>1st Street</street>
<city>New York</city>
<zip>1111</zip>
</ep:address>
</ep:to>
<ep:from>
<ep:address>
<name>Book Lovers</name>
<street>1st Street</street>
<city>Los Angeles</city>
<zip>90210</zip>
</ep:address>
</ep:from>
</ep:endpoints>
response: <ci:CommonInvoice xmlns:ci="http://ci.org/body">
<ci:InvoiceHeader Date="2000-05-16" Number="12345" PODate="2000-05-16" PONumber="12345" ShipDate="2000-05-16" Type=
EZ" />
<ci:Seller ContactName="BonifazLuis" ContactNumber="12345" ContactType="CT" />
<Buyer />
<ci:Item>
<ci:ItemHeader LineNumber="1" Price="99.95" Quantity="5" QuantityDiff="10" UnitOfMeasure="EA"/>
<ci:ItemTaxReference Amount="3.75" Description="VAT" />
<ci:ItemDescription Description="Word Processing Application" Type="F" />
</ci:Item>
<ci:InvoiceSummary Amount="544.15" />
                        <ci:Description>VGhpcyBpcyBhIGludm9pY2UgZGVzY3JpcHRpb24u</ci:Description>
</ci:CommonInvoice>

 
On the Responder machine, the complete transaction is displayed as follows:

 
**** SOAP Server Private Process *****
listening on: AX.BC.BC-Responder.SOAP.RESPONDER.REQUEST
 
Request header:
<ep:endpoints xmlns:ep="http://user.org/header">
<ep:to>
<ep:address>
<name>Book Orders</name>
<street>1st Street</street>
<city>New York</city>
<zip>1111</zip>
</ep:address>
</ep:to>
<ep:from>
<ep:address>
<name>Book Lovers</name>
<street>1st Street</street>
<city>Los Angeles</city>
<zip>90210</zip>
</ep:address>
</ep:from>
</ep:endpoints>
<prop:properties xmlns:prop="http://user.org/header">
<identity>uuid:74b9f5d0-33fb-4a81-b02b-5b760641c1d6</identity>
<sentAt>2000-05-14T03:00:00+08:00</sentAt>
<expiresAt>2000-05-15T04:00:00+08:00</expiresAt>
<topic>http://electrocommerce.org/purchase_order/</topic>
</prop:properties>
 
request body:
<cpo:CommonPO xmlns:cpo="http://po.org/body">
<cpo:POHeader CreationDate="2000-06-23" Number="12345" Purpose="PO" Type="EZ"/>
<cpo:BillTo/>
<cpo:ShipTo ContactName="BonifazLuis" ContactNumber="12345" ContactType="CT"/>
<cpo:Item>
<cpo:ItemHeader ExtendedPrice="499.75" Price="99.95" Quantity="5" UnitOfMeasure="EA"/>
<cpo:ItemDescription Description="Word Processing Application" Type="F"/>
</cpo:Item>
<cpo:Total LineItemTotal="87" POTotal="544.15" QuantityTotal="34">12.34</cpo:Total>
           <cpo:Description>VGhpcyBpcyBhIHB1cmNoYXNlIG9yZGVyIGRlc2NyaXB0aW9uLg==</cpo:Description>
</cpo:CommonPO>
operation ID: POInterface/1.0/POSync
closure:9F3E47B8-54CE-42D7-B3F0-E85CF7B1C363
Attachment saved to file po.txt
Attachment saved to file image.gif
Hit [Enter] to send response:
Sending response...
publishing on subject: AX.BC.BC-Responder.SOAP.RESPONDER.RESPONSE
response header: <ep:endpoints xmlns:ep="http://user.org/header">
<ep:to>
<ep:address>
<name>Book Orders</name>
<street>1st Street</street>
<city>New York</city>
<zip>1111</zip>
</ep:address>
</ep:to>
<ep:from>
<ep:address>
<name>Book Lovers</name>
<street>1st Street</street>
<city>Los Angeles</city>
<zip>90210</zip>
</ep:address>
</ep:from>
</ep:endpoints>
 
response: <ci:CommonInvoice xmlns:ci="http://ci.org/body">
<ci:InvoiceHeader Date="2000-05-16" Number="12345" PODate="2000-05-16" PONumber="12345" Type="EZ" ShipDate="2000-05-16"/>
<ci:Seller ContactType="CT" ContactName="BonifazLuis" ContactNumber="12345"/>
<Buyer/>
<ci:Item>
<ci:ItemHeader LineNumber="1" Quantity="5" Price="99.95" UnitOfMeasure="EA" QuantityDiff="10"/>
<ci:ItemTaxReference Description="VAT" Amount="3.75"/>
<ci:ItemDescription Type="F" Description="Word Processing Application"/>
</ci:Item>
<ci:InvoiceSummary Amount="544.15"/>
                        <ci:Description>VGhpcyBpcyBhIGludm9pY2UgZGVzY3JpcHRpb24u</ci:Description>
</ci:CommonInvoice>

 
Changing the Message Type
To change the message type that is sent from the initiator to the responder by using the command-line interface, perform the following steps:
1.
Using a text editor, open the SOAPClient.properties file in the TIBCO_HOME/bc/version_number/protocols/soap/samples/client directory.
The content of the SOAPClient.properties file looks as follows:

 
#
# SOAP Client Private process property file.
#
 
#client.operationID: POInterface/1.0/PONotify
client.operationID: POInterface/1.0/POSync
client.tradingPartnerID: SOAPServer
client.encoding: ISO8859_1
#client.transactionID: uuid:1234567917
 
attachment1.name: po.txt
attachment1.contentID: <process-1@xyz.com>
attachment1.contentType: text/plain
 
attachment2.name: image.gif
attachment2.contentID: <process-2@xyz.com>
attachment2.contentType: binary

 
2.
#client.operationID: POInterface/1.0/PONotify
or
#client.operationID: POInterface/1.0/POSync
3.
Viewing the Audit Logs
To view the audit logs on the initiator or responder machines, perform the following steps:
1.
Log in to TIBCO Administrator, expand Business Connect > Log Viewer in the left panel.
2.
Click the SOAP link in the right panel.
3.
Select items from the following lists: Status, Connection, and Date Range.
4.
Click Search.
See TIBCO BusinessConnect Trading Partner Administration for information on searching the logs.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved