Q: Tibco BW Instance Specific variable in tra file - tibco-business-works

I am a Tibco Administrator and one of our developers is requesting for me to make a change to the tra file for a property called bw.platform.services.retreiveresources.Hostname. I see the property defined in at the par level but since it is a hostname they need it to be defined for each Process archive we have two server instances.
The reason I don't want to make the change in the tra file is because when we deploy; the changes get lost. We have many apps and it will be a nightmare to keep track of all these changes in the tra files every time we have a deployment.
Since I am not a develper and could you please tell me in simple terms how this can be done in Tibco without modifying the tra file. So I can pass along the info to the develpers.
Thank You

This property is used to set the hostname for WSDL client retrieval and defaults to "localhost" as far as i know.
It doesn't need to be set on TRA level but could also be set in TIBCO Administrator on the Process Archive Level.
As you mentioned there are 2 instances hosted for each services (i assume on 2 different hosts).
So by that i would assume there's a load balancer configured in front that (as i would consider a good practice) would rewrite the hostnames in the wsdl by a rule.
Depending on your configuration of the bw engine boxes i would leave it to 0.0.0.0 or localhost and let the load balancer rewrite the WSDL IP to clients to not directly expose it there.
Hope that helps
Seb

This is used to retrieve WSDL instead of retrieve process

Related

SSL Proxy / Decryption?

One of my clients just received the software ordered from his chosen developers, asked me to look at it and prepare the hosting procedures.
It's an Java (jar) app, so far so good ... but I saw something suspect, every 60 minutes or so the software connects to a remote host :443 port using SSL and transferring ~ 3-10 MB of encrypted data (as POST) then closes the connection, this is very strange. Tried to wireshark it but everything is encrypted and I have no clue about what kind of data is transferred, I know only the destination hostname. The hosted data within the app will be highly sensitive (insurance-broker) and if my client decides to go with it - this is a serious issue for his business and also for his clients, I've asked the developer company about this and they said that no one added something like this even if I provided them the proff (pcap).
I can block it within firewall, but if they added something like this it could exist another hosts ready to receive the encrypted data.
The only way I can figure it out is to somehow decrypt the SSL traffic in order to read RAW data and give my client all the needed informations in order to talk with the developer company to sort it out, how can I do that ? With some sort of ssl-proxy or whatever ... tried to google it but didn't find any kind of relevant tutorials.
I have access to the physical machine which is running the Java application, I can see every single bit of the traffic but ... encrypted.
If I was in your place instead of trying to decrypt ssl connection would have tried following steps:
1)Since you are aware of the host to which it is making a post request , find out more about that service so as to learn what it does ? May be try contacting that site saying that we need to consume your service what should I send my in post request ;)
2)Second way around would be if you can decompile the jar file and find line in the source code which makes that request and then you could go back to the developer asking as why this has been written. To find the source code which is making the call what you could do is block the host access on your firewall.
The code would fail and mostly probably he would have logged the exception in his log files. Find the stack trace and you will know the line of code that is
making that request.
Hope this helps.

IBM MobileFirst - Properties files

