Java CAPS Quick Note 002 - JCA Transform HL7 Delimited to Custom XML


This Quick Note discusses a solution to the use case provided by Marcus Davies.



I am trying to read HL7 from JMS (preferably stcms) and populate an outbound XML data structure (different to the XML generated by the decoder).
I have been thinking of doing one of the following […]:
1.    Use a Concrete JMS WS using the HL7 encoders to unmarshal the HL7 and use JAXB to populate the outbound XML.  Unfortunately this does not appear to connect to the stcms queue as I can not see any receivers
2.    Use a JCA MDB to read from the stcms JMS queue - this works but I don’t think I can use the HL7 encoder like this
3.    Use and MDB to read from JMS, manually unmarshal the HL7 and use JAXB to populate the data structure
Ideally I would like to use the HL7 encoders.  Do you think the first approach should work?


Number 1 will not work as at end of February 2009 because the JMS BC does not properly decode the HL7 delimited message. This is a know issue. I don't know what the status of this is. The only BCs that know how to deal with HL7 delimited, that I know of, are the File BC and the HL7 BC.

Number 2 should work. I did not personally try it. You can invoke an encoder library from Java. Have a look at http://wiki.open-esb.java.net/Wiki.jsp?page=UseEncodersInJavaSE.

Number 3 should work but it will be very laborious.

I have a Number 4, which uses a HL7 OTD and a custom XSD-based OTD in a JCA EJB. You may or may not like it but it’s the best thing to do if you can not use BPEL 2.0 to do the mapping and you don’t want to build a repository-based solution (which would be the best for your case anyway).

The solution involves the use of:
1.    HL7 2.3.1 OTD Library (Java CAPS 6 Repository)
2.    JMS JCA to trigger a MDB with a HL7 Delimited message
3.    JMS JCA to write result message out
4.    JCA MDB to do the processing
5.    OTDImporter to provide HL7 2.3.1 OTD and custom XSD-based OTD to the EJB for “convenient” mapping

The article and referenced materials are available at http://blogs.czapski.id.au/2009/02/java-caps-quick-note-002-jca-transform-hl7-delimited-to-custom-xml

Comments:

I tried to implement this but it appears my server is missing patches for the glassfish install, and Sun no longer provides patches for free.

Thus I am switching to another O/S. I know this is not within your control but it is rather brain-dead business practice a change after 20+ years of free patches!

Posted by Jonathan on May 06, 2009 at 10:51 PM EST #

Hello, Jonathan.

You are not saying what product version you are using or what your issue is. The underlying assumption is that you are using Java CAPS 6 Update 1.

Regards

Michael

Posted by Michael Czapski on May 07, 2009 at 12:22 AM EST #

Michael
I am still trying to install glassfish! When I execute this file "glassfishesb-full-installer-solaris-sparc" I get an error "installer file is corrupted". I dug through the installer file and it is looking for something on Solaris SPARC that is not present. So I hoped to resolve it with S10 recommended patch set (my SunFire V210 server is a new S10 install). The h/w does not recognize a Solaris11 DVD (but will accept S10 and V210 docs say that only S8,9,10 is supported.)

I cannot download S10 recommended patch set as I don't have a support contract.

I am trying to find x86 h/w in the hopes of trying this on Linux.

Jonathan

Posted by Jonathan on May 07, 2009 at 12:27 AM EST #

p.s.
when trying to install JDK 1.6 on the same box I execute:
bash-3.00# ./jdk-6u13-solaris-sparc.sh

and get this.......

Unpacking...
Checksumming...
The download file appears to be corrupted. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.
Please do not attempt to install this archive file.
bash-3.00#

So something about this vanilla S10 install is not liked by glassfish or JDK and I cannot get patches to at least try upgrade the OS install :(

Thanks for listening and good luck with the ORCL merger

Posted by Jonathan on May 07, 2009 at 12:34 AM EST #

here is the JDK install portion that exits with "corrupted file":

==========

echo "Unpacking..."
tail ${tail_args} +550 "$0" > $outname
if [ -x /usr/bin/sum ]; then
echo "Checksumming..."

sum=`/usr/bin/sum $outname`
index=1
for s in $sum; do
case $index in
1)
sum1=$s;
index=2;
;;
2)
sum2=$s;
index=3;
;;
esac
done
if [ $sum1 -ne 13288 ] || [ $sum2 -ne 165924 ]; then
echo "The download file appears to be corrupted. Please refer"
echo "to the Troubleshooting section of the Installation"
echo "Instructions on the download page for more information."
echo "Please do not attempt to install this archive file."
exit 1
fi

=========

What is the JDK possibly complaining about, this is a brand new S10 install???
That is why I think that S10 recommended patch set would hopefully fix these install issues...

Posted by Jonathan on May 07, 2009 at 12:37 AM EST #

Hello, Jonathan.

I can't speak to JDK, App Server of Solaris issues. Perhaps relevant mailing lists will be better.

Java CAPS 6, GlassFish ESB and OpenESB all come with the bundled applicaiton server and NetBeans. I have never tried to install Java CAPS, GlassFish ESB or OpenESB the hard way - installing the app server, installing NetBeans and then trying to make all the bits work together. You will be better off, if you intend to work with one of the bundles, to download and install the bundle.

My experience with JDKs and Java CAPS 6 tells me to stay away from JDK 1.6. On a Red Hat Linux, for example. I tried JDK 1.6.0_12 and 1.6.0_11, with all manner of issues cropping up. Finally I settled on JDK 1.5.0_18 and that is working well. I had similar experience with Windows, including JDK 1.6.0_02 as well as the other versions. I expect these issues will be addressed with teh next release of Java CAPS 6.

I successfully installed and used OpenESB on OpenSolaris on a VirtualBox and VMware (windows XP host on Intel 32-bit). Again, I started with a JDK install followed by the OpenESB bundle install. My CEC screencasts and tutorials used that platform.

Regards

Michael

Posted by Michael Czapski on May 07, 2009 at 01:15 AM EST #

Hi,

I have the same problem that Jonathan:

Unpacking...
Checksumming...
The download file appears to be corrupted. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.
Please do not attempt to install this archive file.
...

Any solutions ???

THX

Posted by Berna on June 16, 2009 at 11:54 AM EST #

Hello, Berna.

The only advice I can offer on this is for you to contact your local Sun Java CAPS Support folk and have them work on this for you. If you have a downkoad link to Java CAPS 6 then you must be a paying customer. This entitles you to official support from Sun. Take advantage of that entitlement.

Regards

Michael

Posted by MICHAEL CZAPSKI on June 17, 2009 at 01:53 AM EST #

NetBeans 6.5.1 that is shipped as part of the jcaps package has been modified from the std downloadable version to fully integrate and is best used.

Posted by Neil on July 13, 2010 at 04:27 PM EST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

In this Blog I post abstracts of articles / writeups / notes on various aspects of Java CAPS and SOA Suite including solutions, discussions and screencasts. The links to the referenced material are included in the bodies of the abstracts.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today