Thursday, March 10, 2016

Sequence Numbers in eText templates

 

As I said earlier, Oracle’s eText template is really painful to work with. Its does not have support variables or arrays, so when the need arises to have something temporarily stored somewhere, you are lost. The one thing eText does have, is a method to generate sequence numbers. Basically you use the DEFINE_SEQUENCE command.

image

The define sequence command has four subcommands: reset at level, increment basis, start at, and maximum. The increment basis subcommand specifies if the sequence should be incremented based on record or extract instances. The allowed parameters for this subcommand are RECORD and LEVEL. Enter RECORD to increment the sequence for every record. Enter LEVEL to increment the sequence for every new instance of a level.  cleartext.blogspot.com

To generate the sequnce numbers, use the SEQUENCE_NUMBER function in the template.

image

But what if you just want to keep count of something, and not count levels or records in the data ? Just leave out the INCREMENT_BASIS completely.  cleartext.blogspot.com

image

So now, whenever SEQUENCE_NUMBER function is called, the current value will be printed, and the counter will be increased by 1. This happens everytime the function is invoked.

There are some payment interfaces where the number has to be incremented in steps of 5 or 10. For example, one of the ADP checkprinter format template requires a counter to start at 30, and be incremented in steps of 5. So its 30, 35, 40, 45…

To do that the SEQUENCE_NUMBER function should be used with some mathematics.

image

 

 

Originally published on cleartext.blogspot.com

Wednesday, March 2, 2016

.NET : No endpoint element matching this contract could be found in the client element

 

If you are using .NET and trying to integrate to Oracle Fusion Cloud service, any service, HCM,Sales Cloud, Service Cloud.., after consuming the WSDL and writing the first bits of code, you will get to this error:

cleartext.blogspot.com

Could not find default endpoint element that references contract ….' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

image

You will get the error wether you try importing as Web Reference or Service Reference. The reason for this is that even after successfully consuming the WSDL, .NET does not add the end point configuration into the app.config file.

 

1: Possible workaround: When you write the code to create the client object, (SalesCloud account, in my case), instead of going with the default no parameter initialization,  add parameters for Binding and Endpoints.cleartext.blogspot.com

 

VB.NET : Add this code to your project source:

Public Class UsernameTokenOverSslBinding : Inherits CustomBinding
    Public Sub New()
        MyBase.New()
    End Sub
    Public Overrides Function CreateBindingElements() As BindingElementCollection
        Dim bindingElements As BindingElementCollection = New BindingElementCollection
        bindingElements.Add(SecurityBindingElement.CreateUserNameOverTransportBindingElement())cleartext.blogspot.com
        Dim messageEncoding As MtomMessageEncodingBindingElement = New MtomMessageEncodingBindingElement
        messageEncoding.MessageVersion = MessageVersion.Soap11
        bindingElements.Add(messageEncoding)
        Dim transport As HttpsTransportBindingElement = New HttpsTransportBindingElement
        bindingElements.Add(transport)

        Return bindingElements.Clone()
    End Function
End Class

 

C# .NET: Add this code

 

 public class UsernameTokenOverSslBinding : CustomBinding     {         public override BindingElementCollection CreateBindingElements()         {
cleartext.blogspot.com
            BindingElementCollection bindingElements = new BindingElementCollection();             bindingElements.Add(SecurityBindingElement.CreateUserNameOverTransportBindingElement());             MtomMessageEncodingBindingElement messageEncoding = new MtomMessageEncodingBindingElement();             messageEncoding.MessageVersion = MessageVersion.Soap11;             bindingElements.Add(messageEncoding);             HttpsTransportBindingElement transport = new HttpsTransportBindingElement();             bindingElements.Add(transport);             return bindingElements.Clone();         }     }
 
Now pass this class object as the first parameter to your Interface Object Initialization.
Example: Previous code:
Dim accountclient As New OSC.AccountServiceClient()cleartext.blogspot.com
New code

