Thursday, August 30, 2007

Custom XSLT functions in Oracle BPEL and ESB

In the Oracle SOA Suite there is a Custom XSLT function example. You can find it in bpel/samples/demos/XSLMapper/ExtensionFunctions. It is not immediately obvious that this approach of enabling access to static methods on a java class works for transformations in the ESB too. This is because both BPEL and ESB use the same Oracle XSLT processor.

The principle is simple:
  • Write a class with a static method to implement the logic you want.
  • Use the namespace http://www.oracle.com/XSL/Transform/java/{$classname$} in your XSLT as the namespace prefix.
To illustrate how straight forward this is I'll go through an example that converts HEX to Decimal. So, with a class called xsltfunctions.HEX2DEC the namespace is defined in an XSL file as xmlns:sample = "http://www.oracle.com/XSL/Transform/java/xsltfunctions.HEX2DEC".

The class HEX2DEC has static method called toDecimal:

public static String toDecimal(String hex) {
String dec = new BigInteger(hex, 16).toString(10);
return dec;
}

In the XSL file this method is invoked like this:

<xsl:value-of select="sample:toDecimal('8D56B')" />

Note that the namespace prefix 'sample' is defined as mentioned earlier using the http://www.oracle.com/XSL/Transform/java/ combined with the classname.

So, you could compile the HEX2DEC class, add it to a jar and put that jar in /j2ee/home/applib so that any transform using the custom function in BPEL or ESB will work. It's that simple.

All that's left is to inform JDeveloper of your custom function so that you can easily refer to it in the XSL Mapper to do this you need to do two things:
  1. Create an XML file detailing the extension functions you have and tell JDeveloper about it in the "User Defined Extension Functions Config File" field of the XSL Map preferences (Tools->Preferences->XSL Map). This will list the functions in the User Defined Extension Functions section of the XSL Map component palette so you can drag and drop it into the XSLT at design time.
  2. Add the class to the JDeveloper classpath so that you can run the transform using the test feature with JDeveloper.
The extension functions XML looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<extension-functions>
<functions xmlns:sample = "http://www.oracle.com/XSL/Transform/java/xsltfunctions.HEX2DEC">

<!-- converts a hex string to a decimal string -->
<function name="sample:toDecimal" as="string">
<param name="hex" as="string"/>
</function>

</functions>
</extension-functions>

To add the class to the JDeveloper classpath involves defining a JDeveloper extension. For JDeveloper 10.1.3.2 the extension needs to be a valid JSR 198 extension. Documentation on this can be found in /doc/extension/ide-extension-packaging.html.

Do this by defining a simple 'extension.xml' like this:
<?xml version="1.0" encoding="UTF-8" ?>
<extension version="1.0" esdk-version="1.0" id="xstlfunctions"
xmlns="http://jcp.org/jsr/198/extension-manifest">
<name>SOAStationXSLTFunctions</name>
<owner>Peter O'Brien</owner>
</extension>

The extension.xml (naming convention for these files) needs to be in the meta-inf folder of the jar containing the classes. The filename for the jar needs to be a combination of the extention id and esdk-version so in this case it would be xsltfunctions.1.0.jar. This jar should then be copied into the /extension directory.

Restart JDeveloper to pick up the changes for both the 'User Defined Extension Functions Config File' and the JDeveloper extension and you're ready to go.

Read more...

Wednesday, August 29, 2007

Hardware - Software -Taking Care of Your Business Assets

If you run an online business -you know your computer-it's software and hardware are extremely important to you. Even though you may plan for obsolescence in your hardware and software, sometimes things do happen. Hardware can die on you and software can be corrupted, but also become obsolete (which translates into, not supported by the company). Whatever the case may be, it can leave you in a frustrating position. How well do I know! Thus, here is an article that highlights the average lifespan of some of your hardware and things to consider when buying new software and hardware.

Software and Hardware Obsolescence -Know the Facts
By Vickie J. Scanlon

