SYNERGY-E-NEWS
News and Updates for Synergy/DE Developers

July 28, 2011

 
Upgrading to Synergy/DE 9.5.1a?
Both electronic and hard-copy versions of the new documentation are available

While many software companies have stopped printing product documentation, we have found that some of our customers prefer hard-copy manuals to electronic ones. In our continuing efforts to be "green," we are now able to offer manuals that are printed on demand. This means you can order just one printed manual or the entire set of 6,224 pages of documentation. It’s quick, easy, and environmentally friendly.


Spotlight on CodeExchange
Generate xfMethod and xfParam attribute statements from existing Synergy source code or your current SMC data

Many customers have expressed interest in implementing xfAttributes, which were introduced in Synergy/DE 9.3, to simplify and automate updating of the Synergy Method Catalog for use with xfServerPlus. But the task can seem overwhelming. Now, there's an offering in CodeExchange to help you get started.



Platform News
Read a selection of recent articles from around the web

xfNetLink Java and Encryption
By Mark Cooper, Sr. Systems Software Engineer

In Synergy/DE version 9.3 we added support for network encryption for the xfNetLink .NET and xfNetLink Synergy clients. With 9.5.1a, you now have the ability to use encryption with xfServerPlus methods when connecting to an xfNetLink Java client.

In order to use encryption with a Java client, you will need to set up xfServerPlus to run in encrypted mode using OpenSSL.


PSG Blog: Exposing WCF Services Using xfNetLink .NET
By Steve Ives, Sr. Synergy/DE PSG Consultant

In an earlier post I briefly mentioned that it is now possible to use xfNetLink .NET to expose a Windows Communication Foundation (WCF) service. In this post I will drill down a little deeper into the subject and show you exactly how to go about doing so.


PSG Blog: All Hooked Up (Circa 1957, Elvis Presley)By Richard Morris, Sr. Synergy/DE PSG Consultant

Back in the day, Elvis Presley shook up a bit of a stir when his gyrating hips and dulcet tones came over the airways onto our little black and white TVs (so I was told, I’m not old enough!).  Today, Synergex is defining a development that will shake the Synergy world when it’s released with [...]

View the rest of the post

Quiz
Synergy/DE pros, see if you can answer this question!

Given the following function:

function total, ^val, varargs
record
	arg	,int
	sum	,int
proc
	clear sum
	for arg from 1 thru %numargs
	  sum += ^argn(arg)
	freturn sum
end

What is the return value if the function is called like so:

	%total(1,2,,3)
 


Upgrading to Synergy/DE 9.5.1a? Don’t Forget the Documentation!
Both electronic and hard-copy versions of the new documentation are available

More than 6,000 pages of documentation are available to you, both hard-copy and electronic.

While many software companies have stopped printing product documentation, we have found that some of our customers prefer hard-copy manuals to electronic ones. In our continuing efforts to be “green,” we are now able to offer manuals that are printed on demand. This means you can order just one printed manual or the entire set of 6,224 pages of documentation. It’s quick, easy, and environmentally friendly. To order hard-copy manuals, visit http://www.synergyde.com/products/documentation/purchase_manuals.aspx.

And of course the manuals are always available to you electronically to download or view on our Web site.



xfNetLink Java and Encryption
By Mark Cooper, Sr. Systems Software Engineer

In Synergy/DE version 9.3 we added support for network encryption for the xfNetLink .NET and xfNetLink Synergy clients. With 9.5.1a, you now have the ability to use encryption with xfServerPlus methods when connecting to an xfNetLink Java client.

In order to use encryption with a Java client, you will need to set up xfServerPlus to run in encrypted mode using OpenSSL. See the Developing Distributed Synergy Applications: Using xfNetLink & xfServerPlus manual for detailed instructions. When setting up xfServerPlus for encryption, you will need a certificate (.pem) file. This file will also be used by the Java client. You can get one from a certificate authority or you can create one with OpenSSL.

Once you have a certificate file and xfServerPlus is running in encrypted mode, you will need to add the certificate file to the Java keystore file that the Java encryption libraries will use. The xfNetLink Java client uses the standard encryption libraries that are part of the JRE. These libraries require you to add your certificates to a keystore file. The JRE comes with a default keystore file that contains certificates from several well-known certificate authorities. The default file, named cacerts, is located in the java.home\lib\security directory and has a default password of “changeit”. Every time you update your JRE, you will also get a new cacerts file. To simplify this step in the process, Synergex supplies a Java utility named genCert. We recommend that you use this utility to add your certificates to the default keystore file and save it with a new name. This way, when you update the JRE, your certificates will not be lost.

When you run the genCert utility, it connects to your xfServerPlus host and port to retrieve your certificates. It then creates a copy of the distributed cacerts file, adds your certificates to it, and saves it with a new name. You can put the new keystore file in any location you wish and direct the Java client to use this keystore file when using encryption. There is also a Keytool Java key and certificate management utility that you can use to maintain and list the certificates in the keystore file. See the Javadoc for more information on this utility.

Once your certificates have been added to the keystore file, you can then use encryption the same as you would with the other clients. You have two choices: master or slave encryption. Master encryption encrypts all method calls between xfNetLink Java and xfServerPlus, while slave encryption allows you to use the Method Definition Utility (or xfAttributes) to specify which methods you want encrypted. The advantage to slave encryption is that because it allows you to encrypt only the methods that will pass sensitive data, it is more efficient.

