Joine Music

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 20 April 2006

Posted on 02:24 by Unknown
Mapping the Websphere Portlet Wiring Jungle

While great for inter portlet communication, IBM's concept of inter portlet comms by "wiring" using WSDL is a complicated one and easy to screw up. Here's some notes I've made as I've made my way through getting it working:

THE WSDL PARTS:
Types: Describes data types (using XML schema) that can be emitted by the source portlet.
Messages: Describes messages that can be produced or consumed by the portlet.
Port Type: Describes the abstract interface of the portlet, as seen by the property broker.
Binding: Describes how the abstract interface (port type) is implemented.

OUTPUT FROM A PORTLET:
Portlet HTTP Request Parameter Name (the wire action to call) ="XXXXX" ->
that portlets wsdl <binding... <operation... <portlet:action name="XXXXX"


Portlet HTTP Request Parameter Name (the value to pass) ="AAAAA" ->
that portlets wsdl <binding... <operation... <output... <portlet:param name="AAAAA"

that portlets wsdl <binding... <operation... <output... <portlet:param part-name="BBBBB" ->
that portlets wsdl <message... <part... name="BBBBB"

that portlets wsdl <binding... <operation... name="CCCCC" ->
that portlets wsdl <portType... <operation... name="CCCCC"

that portlets wsdl <binding type="tns:DDDDD" ->
that portlets wsdl <portType name="DDDDD"

that portlets wsdl <portType... <operation... <output message="tns:EEEEE" ->
that portlets wsdl <message... name="EEEEE"

that portlets wsdl <message... <part... type="tns:FFFFF" ->
that portlets wsdl <types... <xsd:schema... <xsd:simpleType name="FFFFF"

INPUT TO A PORTLET:
that portlets wsdl <types... <xsd:schema... <xsd:simpleType name="GGGGG" ->
that portlets wsdl <message... <part... type="tns:GGGGG"
NOTE: These datatypes must be the same as those in the output portlet wsdl

that portlets wsdl <message... name="HHHHH" ->
that portlets wsdl <portType... <operation... <input message="tns:HHHHH"

that portlets wsdl <portType name="IIIII" ->
that portlets wsdl <binding type="tns:IIIII" ->

that portlets wsdl <portType... <operation... name="JJJJJ" ->
that portlets wsdl <binding... <operation... name="JJJJJ"

that portlets wsdl <message... <part... name="KKKKK" ->
<binding... <operation... <input... <portlet:param part-name="KKKKK"

that portlets wsdl <binding... <operation... <input... <portlet:param name="LLLLL" ->
Portlet code request.getParameter("LLLLL"); // the passed value

that portlets wsdl <binding... <operation... <portlet:action name="MMMMM" ->
Portlet code request.getParameter("MMMMM"); // the called action


MORE INFORMATION:
See: http://www-128.ibm.com/developerworks/websphere/library/tutorials/0509_saddal/0509_saddal_reg.html
Read More
Posted in | No comments

Friday, 14 April 2006

Posted on 05:59 by Unknown
Setting the Default Goal in Maven 1.0.2

To set the default goal in a maven 1.0.2 project, add it to the 'project' tag in maven xml as an attribute. E.g.:

default="jar:install"
Read More
Posted in | No comments

Wednesday, 12 April 2006

Posted on 10:58 by Unknown
Another Stupid JSP Mistake
If you want to directly embed the output of a Java bean property in your jsp you need to surround the call to the getter with '<%= %>' and not '<% %>' as I initially was doing...
Read More
Posted in | No comments

Posted on 10:51 by Unknown
Another JSTL EL Gotcha

I just spent agfes banging my head against a JSP null pointer exception.

It turned out that the reason I was getting it was because I was using JSTL 1.0 but had tried to use '[n]' notation to access a list. Something which seems only to be available in JSTL 1.1...

For more info check out: The JSTL Expression Language > Operators
Read More
Posted in | No comments

Posted on 03:17 by Unknown
The Significance and Importance of Quotes in JSTL EL

I just spent a few hours debuggung a null pointer in a Portlet JSP I'm writing. It's notoriously difficult as you need to deploy to see if you've cocked up and if the error is in your jsp, even decompiling the result can be of no use as this loses the comments and consequently the error of the line number is meaningless. I was reduced to cutting the page down to the barest minimum and then putting the bits back, one at a time to see where my mistake lay... (Ignore the wierd tags, that's there to get this to display properly)