When you start an online business everyone knows they should have some kind of business plan -be it an explicit, detailed account of what your online business is going to be or a general outline. But you should not forget about your hardware and software-they are the lifeblood of your business. This article will detail some of the things to keep in mind.


Security Software

Security Software- as you know software changes should occur automatically throughout the year-as long as your subscription is active. With that being said, make sure you use software that is continually updated throughout the year, such as Norton or Computer Associates.

In most cases, there are yearly reminders to keep you current. What is important is a service that adequately supports the blocking of online identity theft, virus and worm protection, hacker protection, spyware protection and phishing protection. All are needed. Several lines of defense are important, for what one does not catch the other will.

In addition to your security software, at this free service-Netcraft. Netcraft is a great service, identifying phishing sites - you can find a link to Netcraft on my site under the tools section or you can do a quick search in Google.


Other Software

Software in most cases are updated on a yearly basis, either to improve or enhance the product. How do you determine if you need the new software? You need to ask yourself if the upgrade software will keep you current with your customers or enhance your capabilities.

I'm afraid to say you should be aware of the operating system you are using. If the operating system is obsolete, sometimes the new hardware and the software may not be compatible.

Sometimes you can have the new operating system accept your old software- by using the Windows compatibility tab under properties (This is if you are using Windows). However, it is all dependant upon one big question- will the new operating system allow you to put the old hardware into play on the system.


Hardware and obsolescence

Nothing last forever, so be sure to keep a list of the hardware and when you purchased them.

Average Lifespan of Hardware:

1. modem - 5 years (if you need a external modem-with satellite connection you need to make sure the modem is well ventilated to extend the life of the modem.)
2. computer - 2 to 5 years (You're probably been left behind and will find that you need to upgrade just to run the new programs)
3. monitor - In most cases your monitor will last for a long time and will not become obsolete until the operating systems no longer support the monitor. But when you have the opportunity, and the money to upgrade you should upgrade, because the newer monitors can offer better protection for your eyes and health.
4. Hard Drives - 5 years at most - This is an easy upgrade, the main thing to remember is to check your system to he main thing to be aware of with your PC is whether it uses the older ATA interface or the new SATA. Always check your computer specifications. It can save you a lot of headaches.
5. CD/DVD- 3 to 5 years. Upgrades should come when you need more speed and functionality.
6. Video cards - 3 to 5 years. Don't need to upgrade the video card, unless you need more functionality. Again check your stats for specifications.
5. Flash Drives - 10 years
6. Printers -- 4 years
7. Scanners -- 3 years


Upgrades

1. Memory upgrades- memory upgrades is always a good investment. Why? The more memory you have, the less your PC will have to use virtual memory (virtual Memory is memory that exceeds your RAM. This memory is swapped between back and forth between your hard drive to keep your system running.)

Note: For those who have Vista, you can get an additional boost with an option called ReadyBoost. This is inexpensive flash memory and will help your system run a little faster, especially if you're under 2 gig.


Care of hardware

Your hardware can last for the life of your computer if you keep your computer ventilated (by having a sufficient amount of fans) and by cleaning your system every 4 or 5 weeks. Cleaning the dust out of your computer is pretty easy. Just get a can of pressurized gas to clean the dust off your internal hardware.

This quick overview should help you plan for hardware and software obsolescence. Being proactive, can help you avoid 75% of the hardware failures before they occur. As to your software, you will need to be the judge of what you need and want. But as to security software - that is needed whether you are a consumer or an online marketer. Protection online is always a top priority in my books.

About Author:

Vickie J Scanlon -- Visit her site at: http://www.myaffiliateplace.biz for free tools, articles, ebooks, how to info, affiliate opportunities, travel and tech accessories, software and computers for the online business.




Read more...

Monday, August 27, 2007

Resetting Blog Widget

Hi all! I haven't been ignoring you, I'm just really busy writing...That's right *snort*, I'm a writer (among other things). But that's not why I'm posting today. I ususally don't post about how to do something unless I've actually tried it myself, and understand how it works.

So today I'm going to show you how to reset the Blog post element. Okay, I know you're asking why in the world would you want to do that? Well there could be a couple of reasons. Like if you comment link at the bottom of the post disappears, or the posts won't show...or anything major malfunction of any other part of that particular widget.

Now...going back to the comment thing for a minute. If your comment link is not showing on your blog posts, check out these thress things first to make sure that all of your settings are correct:

Post Options in post editor...the box at the bottom of the rectangle post box that you write in....click on 'Post Options' and make sure comments are allowed.

Settings - Comment tab...on the Settings tab, go to comments and make sure they are set to "Show".

Template - Page Elements - Blog post...and lastly go to your Layout(Template), go to Page Elements, then click on the edit box in the Blog Post element...hint:(it will be the biggest on on the page). When the Coonfigure box opens up, make sure comments are checked.

Okay, after all that your @#%$# comment link is still not showing...LOL...chill! We can fix it.

LOL...we're going to play in your template HTML...wheeee!

Go to Template...Edit HTML...scroll down in the code until you find this piece of code (the black highlighted section):
Okay, select it like I did and cut that puppy out of there. Save the piece in your mouse because you're gonna put it back in a few minutes. And remember where it was, so that you can pust it back in the exact same place...LOL! If your anal retentive like me...copy a whole section of the template...like say five lines before and after the section you're going to cut out and save it on a Notepad page ore WORD page...just so you can see the exact spot to put it back!

Okay...I digress...cut that highlighted section out of the template and click save...it will be fine...go ahead...click!

Now...this page pops up:" Warning Will Robinson, Warning...LOL...just kidding, I'm a Lost In Space addict! Anyhow...the page says...Egads, you're about to delete a widget!...LOL...never fear...click that Confirm and Save...with pride!

Okay now that you've deleted the bad bugger, you're going to reset the widget by scrolling down the template to the spot where you deleted the piece of code that is still in your mouse...Remember up above I told you to remember where you took it out of...another thing that you could do to remember the spot, before you take the piece out hit your Enter key a few times before and after the section, LOL...it will leave a big hole in the template, that will be easy to find!

Okay...mouse pointer in the empty spot...right click...paste....put that baby back and hit Save.

TaDa!!!! You're all better now, the Blog widget has been reset!
Read more...

Thursday, August 23, 2007

Hardware Miseries

Hardware Miseries is what I have been enduring for over a week. You can cover almost every hardware problem, but when your modem goes belly up and you're on satellite - you just can't go out, buy a new modem and be up and running again. Sadly, I had to purchase the unit and wait. No fun. And as to my Internet connection? Well, I must say it has been interesting. Since I knew it was going out, I had to endure. For instance, sometimes I would have FTP, and sometimes I would have email. Sometimes, I may even get Https, but never Http.

In this case, there was no continquency plan - but maybe winging it. Anyway, I'm up and running now, but now I must do some catch up. You'll probably be seeing a new article coming your way next week. Until then, it's catch up time on my site.
Read more...

Wednesday, August 22, 2007

Em Rất Nhớ Anh - Sơn Ca ( nhạc phim " Gọi Giấc Mơ Về " )




Hôm qua, mới lên thành phố. Có cô bạn bảo kiếm dùm bài hát này. Mọi người cùng nghe nhé:
Download:
http://www.nhachot.info/anychanh/Son_Ca-Em_Rat_Nho_Anh-GGMV-OST.mp3






Lyric:


Từ lâu anh chỉ xem chúng ta như đôi bạn thân


Nhưng trong thật tâm em vẫn mong được nhiều hơn thế


Từ lâu nay mình đã sẻ chia nhau bao buồn vui


Em sợ mình không có ngày mai.



Những lúc anh vui đùa cùng em


Kể biết bao câu chuyện tình yêu


Có biết chăng trong lòng em đang nhói đau vì yêu anh.



ĐK:


Nhiều lần em đã nói dối anh


Có một chàng trai đang thầm yêu em


Vậy mà vô tâm anh cứ chúc mừng


Chúc em tìm thấy được tình yêu.



Rồi một ngày kia anh đi bên em


Ngập ngừng anh nói với em thật nhiều


Nói hạnh phúc chợt vỡ tan oà trong tim


Nghẹn ngào lệ rơi anh ơi


Em mong đã từ lâu lắm câu yêu này


Và cũng muốn nói với anh: em thật nhớ anh


Nhớ rất nhiều.




Read more...

Friday, August 10, 2007

Java IBAN check digit validation

The International Bank Account Number (IBAN) is an international standard for identifying bank accounts across national borders. It was originally adopted by the European Committee for Banking Standards, and was later adopted as an ISO standard (ISO 13616). Although currently only used in Europe, where it was adopted to facilitate cross border payments, it is anticipated that IBAN will a more global standard in a few years.

A quick search on the web for IBAN will show up information on the standard, including some web based validators. Since I could not find one, I have just put together a Java implementation of the IBAN check digit validation algorithm based on ECBS IBAN standard v 3.2. Code , including test cases, are available here. Please note that this works with the 'electronic format' (no spaces) of IBAN and not the 'paper format'.

The code is reasonably straight forward, the challenge I had was to elegantly determine the appropriate numeric value of a letter as per section 6.3 (Alpha to Numeric conversion). In the end I found the simplest way was to compare the given character to 'A'. This gave me the position of the character in the alphabet. Two key points though:
  1. Comparison of characters must be in the same case. Don't compare 'D' to 'a'.
  2. The position will start at zero. For example, E the fifth letter in the alphabet is at position 4.
Here is the code snippet for that:


private static int getAlphabetPosition(char letter) {
return Character.valueOf(
Character.toUpperCase(letter))
.compareTo(Character.valueOf('A')
);
}

Of course once you have the position of a letter in the alphabet don't forget to add 10 to the result to get the numeric value as per IBAN standard.

In the implementation I have included an IBAN.properties which contains the lengths for all the country codes currently signed up to the IBAN initiative. You could take this forward by adding in the formatting patterns that exist for each country and include this in the validation too.
Read more...

Thursday, August 9, 2007

Why doesn't my Ad get results?

I'm always looking for ways in which to improve my ads-and or sales copy for my website. In fact, any tidbit of information that I can utilize on my own website can really can come from anywhere.

Creating ads, be it for Adwords, your web page info can and should conform to many of the elements stated by Tom Killian in his article "The Secret to Creating Ads That Sell".

One point that Tom Killian states is "Your ad should promote value". People buy more by emotion and need. If you can tap into that valuable piece of info-and get it right for you target market- you may get some good results. But you need to experiment, and determine what works and what doesn't.

As to Limited Time Offers that promotes urgency-great idea, but make sure it is a limited time offer- or you will risk a creditability problem for your customers. The article is a good read, and gives some very helpful advice to get your ad or sales copy in shape for your visitors.




The Secret to Creating Ads That Sell
By Tom Killian

Whether you are starting a new business or looking to attract new sales there are a few things you can't afford. Losing potential clients to your competitor and wasting money on ineffective advertising.

Unfortunately, these things happen more often than not. So, why do some businesses do so well while others fail? It's not due to more marketing dollars spent. Instead a strategic plan was evoked to produce an effective advertisement.

There are many important elements that go into producing an effective ad. First, let me start by saying that coming up with a great ad it isn't rocket-science. There are no complicated formulas to follow in order to create an ad that grabs the readers' attention.

Second, using just creativity can kill your ad. Let me explain. Creative ideas are just that, creative. Before you slap down an idea and call it "brilliant" take the few minutes and ask yourself the following questions:

* Who is my targeted audience?
* Does the ad clearly communicate my message?
* What is "unique" about my message?
* How does my ad compare to my competitors?
* What will motivate my targeted audience to respond?

Your ad has to be more than just creative. It must exude value in its message. Think of the reasons why you buy a product or service. Almost every reason for a purchase has some sort of value tied to it. Whether it saves money, tastes good or satisfies an emotional need, it serves a valued purpose.

Make Headlines Work for You

The headline is by far one of the most important elements in creating an effective ad. There are thousands of pages both in print and online that cover the subject of headlines. Why? Well, quite frankly, it makes or breaks an ad. The headline is in essence the voice of your ad. It shouts out: "Hey This Product Will Make You Rich, Here's How!"

Rather than using: "Jane's Homemade Cookies" use "Instant Smiles with Easy to Bake Homemade Cookies".

Always use appealing keywords in your headline that attract attention or stir up curiosity. The goal is to get your targeted audience to read the rest of your copy. Consider using the following keywords when writing your headline:

New, How, Why, Free, Save, Fast, Now, Announcing, Introducing, Wanted, Make, Grow, Sale, Limited, Guaranteed.

Next time you notice a headline that grabs your attention; use it and test it on your product or service. But always keep away from exaggerating your offer. You will quickly lose credibility if you are not honest with your targeted audience.


Writing Simple Yet Effective Body Copy

Once you accomplish transitioning the reader from the headline into the body copy, build momentum by relating to the viewers' needs and satisfying their desires with each written word.

When writing the body copy; keep words simple and to the point. Use sub-headlines whenever possible and keep paragraphs short.

It's important to make it easy for the reader to scan through the copy. If your offer consists of many benefits, use a bulleted list.

Avoid cluttering up your ad by trying to cram too much in the space provided. Eliminate unnecessary words that can drown your message.


Using Visual Elements

There are no set rules of where the graphics must be placed on your ad. However, when selecting illustrations or photographs, display your product or choose ones that are relevant to your offer.

Using graphics can enhance your message as well as grab a viewer's attention when they glance around on a page. Remember, graphics can communicate a message before a single word is read.


Ask for the Sale While Creating a Sense of Urgency

Limited-time offers can create a sense of urgency, but giving your reader a valid reason why they should act now generates more sales. Again, use benefits to attract the reader to take action.

Is there a free gift with the purchase? Will it enhance their lives immediately? Is it a special one-time low price offer?

People love bargains. Use discounts to attract those who want to take advantage of your offer by providing a coupon with an expiration date.

Lastly, specify how your product or service can be obtained and ask for the sale. If it requires a phone call ask them to pick-up the telephone and call. If you require payment, tell them what forms of payment you accept and how to make them.

About the Author:
Tom Killian is a partner at Media D'Vine. An Orlando, Florida based agency specializing in marketing and advertising. Tom has been successfully building online businesses for over 9 years. http://www.mediadvine.com.
Read more...

Wednesday, August 1, 2007

Looking to Start An Ecommerce Site?

Are you looking to start an ecommerce site? Many have thought about it but don't know where to begin, or they thing it's for the established businesses. But that is not really true. If you start your business online, then establish yourself later into a brick and mortar business, it can be done. But you have to get past the fear, and then determine what you need to do. That of course is with any business. But an ecommerce site has definite extras than say, an info site or an affiliate site. To give you an idea of what you are up against take a look at my article - "Ecommerce Where Do I Begin?". This is a mini picture of what you have to consider, beyond of course, your business plan.

My suggestion, if you are an one-man shop, start as a sole proprietor and as your business grows, move to the LLC. There's going to be a learning curve here, if you are only familiar with brick and mortar. But if you have some experience with an online business-you'll be able to bring that experience to the table.

Ecommerce Where Do I Begin
By Vickie J. Scanlon

Ecommerce is not just for the brick and mortar company, but also for a one-man shop. If you're a one man shop, that has a specialty item that, because of a lack of funds, cannot distribute to the big department stores,look at an online business. It can give you a presence, and a ready market.

But as with everything, you must have some of the standard elements to begin. I'll try to give you an overview.

Storefront Elements
Your Storefront - Logos and graphics are important when putting up your store. They should keep your regular customers coming to your site, as well as, entice new customers into your store.

What I look for in a storefront, as an affiliate marketer, is pretty much the same as what a customer wants to see.

For instance:

1. Photos and description. Make sure your photos and images are loading properly, that can drive people away quickly.
2. Accessibility of links to product details.
3. Easy navigation to make the customer visit hassle free.
4. Ecommerce Shopping cart that works. (why do I say that? I was looking at one possible affiliate partnership and decided to test the shopping cart). The shopping cart came up with the item, like it should. I then put in the "1"-to select the purchase one item. Then I hit continue. It was then that the shopping cart software bulked-and forced me to go back to the beginning). I tried several times, then quit in frustration and bought elsewhere. Get my meaning here? (Ease of ordering is important for you, if you want sales)
5. Spelling - Try to have all words spelled correctly - Diminishes the quality of the information.