The xfServerPlus side controls the mode of encryption being used and the level of cipher suites to choose from. When you start xfServerPlus, you will choose to use either master or slave encryption on a port. On the Java side, you will need to regenerate your Java class wrappers if they already exist before you can start using encryption. You must also tell the encryption routines which keystore file you will be using and its password. You can do this either by setting properties in the xfNetLnk.ini file or at the generated component level by calling the setSSLCertFile and setSSLPassword methods.

Both the xfServerPlus and the Java side will need to be able to support the same cipher suite before encryption can begin. When you first connect to an xfServerPlus encrypted port, the encryption handshaking occurs, SSL ciphers are negotiated, and the cipher suite is chosen.  The suite used depends on the level of encryption specified when xfServerPlus was started—high, medium, or low. If a cipher suite cannot be negotiated, or if the certificate has expired, the connection will fail and an exception will be thrown.

You do not need to make any changes in your code; just make your method calls and the data will be sent over an encrypted socket. With master mode, all calls will be encrypted and passed over SSL encrypted sockets. With slave mode, only the methods marked as encrypted will be passed over SSL encrypted sockets; non-encrypted calls will be transported on standard sockets, which will be much faster. Depending on the level of encryption used and the cipher suite, the time will vary per call as all data passed must be encrypted and decrypted on each end. Because the cipher negotiation is made for each connection, you will get the best performance if you make a connection, perform all of your method calls (rather than a single call), and then disconnect. Using pooling can also improve performance because the connections (and therefore the cipher negotiations) are made when the pool is first populated. When using logging, encrypted method calls and parameters are not displayed in the logs, so be sure to have your calls working before using encryption. For more information about xfNetLink Java and encryption, see the Developing Distributed Synergy Applications: Using xfNetLink & xfServerPlus manual.



PSG Blog: Exposing WCF Services Using xfNetLink .NET
By Steve Ives, Sr. Synergy/DE PSG Consultant

In an earlier post I briefly mentioned that it is now possible to use xfNetLink .NET to expose a Windows Communication Foundation (WCF) service. In this post I will drill down a little deeper into the subject and show you exactly how to go about doing so.

Click to read the rest of the post.


PSG Blog: All Hooked Up (circa 1957, Elvis Presley)
By Richard Morris, Sr. Synergy/DE PSG Consultant

Back in the day, Elvis Presley shook up a bit of a stir when his gyrating hips and dulcet tones came over the airways onto our little black and white TVs (so I was told, I’m not old enough!).  Today, Synergex is defining a development that will shake the Synergy world when it’s released with an upcoming version! 

Click to read the rest of the post.

 

 

Free Code for Synergy/DE Customers
Generate xfMethod and xfParam attribute statements from existing Synergy source code or your current SMC data

Many customers have expressed interest in implementing xfAttributes, which were introduced in Synergy/DE 9.3, to simplify and automate updating of the Synergy Method Catalog for use with xfServerPlus. But the task can seem overwhelming. Now, there's an offering in CodeExchange to help you get started. The createDoc program helps generate the xfMethod and xfParam attribute statements either from existing Synergy source code or from your current SMC data. You'll still have to do some editing and a little cutting and pasting, but it should make your transition from the tedium of MDU data entry to the reliability of xfAttributes a little easier.



Synergy/DE Tech Tip
Too many columns returned by query

Question:
When I try to run my SQL Connection program, I get the error “MANYCOLS: Too many columns (260) returned by query.” What can I do to fix this?

Answer:
As the error message says, there are too many columns. The default maximum is 254. You have two options: You can either modify the query to return fewer columns, or you can use the argument for %SSC_INIT to increase the number of columns that a query can return. For more information, see %SSC_INIT in the “Database Functions” chapter of the SQL Connection Reference Manual.



Quiz
Synergy/DE pros, see if you can answer this question!

Given the following function:

function total, ^val, varargs
record
	arg	,int
	sum	,int
proc
	clear sum
	for arg from 1 thru %numargs
	  sum += ^argn(arg)
	freturn sum
end

What is the return value if the function is called like so:

%total(1,2,,3)

At what position in the data structure does the field "x" referenced in the window begin?

a. 1
b. 3
c. 6
d. a runtime error





Platform News
Read a selection of recent articles from around the web

Windows

Unux

OpenVMS


Announcing the Q2 Support Survey Winner
Is it you?

If you’re Allan Shikhvarg of WellPartner it is! Allan is the winner of the Q2 Developer Support Survey contest and the recipient of a $100 gift card! Wellpartner is a nationally recognized provider of pharmacy distribution solutions for health plans, Medicaid programs and safety-net organizations throughout the country. Dedicated to lowering the cost of medications, Wellpartner offers innovative approaches that improve pharmacy care for individuals through the use of home delivery pharmacy fulfillment and retail Contract Pharmacy services.

Want a chance to win? Let us know what you think! Customer satisfaction with our Developer Support is monitored and enhanced through the distribution of satisfaction surveys upon the closing of each support case. Each quarter, we choose a winner by randomly selecting the name of a customer who has completed a survey after working with Developer Support. So, next time you call on us for support, let us know how we did, and you could win $100 just for giving us your feedback.

Thanks to everyone who completed a Developer Support survey in Q2, and we look forward to hearing from you again.

If you do not currently have Synergy/DE Developer Support, contact your Synergy/DE account manager for more information.