As it turned out, the error was a particulary few-pixelled one. I had:


...c:when test="${not empty sessionBean.myProtoSubscription.mySubscribedEntityId}">
...c:choose>
...c:when test="{sessionBean.myProtoSubscription.mySubscribedEntityId" > 0}">
...


Where mySubscribedEntityId was a Long. I thought this would be the problem as the error was about a "null" and feared the Long > long transition would be the cluprit. How wrong was I. I'd just missed out two tiny quotes round the '0'. This now works:


...c:when test="${not empty sessionBean.myProtoSubscription.mySubscribedEntityId}">
...c:choose>
....c:when test="sessionBean.myProtoSubscription.mySubscribedEntityId"> '0'}">
...


Read more about JSTL EL "not empty" tags here
Read More
Posted in | No comments

Tuesday, 4 April 2006

Posted on 05:43 by Unknown
More SQL...

We wanted to change a field in every one of our defendants so that they had a "PrisonerID" based on their defendant id (which was the primary key) with a prefix of 'PR00'. We did the following (on MySQL 5):

mysql_prompt> update defendants set prisonerId=concat('PR00', defendantId);
Read More
Posted in | No comments

Posted on 05:29 by Unknown
MySQL Database Dumping Command Quickie

I try and avoid using databases so much that I can never remember any commands, but I've had to look this up more than once:

DOS_PROMPT> mysqldump --user=[UID] --host=[server] --password --opt [database] > [filenameForDump.sql]


Lots more info is in the manual at:

MySQL 5.0 Reference Manual :: 8.10 mysqldump — A Database Backup Program

It alows you to dump the schema creation sql as well as sql to load the current data.

BTW, remember there's also
SET_FOREIGN_KEY_CHECKS=0
or
...=1
to enable / disable foreign key constraint checking for the duration of any upload
Read More
Posted in | No comments
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)

Popular Posts

  • (no title)
    The Significance and Importance of Quotes in JSTL EL I just spent a few hours debuggung a null pointer in a Portlet JSP I'm writing. It...
  • (no title)
    Agile Development Ramblings: Part I Introduction I've just completed my first Agile development project. We developed a fully functiona...
  • EJB 3.0 Outside the Container, Inside the JVM - Part 2: Configuring JPA Declaratively
    Welcome to part two of this blog entry introducing using EJB3.0 inside the JVM. Click here to view the first part. As we've seen, JPA ...
  • Reuse (ii): Definition of Done
    As I said in my previous post , our project has suddenly taken a new path. There are two bits of collateral which I'd recently produced...
  • Notes from the FindBugs BOF9231 at JavaOne 2007
    NOTE: These are my incomplete notes from the FindBugs BOF at JavaOne 2007. I got in late due to the crush outside so missed the start of th...
  • Writing Unit Tests to Ensure Your "@Transactional ... rollbackFor" Annotations are Honoured
    Thanks to Russ Hart for providing the info on how to get this to work.  I just cut and paste, and then blogged it. It's nice to write un...
  • (no title)
    Can Your Own Demo I found something great on t'internet the other day. I had been asked to do a demo of our new ystem to some users but...
  • JavaOne Bred Over-Enthusiasm...
    I want to build and fiddle with Wonderland , and my own JDK ! The problem is my graphics card sucks (I need acceleration) and I'm runnin...
  • Booting Apache Derby ("JavaDB") with your Java App's Startup
    If you're embedding the Derby RDBMS with your java desktop application and want it to start when you start your app, you need to make th...
  • STS and RTC – Getting them to Play Nice
    We’re developing our new app using Spring 3.0 RC1 and we want the best tools available. We’ve picked the following: SpringSource Tools ...