Important Things to Consider

There are other important things to consider-especially when it comes to money expenses.

If you are wanting to build an ecommerce site, you will need an ecommerce Shopping Cart. Shopping cart software can run from free to as high as $500 per month. If you're lucky your server will have a shopping cart option. Of course, you may have to set it up yourself, or pay someone to set it up for you.

Payment Gateway - This is the service that will help you to process your payment methods: Be it Paypal, AuthorizeNet, Paynova, etc. You'll have to check out the charges for each sale, chargeback, and monthly fees that they may charge.

I would like to stress the technical importance of this aspect of your business. Why? It will help you in handling orders, taxes, payment processing and order delivery efficiently. Again, if you don't have all your ducks in a row, you can lose money.

Ecommerce Website design-If you are going to have someone build your ecommerce website you will need to figure that into your cost. If you're planning to build your own website than most of your cost will be your own labor. Just a note: designing your own website is getting a little easier, even without HTML knowledge. But if it is open source software, you will be responsible for the maintenance and updates of the software when needed. And trust me, you will get some friendly reminders to update your ecommerce software by your server. Why? If you don't update the patches, it can cause holes in the server, which affects everyone. What will they do if you don't update? First time-remind,second time - but a hold on your account and business till you update.

Product photography - You will want to have quality pictures for your website. Not only to keep customers happy, but also attract affiliates to help you sell your products.