Dim endpointAddress = New EndpointAddress(New Uri("URL”))  ‘ give the url here.
Dim accountclient As New OSC.AccountServiceClient(New UsernameTokenOverSslBinding(), endpointAddress)

 

…And thats it ! The object will now be able to connect to the server via a webservice call.

cleartext.blogspot.com

2: Possible workaround:  The other possible workaround is to add these lines to app.config file.

 

image

cleartext.blogspot.com

 

Any of these workarounds, and you should start seeing the response object:

image

Monday, February 22, 2016

eText : Conditional NewLines


Continuing this series on my rants on eText template. I came across what looked like a pretty straightforward requirement from a customer. They wanted a conditional newline in the generated output. Instead of printing each XML record in a new line, the ask was to print four XML records in one text line. Batches of four. So a newline had to be printed after each 4 XML records. cleartext.blogspot.com
If you refer to the Oracle documentation on the eText template, there is a place to specify the New Record charachter.

image
The instruction ‘Carriage Return’ inserts a new line charachter just before the command <NEW RECORD> appears in the template. So conditionally insert a new line in a template, the Carriage Return has to be set to NULL. cleartext.blogspot.com
image
And then begins the tedious part. All through the template, whenever you need to insert a new line, you have to print the charachter using the CHR command. cleartext.blogspot.com
Example:   image
Another One:  image

And to conditionally print a new line after 4 xml records, the MOD command has to be used to calculate the position. Like so:
image

Its tedious, but thats the only way to do it in eText. cleartext.blogspot.com


cleartext.blogspot.com

Wednesday, February 10, 2016

Aaron’s Blog for TCC

 

There are not much sites/blogs that discuss Taleo’s Connect Client (TCC), the only documentation is on Oracle sites. But I ran into this really helpful blog, the most unlikely place you could find TCC tips. Aron Asberry’s blog has tonnes of TCC tips and fixes for standard errors.  This guy has 6 monitors running for his Taleo related work, surely a heavy weight.

Hope that helps !

Friday, January 29, 2016

Oracle Kills Off The Java Plugin

 

Oracle has announced that they will be killing off the Java Plugin. Chrome and Firefox are removing support for plugins anyway, so the Java plugin is a vestigial security risk leftover from an earlier web.

 

image

Saturday, January 23, 2016

eText woes

 

What is the worst report template to work with ? After 9 years of working on varous Oracle report template formats, I am happy and frustrated to report that that would the the eText BIP template from Oracle.

cleartext.blogspot.com

It is commonly used to generate Payment Texts, to be processed by banks and other financial institutions, like ADP. It is the only Oracle template which can generate output in .txt format. It has very little functions, and all the documentation can be summarized to this one page. That’s it. All the functions and settings which can be used on the eText template is right there. The output of this template is not meant to be human-read, it is always meant to be transmitted to a banking or payment system via secure ftp. From the initial version of the template system, no new function has been added. So it is kinda version independent, there is no dependency on what version of BIP you have installed. eText templates designed on older versions of BIP will happily work on newer versions. And vice versa. But this is probably the only good thing ever about this template format.

cleartext.blogspot.com

Whereas BIP RTF templates also have some functions supported, there are ways to inject some xslt/xdofx functions in different namespaces into them. So this gives rise to redundant, but useful bunch of functions. And there is an added functionality of writing xsl templates within BIP RTF templates. And if even that does not work, one can link in external jars with added functions. But none of these can be done on eText templates. You have to make do with what you have.

cleartext.blogspot.com

Well this makes working on eText templates extremely frustrating. And error prone. The fact that you are designing payment system integrations increases the seriousness of the situation. If there are even fractional errors during the processing, that would direct the banks to pay a different amount out.Scary.

The good thing is that there is a small community of eText developers/consulants which can be accessed via supportweb. Most of the usual issues one faces are documented with workarounds. If a requirement cannot be done , all you can do is blame Oracle and tell the customer.

Here is an issue: you use the Number command to print numbers in the eText output.

cleartext.blogspot.com

image

Internally the template uses the format_number function to convert the source into a number. But this function has a problem, it errors out if the source data has non-numbers in it. It cannot even handle a null. So if the PAYMENT tag in the xml contains null or any non-integer, the template will error out.

Simplest solution ? Just multiply the source with 1  !

image

Multiplying with 1 will work fine if PAYMENT has numbers in it. And in case of any non-number, it will just get converted to 0 ! No errors thrown !

Weird. But it works, no need to do a separate check of null or isnumber.

 

Originally published on cleartext.blogspot.com

Friday, December 18, 2015

Its Live !! Open Live Writer now works with Blogger !

 

The OpenLiveWriter project has just released a new version, it now works with blogger !  I am using it to write this post as well. Download the new version from the site and run the installer. During the installation, choose Google Blogger as your account type if you want to use it with Blogger.

Taleo 2015-12-18 10 48 20

Taleo 2015-12-18 10 48 24

 

The installer will prompt you to sign in, and will open up the authentication page on your browser.

Taleo 2015-12-18 10 48 28

 

Taleo 2015-12-18 10 48 33

Once you grant access in the browser, return to the installer to finish.

Taleo 2015-12-18 10 48 44

Awesome ! It works, and the interface is pretty much the same as Live Writer (though I found the tags option missing).

Hearty thank you to the good folk at the OpenLiveWriter project !!

TqHS1NPaDNSYmLsCMucq