Categories

  • 0
  • 2008
  • ant maven pimp build javaone 2008
  • apple ipod touch
  • asm
  • blog new ruby
  • blogtag list
  • bond casinoroyale mashup mi6 film movie
  • build
  • bytecode
  • CI
  • cobertura
  • communityone 2008 nutter jvm scala jruby groovy davinci
  • communityone 2008 opensocial socialsite
  • communityone javaone keynote oreilly
  • configuration
  • cowley
  • css div layout column ie firefox safari example
  • custom
  • darkstar mpk20 wonderland java3d commaboration SL
  • dashboard rss communication news development
  • db2 database SQL max min howto tip
  • db2 database ibm lessons tips
  • db2 database load batch howto example
  • db2 import upload data howto command
  • debt technical java annotation
  • debugging tips javaone 2008
  • development web2.0
  • findbugs JavaOne 2008 pugh
  • findbugs JavaOne BOF notes
  • gafter closures java javaone notes
  • google trouble patriarchal patriarchy
  • groovy metaprogramming javaone 2008
  • grubby oss data generation project announce
  • guice javaone 2008
  • gwt maven howto example simple
  • howto
  • hudson
  • hudson CI javaone 2008
  • ibm
  • invokeDynamic jvm dynamic ruby javaone
  • itinerant web2.0 portable desktop
  • jacl was websphere wsadmin trace logging
  • james gosling sun java open source tech days second life SL
  • jar java manifest properties config howto tip
  • java
  • java applet javaone 2008 reloaded jnlp
  • java javafxscript javaone 2008 fxscript
  • java javaone 2007 07
  • java javaone 2008 bytecode cobertura asm singleton testability
  • javaone
  • javaone keynote gage schwarz javafx
  • javaone semantic web bof notes web3
  • jazz
  • jruby rails javaone charlesnutter thomasenebo
  • jruby ruby netbeans development
  • kill dead laptop computer rebuild restore
  • lessonslearned
  • mac osx java gui shellscript classpath problem solution
  • maven plugin unittest test packager
  • mylin mylar javaone eclipse 2008
  • netbeans development ide
  • netbeans development ide RC
  • netbeans maven2 profiling
  • netbeans ruby sun tech days visual web pack roman strobl
  • ola bini java javaone 2008 thoughtworks ruby jruby
  • openjdk java javaone javafx wonderland
  • overheard
  • pojo ejb3.0 jpa orm java example howto
  • rant
  • rest restful jsr311 java web2.0 javaone ts-6411
  • rome rss feed blog rss atom propono java javaone
  • rsa uml profile plugin howto
  • ruby inheritance example
  • ruby jruby rss xml hpricot
  • ruby unless example
  • scm
  • setup
  • subversion svn xp windows cleanup
  • sun java soa web2.0 netbeans opensource javacaps
  • sun tech days java derby database rdbms london
  • sun tech days london impressions
  • terracotta java javaone 2008 android gwt
  • tip
  • tips
  • vwp netbeans JPA howto
  • was jython scripting nfr ibm pmi jvm
  • was tpv jython scripting nfr ibm pmi
  • webrick ruby jruby actadiurna investigation code howto
  • workitem

Blog Archive

  • ►  2012 (1)
    • ►  October (1)
  • ►  2010 (8)
    • ►  November (1)
    • ►  October (3)
    • ►  June (1)
    • ►  May (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2009 (9)
    • ►  December (1)
    • ►  November (5)
    • ►  March (2)
    • ►  February (1)
  • ►  2008 (22)
    • ►  December (1)
    • ►  November (3)
    • ►  May (15)
    • ►  March (1)
    • ►  January (2)
  • ►  2007 (53)
    • ►  December (1)
    • ►  November (3)
    • ►  September (3)
    • ►  August (2)
    • ►  July (3)
    • ►  June (1)
    • ►  May (12)
    • ►  April (5)
    • ►  March (13)
    • ►  February (7)
    • ►  January (3)
  • ▼  2006 (35)
    • ►  December (8)
    • ►  October (1)
    • ►  August (1)
    • ►  July (5)
    • ►  June (8)
    • ►  May (3)
    • ▼  April (7)
      • Mapping the Websphere Portlet Wiring JungleWhile g...
      • Setting the Default Goal in Maven 1.0.2To set the ...
      • Another Stupid JSP MistakeIf you want to directly ...
      • Another JSTL EL GotchaI just spent agfes banging m...
      • The Significance and Importance of Quotes in JSTL ...
      • More SQL...We wanted to change a field in every on...
      • MySQL Database Dumping Command QuickieI try and av...
    • ►  March (2)
Powered by Blogger.

About Me

Unknown
View my complete profile