Contact - 800-number, contact number, or email contact for customer service/support. If you don't have a method for customer service contact, than people will bulk at buying, because they may question the legitimacy of the website.

And let me stress, customer care is important on the Internet. It elicits trust, and when you break that trust the whole of the Internet will know about it. This will affect your customer base, as well as, the attraction of affiliates. In fact, I find that the customer care of a product or service is an important asset to my affiliate business. If I hear rumbling of bad service or that the service is not up to par- I'll monitor it for a month - and if it's just an isolated incident, it stays. But if it is how they are doing business on a regular basis, it's gone from my site.

Good computer with a large hard-drive, and at least 1 gig of memory-2 gig if you have a Vista operating system. And a good FTP software program.

Shipping - You're need to estimate your shipping charges. Determine whether you will only ship within the states or Internationally. And I would advise having a tracking system in place, for both deliveries and returns.


Marketing

Now that you have the major pieces together you will then have to begin the marketing process -Seo marketing, Seo optimization, email marketing, article writing, Adwords, just to name a few.


Desire and Success

I want to stress that an online business is just like a brick and mortar business. With that being said, be aware that in most cases a new business will take 1 to 2 years to break even and 2-4 years to start making a living from your business. And if you're online, you will have to continually learn and adapt-and be prepared for the competition when you start seeing an element of success.

To conclude, when you get an idea for an ecommerce site, or any business - my advice, is don't quit your day job until you know you are established and have money coming in. Learn everything you can, and the desire and the passion will carry you through the frustrating times, because the good times will definitely take care of themselves.

About Author:
Vickie J Scanlon -- Visit her site at: My AffiliatePlace or free tools, articles, ebooks, how to info, affiliate opportunities, travel and tech accessories, security software and computers for your home office or online business.
Read more...