I have a MobileFirst APP, calling three web services, when I call these Web services, using an IP (localhost), but when I connect my mobile PC have to use another IP calls, and then have to use other production.
To make it easy and comfortable setup, as I can do in MobileFirst, it is the worklight.properties file?
Greetings and thank you,
That's some crazy English going on there...
If your question is really "can I save the web service IP address (that I am using in my adapter XML file) in a variable in worklight.properties, so that different IPs will be used for my adapters in different environments (DEV, QA, PROD)" - yes.
I believe that in this case JNDI properties will not help, but you could do the following.
You will need to create a different copy of worklight.properties per the environment you want to test at, and in each file add custom properties, for example:
myWebServiceIP=192.168.123.1 (you'll need to change this value per file)
Then in the adapter XML file, use it like this:
<domain>${myWebServiceIP}</domain>

How can I control the case of the SchemaLocation in the generated wsdl of a wcf service?

We've got two web servers (win2008 sp2) load balanced. On one of the machines the service name (e.g myService.svc) portion of the SchemaLocation url that is generated in the wsdl types is camelCased while on the other server it is PascalCased (e.g. MyService.svc). Some php soap clients have an issue with this and interpret them as separate urls and end up with duplicate type definitions.
The code is the same on both servers - i've copied it from one to the other to make sure. I've been trough IIS (where i'm guessing the problem may be) however I cannot find anything that would control or affect the casing of only the service name portion of the url. I've even tried renaming the physical file (myservice.svc) to lower case however that had no effect.
Has anyone else had this or can point me in the right direction?
Many thanks.
You can add a configuration attribute httpGetUrl to the service behavior metadata to control what goes into the WSDL SchemaLocation value. This blog post explains how you would do it for the the domain name but it should work for the whole URI.

CL based method for adding HTTP Servers on IBMi system

I have a need to develop a CL script to quickly deploy a web application across a set of IBMi systems.
Right now, I have everything set up where I can create the directories, deploy the configurations (with the correct modifications) and place the files all from the CL script, but I cannot get it to automatically create and start the HTTP Server.
All of the documentation I can find requires that the servers be set up through the "IBM Web Administration for iSeries interface." Which is pretty much useless if I am trying to automate the entire system.
The only CL commands I can find which are of use are STRTCPSVR and ENDTCPSVR . However, there does not seem to be a clear way to add the server to the underlying system to start it.
Does anyone know of a CL command that does this? If not, is there an object/member I can edit which would add a server to the HTTPA, set it to point to the already set up htdocs and conf directories and then I can start it with STRTCPSVR?
See the Create Apache Server Instance (QzuiCreateInstance) API for a method to automate the creation of http instances.
The QzuiCreateInstance() API allows users to create a new IBM® HTTP Server for i server instance.
Also the QUSRSYS/QATMHINSTC file contains a member for every configured instance. Each member has one record that contains an entry in the format of -apache -d /www/instancename -f conf/httpd.conf. You may be able to create members and add the record without using the API.
Refer to:
How to Manually Create a HTTP Server
About_HTTP_directives_for_CGIDEV2
http://compgroups.net/comp.sys.ibm.as400.misc/create-an-apache-instance/1345746
Quick Summary:
Each HTTP server instance requires its own member in QUSRSYS/QATMHINSTC
/QSYS.LIB/QUSRSYS.LIB/QATMHINSTC.FILE/<SERVERNAME>.MBR
The member above should contain one record
-apache -d /www/<SERVERNAME> -f conf/httpd.conf -AutoStartN
Refer to /www in the IFS for for the file structure of the HTTP Server
Use <IBMi>:2001/HTTPAdmin/ to create a sample HTTP server, which can be used as the basis for future generated HTTP Servers.
Starting / Stopping the HTTP Server instance
srtcpsvr *http httpsvr(<SERVERNAME>)

HSQLDB equivalent of H2 automatic mixed mode

Is there one? Apparently not. The H2 automatic mixed mode is described
here.
Revival for further reference.
As stated by #fredt, as far as I know, there is no official magic parameter to achieve mixed mode.
Still, you can always start a server programmatically using a Server object so that other process are able to connect to your database.
I discovery a trick to accomplish something pretty close to mixed mode. In order to do that you will need to set the remote_open property to true and connect using this form of URL.
The idea here is doing something like this:
Try connecting to the server using the kind of URL stated above.
If you can't connect it means the server haven't been started, so go ahead and start the server programmatically.
When you connect again, one of three things will happen.
If no database file exists, one will be created in the specified file path and the server will start serving it from the URL alias.
If the database file exists and it isn't being served, the server will open the file from the specified path and start serving it.
If the database file exists and it is being served, the server will simply return a connection.
I'm not sure if it is safe to use that kind of pattern when you plan to spawn a lot of short lived processes (particularly I haven't dive into HSQLDB code to check how it handles database / creation / opening for multiple simultaneous requests when remote_open is set). Still, I've been using this kind of pattern to share development databases between Web Applications for a while and never ran into a single database corruption problem.
The main limitation here is that when the application acting as a server is closed, open connections will stop working and throw Exceptions... Which is not an Issue for my development environment, here this will generally only means one or two broken requests until another server is started and the connection pool detects and renews its connections.
No HSQLDB does not support such a mode.