Configuring the Web application to receive messages via SOAP
To configure the WebAccess to receive SOAP messages and save them to MACom in the PipeChain server you must edit the servlet.properties file. This file should normally be located in [Tomcat folder] /webapps/mywebapp/custom/0/WEB-INF folder. In the servlet.properties you must define if the files should be saved to the PipeChain server or to file, see Mandatory Properties below. You may also define the UserName and Password to be used to log on to the PipeChain server in the servlet.properties file. If this is not defined it must be supplied in the URL.
The full list of parameters that can be used in the servlet.properties file and in the URL is stated below under optional properties.
Mandatory properties in servlet.properties
pipechain.clientloginresource = rmi://localhost:1099/PipeChain.ClientLogin
pipechain.soapReceiverType=DATABASE
pipechain.clienttransformat=XML
Conditional properties in servlet.properties
You may either state UserName and Password used to log on to the server and the Channel to store the message on in the servlet.properties-file (these will then be default values):
pipechain.clientuser=username
pipechain.clientpassword=password
pipechain.clientchannelid=soap
or you can state them in the URI (which overrides the values defined in the servlet.properties file):
http://localhost:8080/pipechain/soap?ChannelID=soap&UserName=username&Password=password
Processing of the message
When a message arrives at the web application it will be “stripped” from the SOAP elements and the message will be retrieved.
After this the web application will log on to the PipeChain server.
The MACom Channel to be used must have the Receiver process started.
If there is an incoming converter on the channel the message will be converted.
After the optional conversion of the message it will be stored on the PipeChain server.
When the message is successfully stored on the server, the web application will reply with the success message to the sender, with the HTTP status 200 (OK).
If something fails the web application will reply with the SOAP fault message to the sender, with the HTTP status 500 (internal error), unless the property setstatusok=true is set in the URL. In this case the status will be HTTP status 200.
Optional properties in servlet.properties
pipechain.soapReceiverType=FILE
Will store the message as a file on the server
pipechain.targetDir=[C:\rcv\in]
The directory to store the file in when the receiver type is FILE
pipechain.useSemaforFile=[true/false]
Defines if a semaphore file should be created or not when the receiver type is FILE
pipechain. tmpDir =[C:\rcv\tmp]
The directory to store temporary files in when the receiver type is FILE
pipechain. clienttransformat=CLASSIC
If the channel is expecting classic transactions.
pipechain. savesoapheaders=[true/false]
If PipeChain should keep the soap headers in the message when storing it in MACom.
Optional parameters in the URL
setstatusok = [true/false]
If set to true, PipeChain will return HTTP status 200 (OK) if there is an error processing the SOAP message. The reason for the error will be reply message in the Fault element.
If set to false or not stated, PipeChain will return HTTP status 500 (Internal Server Error) if there is an error processing the SOAP message. The reason for the error will be reply message in the Fault element.
contenttype
The contenttype property is used to set the content type in the reply message from PipeChain. If not stated PipeChain will return “application/soap+xml; charset=ISO-8859-1”.
ChannelID
The ChannelID property is used to defined which Channel shall receive the SOAP message. Channels may have different converters and/or different authorization on which Sites / Businesses the SOAP message may update.
If ChannelID is not stated in the servlet.properties file is must be supplied in the URL.
UserName
The UserName property is used to defined which UserID should be used when logging on to the PipeChain server. Different users may have different authorization on which Sites / Businesses they are allowed to see / update. If UserName is stated in the URL the Password must also be stated.
If UserName is not stated in the servlet.properties file is must be supplied in the URL.
Password
The password for the User stated in the UserName property.
debug = [true/false]
If debug is set to true, debug information will be written to the Tomcat log files.
If debug is set to false, no debug information will be written to the Tomcat log files.
The default behavior is defined by the property pipechain.debug in the servlet.properties file (if not stated there, false is the default) and may be overridden for each message sent to PipeChain by the parameter in the URL.
savesoapheaders = [true/false]
If savesoapheaders is set to true, PipeChain will remove the SOAP Headers before saving it to the PipeChain server. This will make the message look the same as if it was sent to PipeChain via another protocol (like ftp, mail, folder etc).
If savesoapheaders is set to true, the SOAP message will saved “as is”.
The default behavior is defined by the property pipechain.savesoapheaders in the servlet.properties file (if not stated there, false is the default) and may be overridden for each message sent to PipeChain by the parameter in the URL.