Thursday, December 30, 2010

Happy new 2011 to all readers of this blog!

Maybe I am only an old degenerate bastard, but this cartoon makes me always laugh...

Wednesday, December 29, 2010

The adapter will not process since it has been processed earlier

<29-Dec-2010 20:27:12 o'clock WET>    <
File Adapter PVPhase1 The adapter will not process [C:\acmepoc\myFiles\in\good2.txt] since it has been processed earlier>
<29-Dec-2010 20:27:15 o'clock WET>    <
File Adapter PVPhase1 The adapter has handled the poisoned file [C:
\acmepoc\myFiles\in\good2.txt]>


still investigating..... why the File Adapter doesn't want to process the same file at 5 minutes distance? There must be some parameter somewhere, but where?

ORAMED-03601

oracle.fabric.common.FabricInvocationException: oracle.tip.mediator.infra.exception.MediatorException: ORAMED-03601:[Invalid transformer configuration]Unable to create transformer. It could be because of transformation file or configuration issues


I am struggling with XSL transformations. JDeveloper doesn't seem to react very well to manual manipulations of the file. You come back from "source" to "design" and the design doesn't reflect the connections. And you get the runtime error.

Workaround: avoid manual hacks..... :o(

tid, ecid, component_instance_id, dcid, composite_instance_id

in a SOA Suite log line, these elements appear:


[2010-12-29T16:37:30.576+00:00] [soa_server1] [NOTIFICATION] [] [oracle.soa.mediator.common.cache] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@309d309d] [userId: pierre] [ecid: 0000IomzSwp8lnc5tjw0yX1D1v7j0036DZ,0] [APP: soa-infra] [composite_name: PierreProject] [component_instance_id: EDF2C8C0136911E0BFFDEF342CAF0998] [dcid: 240449412c647dab:58beda0f:12ce60fee82:-7ffd-000000000000d44b] [component_name: Mediator1] [composite_instance_id: 4] calloutMediatorMessage.toString=oracle.tip.mediator.common.message.MediatorNormalizedMessage@41524152




What do they mean?






tid: ??

ecid: The ECID is used to track a flow messages through and between SOA Composites.

component_instance_id: the identification of the component within the composite.

dcid: ??

composite_instance_id: the identification of the (SCA) composite.


ECID, component_instance_id and composite_instance_id are used for example to show the flow of messages through the several components of you composites...

I shall answer to each ?? as I find out...

Tuesday, December 28, 2010

ORABPEL-11207

I was trying to write into a File using File Adapter and opaqueElement.... evidently there is a trick, I know you must transform the data in base64 binary format.... one day I will find out how to do it...

IO Failure in translator.
IO failure because the   translator failed to   to copy InputStream to OutputStream. .
Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.

 at oracle.tip.pc.services.translation.framework.XlatorHelper.copyStream(XlatorHelper.java:160)
 at oracle.tip.pc.services.translation.xlators.opaque.OpaqueTranslator.translateToNative(OpaqueTranslator.java:311)
 at oracle.tip.adapter.file.FileUtil.translate(FileUtil.java:1262)
 ... 64 more
Caused by: java.io.IOException: Error in encoded stream: needed 4 valid base64 characters but only got 3 before EOF, the 10 most recent characters were: "elloPierre"
 at com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java:250)
 at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:148)
 at java.io.FilterInputStream.read(FilterInputStream.java:102)
 at oracle.tip.pc.services.translation.framework.XlatorHelper.copyStream(XlatorHelper.java:157)
 ... 66 more


Oracle Service Oriented Architecture Infrastructure Implementation Certified Expert

http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=352


Just a note to myself: if I lose my job I will dedicate some time to prepare this certification... at least I will be able to deal with "Architects" as a peer :o)

Monday, December 27, 2010

Java callout in SOA Suite

oracle.tip.mediator.common.api.IJavaCallout is the interface to implement.

Here the interface is documented.

I have been looking for the Javadoc online but could find none.

It is in C:\Oracle1\Middleware\jdeveloper\soa\modules\oracle.soa.mediator_11.1.1\mediator.jar

Voila a Java callback naked and crude:

import java.util.logging.Logger;

import oracle.tip.mediator.common.api.CalloutMediatorMessage;
import oracle.tip.mediator.metadata.CaseType;


public class MyClass implements oracle.tip.mediator.common.api.IJavaCallout {

    public void initialize(Logger logger) {
    }

    public boolean preRouting(CalloutMediatorMessage calloutMediatorMessage) {
        return false;
    }

    public boolean preRoutingRule(CaseType caseType, CalloutMediatorMessage calloutMediatorMessage) {
        return false;
    }

    public boolean postRoutingRule(CaseType caseType, CalloutMediatorMessage calloutMediatorMessage, CalloutMediatorMessage calloutMediatorMessage1, Throwable throwable) {
        return false;
    }

    public boolean postRouting(CalloutMediatorMessage calloutMediatorMessage, CalloutMediatorMessage calloutMediatorMessage1, Throwable throwable) {
        return false;
    }

    public boolean preCallbackRouting(CalloutMediatorMessage calloutMediatorMessage) {
        return false;
    }

    public boolean postCallbackRouting(CalloutMediatorMessage calloutMediatorMessage, Throwable throwable) {
        return false;
    }
}


To be noticed that the postRouting/postRoutingRule have 2 parameters, one is the request and the other the response (I guess!)

Callback has a single parameter because there is no way to remember the request to which this callback is the response.... at least not in Mediator.


Here a good Hello World tutorial on the subject.

Jdeveloper 11.1.1.3 not recognizing java package

Weird, I do
"new java package"
enter the name (com.acme.bla)
click on OK

nothing happens. The folder is not created. In the Application Navigator it doesn't show.

I create the folder manually, refresh Application Navigator, nothing, it doesn't show.

If I create manually a Java class and put into that folder, magically the package appears in Application Navigator.

XML validate that all elements have same value

I have a payload like this:


alfa>3
beta>3
gamma>3
delta>3




and I need to validate that all "number" are the same within the same element... can be 3, can be anything else.

Now, with Schematron I doubt this is possible. With XSD neither. They all seem to be NOT oriented to operate on collections, the validation scope is the single element.

We need to come up with a different strategy.

I wish there was a DSL allowing me to state:

test: assert all /lines/line/number are same within /lines
with message: 'all line number must be same'

where we establish a scope (/lines), a predicate (are same), a subject (/lines/line/number) and a selection rule (all)

Schematron!

http://www.schematron.com/


I am planning to do advanced XML validation in SOA Suite using Schematron....
a Schematron callout is natively supported by mediator, and it looks like a cool easy technology....

Here a nice tutorial.
Here an even better tutorial.

Here a XML ValidatorBuddy plugin for Altova XMLSpy.

In Oracle Soa Suite 11g Developers Guide there is a chapter on the Schematron topic.

Hahaha Schematron reminds me of Robocop - what a fantastic movie!

Groovy Callout in SOA Suite

I was musing about using Groovy to implement custom logic in SOA Suite.
I stumbled on this post covering Groovy with OSB.... interesting!

I have seen a gain of at least 300% in the mass of code produced with Groovy vs Java, so I am planning to use Groovy more often in future....

I am trying to build "complex" validation logic in Oracle Business Rules, surely you can do interesting stuff with this tool, but there is a learning curve and I am not sure how intuitive the code will be...

Reflection with Oracle DB: getting the list of all columns with a given name

SQL> select unique object_type from user_objects order by object_type;

OBJECT_TYPE
-------------------
INDEX
INDEX PARTITION
LOB
PACKAGE
PACKAGE BODY
PROCEDURE
QUEUE
SEQUENCE
SYNONYM
TABLE
TABLE PARTITION
TRIGGER
TYPE
VIEW

with USER_OBJECTS you have information only on TABLES, not on COLUMNS.

Also
Select * From User_Tables;

Select * From all_Tables;

doesn't mention COLUMNS.

To find out about COLUMNS, use ALL_TAB_COLUMNS:

SELECT OWNER, TABLE_NAME, COLUMN_NAME FROM ALL_TAB_COLUMNS WHERE COLUMN_NAME LIKE '%INSTANCE%' order by OWNER;


See http://en.wikipedia.org/wiki/Oracle_metadata for more on Oracle Metadata and useful SQL.

Friday, December 24, 2010

File Adapter metadata with SOA Suite



























( the bloody blog keeps messing up with this XML.... I thought that by 2010 these technical issues would not be there any more....)

You can easily get the filename from the properties, in Mediator go to "ASSIGN VALUES" and you will find how to copy Properties to the Expression output....


You might also copy the property to the same property in Mediator and then pass it around... see here


You might get this warning:

Warning: Assigning property/constant "$in.property.jca.file.FileName" to element "$out.payload/imp1:PreactivationFile/imp1:PreactivationLines/imp1:lotInformation/imp1:fileName". Please make sure target is single leaf node, otherwise non-leaf node will contain only string value which may generate non-valid xml as per the xsd.

Thursday, December 23, 2010

Am I running Java 32bit or 64bit?

in doubt, run

java -version

for 32bit, it should tell you nothing:

java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode)

for 64bit, you should get an explicit message:

java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02, mixed mode)

Oracle Business Rules. validating the number (count) of elements

I have to verify that the count(Lines) is a given number in a payload. Lines is represented as a List in JAXB, and it's a "element minOccurs=0 maxOccurs=unbounded" in the XSD.

In a Rule definition, there is no way to use a XPath expression on a XML Fact.
How painful.

I had to create a Function, return type in, input parameter Lines (it is a recognized type in the Facts), and use "return Lines.size()"
Then in Business Rules you can invoke the Function to compute the number of Lines.

Roundaboutish, eh?

Wednesday, December 22, 2010

Citrus

See this and this for a tutorial on Citrus...



I am strongly allergic to XML....

I was hoping that Citrus would provide a nice and smooth DSL to configure the tests,
but if it involves all that XML I think I will try to achieve the same with Plain Java/Groovy....


Anyway I will give it a try...

I am reading the PDF, it seems very inspiring.

I like the grooviness of Citrus.

SOA Suite File Adapter, parsing complex flat files

In reference to this post,

here is the XSD which allows you to parse a flat file made by different elements (eg first line contains the number of records, and from second line onwards come the records):



 
  
   
    
    
     
      
       
      
     
    
    
     
      
       
        
         
          
          
          
          
         
        
       
      
     
    
   
  
 





TOPLINK-4002 using Composite Sensor on SOA Suite

[TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.3.0) (Build 100323)): or acle.toplink.exceptions.DatabaseException Internal Exception: java.sql.BatchUpdateException: ORA-01461: can bind a LONG value only for insert into a LONG column


oracle.integration.platform.sensor
BEA-000000 Fabric-Sensor Unable to publish sensor data to oracle.integration.platform.sensor.publisher.db.DatabasePublisher
 Sensor Data : blablabla



I wonder if these 2 error messages are related... apparently yes....

SOA Suite and JDeveloper: wsrp-container.jar not found, adflibWorklistComponents.jar not found, com.bea.core.logging_1.6.0.0.jar not found....

Warning: Classpath entry C:\Oracle1\Middleware\jdeveloper\integration\lib\wsrp-container.jar not found.
Warning: Classpath entry C:\Oracle1\Middleware\jdeveloper\integration\lib\adflibWorklistComponents.jar not found.

Warning: Classpath entry C:\Oracle1\Middleware\modules\com.bea.core.i18n_1.6.0.0.jar not found.
Warning: Classpath entry C:\Oracle1\Middleware\modules\com.bea.core.logging_1.6.0.0.jar not found.
Warning: Classpath entry C:\Oracle1\Middleware\modules\com.oracle.ws.http_client_1.1.0.0.jar not found.
Warning: Classpath entry C:\Oracle1\Middleware\modules\org.eclipse.persistence_1.0.0.0_1-2-0.jar not found.


This is bewildering, all of a sudden I start getting these warnings.... ???

Tuesday, December 21, 2010

JDeveloper, SOA Suite, File Adapter, Native Format Builder: Unable to generate native format

Still investigating the issue.... how frustrating....wasted one hour on this....

I was unimpressed by the MFL in Eclipse/OSB spitting NullPointerException when the input data contains "invalid" characters, but now NFB is also putting my patience at test....

It turned out that, when you let the wizard decide the field names and types, it leaves the last one undefined - in case it was empty in the sample file. If you manually set the type to string. the wizard is able to complete successfully. What a great error handling!

Monday, December 20, 2010

Keep all your XSDs in a single place

I want to avoid copying/pasting XSDs all over the places (every single OSB project, every single SOA Suite Project....)

This article talks about this issue.

I am experimenting with Oracle Service Registry (OSR), it was a bit of a fight to install it, but finally I chose "Jetty HTTP Server" and it works....

My dream would be to register all XSDs and WSDLs in OSR and import them into OSB using the "import from UDDI" feature....

Friday, December 17, 2010

Groovy for Dummy Java Programmers (DJP) like me

http://www.infoq.com/presentations/Transforming-to-Groovy

this presentation by Venkat Subramaniam is quite cool.

Thursday, December 16, 2010

CommonJ timer with OSB, SOA Suite, SOA Scheduler

an excellent document on SOA Scheduler here:

http://www.oracle.com/technetwork/middleware/soasuite/learnmore/soascheduler-186798.pdf


I have tested it and it works beautifully! You can specify the cron parameters in a single place. Of course it can be improved but it's a good starting point.
Here the code (I hope Robert Baumgartner doesn't mind).
I feel it would be better to have the Scheduler post an EDN event using
oracle.integration.platform.blocks.event.SendEvent and wake up a Mediator instance,
rather than synchronously invoke the WS to trigger the BPEL process.

This SendEvent class is in C:\Oracle1\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar
Unfortunately it looks like the only way to use it is by invoking its main(...) procedure after having set the System properties with: dbconn,dbuser, dbpass, eventName, eventBody,event parameters. Internally it uses a SAQRemoteBusinessEventConnectionFactory and a BusinessEventBuilder. All this make it a bit complicated to generate events programmatically.


here is CommonJ doc:

http://download.oracle.com/docs/cd/E12840_01/wls/docs103/commonj/commonj.html with coverage of "cluster-wide" timers.


Here the excellent tutorial by James Bayer:
http://blogs.oracle.com/jamesbayer/2007/11/weblogic_scheduling_a_polling.html

and more here:
http://blogs.oracle.com/jamesbayer/2009/04/a_simple_job_scheduler_example.html


and a very nice tutorial on CommonJ TimerManager here
http://middlewaremagic.com/weblogic/?p=987

here the code


Other alternatives:

EJB 3.0 Timer:
http://www.javabeat.net/articles/3-ejb-30-timer-services-an-overview-1.html

more specifically in a cluster:
http://shaoxiongyang.blogspot.com/2010/10/how-to-use-ejb-3-timer-in-weblogic-10.html


I really feel a pain comparing the SOA Suite support for scheduling with the one offered by Apache Camel:
http://camel.apache.org/quartz.html



(17-Jan-2011) I discover there is a PICK activity in BPEL allowing you to schedule a BPEL process at given interval. This is most likely the simplest solution:

http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/events.htm#CHDECBGD

Wednesday, December 15, 2010

Why should I use a BPEL engine?

I found this wonderful presentation:

http://www.ibm.com/developerworks/websphere/library/techarticles/0803_fasbinder2/0803_fasbinder2.html

basically, use OSB when you have to do this:

validation
protocol mediation
transformations
messages enrichment
simple service composition with no compensation
static ou dynamic routing
load balancing and fault tolerance
error handling
monitoring performance and SLA


use a BPEL Engine for:
complex long running processes
service composition with compensation and complex orchestration

Remote monitoring of a Java application with JConsole

see http://download.oracle.com/javase/1.5.0/docs/guide/management/agent.html#remote

and better still here http://www.performanceengineer.com/blog/monitoring-weblogic-using-jmx/

set these properties:

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8888
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false



CAVEAT: on the same machine you could have multiple WLS.
You cannot assign the same jmx port to all of them.
You should prepare an individual script for each managed server,

where you set
export JAVA_OPTIONS="-Dcom.sun.management.jmxremote.port=8888"

and of course use a different port for each WLS.

Something like this:

startOSB.sh:

export JAVA_OPTIONS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8888 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
nohup ./startManagedWebLogic.sh osb_server1 http://myserver:7001 2>&1 > . ../servers/osb_server1/logs/osb_server1.out &



startSOA.sh:

export JAVA_OPTIONS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8889 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

nohup ./startManagedWebLogic.sh soa_server1 http://myserver:7001 2>&1 > ../servers/soa_server1/logs/soa_server1.out &


You will need to enable these settings when you want to connect VisualVM with JMX, see here http://visualvm.java.net/jmx_connections.html

SOA book for the winter....

http://www.amazon.com/Enterprise-Service-Bus-David-Chappell/dp/0596006756




I read good things about this book.... I am not planning to finish Thomas Erl book, waaaaay too abstract for someone implementation and delivery oriented like me.

OSB and SOA Suite VISIO Stencils

This one is REALLY cool, it contains very specific component icons, although I wish it contained more JEE specific terminology (i.e. a JMS queue, for which I can only find a Channel icon) :

http://www.soapatterns.com/SOA_Visio_Stencil.zip

This one is very abstract, just like the Thomas Erl book, anyway a few components can be really useful:

http://www.eaipatterns.com/download/EIP_Visio_stencil.zip

Tuesday, December 14, 2010

nohup, redirecting nohup.out to a file

nohup ./startManagedWebLogic.sh osb_server1 2>&1 > ./osb_server1.out &

easy does it

startManagedWebLogic asking username and password

you have many options to get rid of the annoyance,
probably the quickest is to put a file boot.properties
with
username=weblogic
password=weblogic1

in $DOMAIN_DIR$/servers/myserver/security
directory


at the next boot it should be encrypted by WLS

    
    

Thursday, December 9, 2010

Bottom-up, top-down, meet-in-the-middle...

nice article on WSDL design - it makes sense and it's practical...

http://www.ibm.com/developerworks/architecture/library/ar-servdsgn1/

Wednesday, December 8, 2010

Sequence Diagrams for The People

this tool is really cool, it creates accurate SDs in a matter of seconds...

http://sdedit.sourceforge.net/example/index.html

Great job Herr Markus Strauch !

Here is a sample script:

crm:CRM[a]
osb:OSB[a]
hdt:HDT[a]


*1 crm
CRM requests creation
of a Company/Person account
*1
crm:osb.H_REQ_CLIENT()


[c:alt nodeLevel IS NOT defined]
osb:hdt.ciaoScemo()
--[else]
osb:nothing to do
[/c]


osb:hdt.hello()

and here is the SD originated:


Sweet and simple.

Tuesday, December 7, 2010

JDeveloper and HttpClient to test a OSB "any XML" service

I want to code some Unit Tests for a Pure XML service.
SOAPUI doesn't seem to have any support for such services (maybe?).

So I will code something in Java. Actually I might do it in Groovy.

HttpClient is deployed 3 times (!!!) with SOASuite and JDev:

C:\Oracle1\Middleware\jdeveloper\communications\modules\oracle.sdp.client_11.1.1\commons-httpclient-3.1.jar

C:\Oracle1\Middleware\jdeveloper\ide\lib\commons-httpclient-3.1.jar

C:\Oracle1\Middleware\Oracle_SOA1\soa\modules\commons-httpclient-3.1.jar

In reality httpclient 3 is a legacy code and one is encouraged to upgrade to 4
http://hc.apache.org/downloads.cgi

(download both core and httpclient jars)
here is the link with the dependencies.


Here a quick tutorial.

Bear in mind that even if you post a XML to a "Any XML" service, OSB will still wrap it into a soapenv:Body element....




so if you want to grab the payload you should get the XPath "./*" of variable $body...
using the XPath "." will return you an object of type Body.


Here is the harness:

DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost request = new HttpPost("http://localhost:7001/CreateOrder/PS/CreateOrderPS");
HttpEntity httpEntity = new FileEntity(new File("C:\\JDeveloper\\mywork\\ACME_POC\\CreateOrderTest\\resources\\createorderpayload.xml"), "text/html");
request.setEntity(httpEntity);
HttpResponse response = httpclient.execute(request);
System.out.println(response.getStatusLine().getStatusCode());

and of course the status should be 200
If it's 500 you might have a fault (e.g. validation error)


Here for my reference are the available sbresource queries:

* http://host:port/sbresource?WSDL/project/...wsdlname
* http://host:port/sbresource?POLICY/project/...policyname
* http://host:port/sbresource?MFL/project/...mflname
* http://host:port/sbresource?SCHEMA/project/...schemaname
* http://host:port/sbresource?PROXY/project/...proxyname

Monday, December 6, 2010

SOA Suite - logging in BPEL

I was wondering how to log debug information in a BPEL process,
and here I found an excellent article on using a Java embedded action.... great stuff, Brazilian friend, bem feito!

Just code this into a Java Embedded activity:

Object countLines = getVariableData("countLines");   
  
System.out.println("IN LOOP countLines=" + countLines);

/* writes to the audit trail - will then be visible in BPEL console at runtime*/
addAuditTrailEntry("countLines is: " + countLines);




This article seems to be interesting on how to use log4j from a BPEL process

See also here for more on logging XML in BPEL

Sunday, December 5, 2010

Non unique body parts!

If you get this message, you better fix it, don't rely on SOAPAction for dispatching. Every operation should have a unique body structure, carrying as root element the operation name.

Most likely, the mistake has been:
declaring multiple wsdl:message with the same "part" structure.
See here for a template you can use to write your WSDL.

I know, WSDL are a pain in the neck, especially the 1.1 version.

Elements of XSD reusability

If you define a type in a XSD:


myxsd1.xds:

 
  
   
  
 




you can reuse this type definition in another XSD:


myxsd2.xds:

        
 





The key is the "xs:import" statement with the association to the same namespace as in the targetNamespace used for the myxsd1.xds.

What I really don't like in XSD is the habit of defining a type as an element:

xs:element ... xs:complexType

this is plain stupid since you cannot reuse this type definition.


I mean, once you have defined an element A as of complexType sequence bla,
you cannot define an element B saying "make it just like element A".

The only way to reuse it is by including an object of type A inside the object B using the "ref" construct:

xs:element name="PVElement3" ... xs:complexType ... xs:sequence... xs:element ref="PVElement2"

This is like going back a century in the art of programming.

I keep wondering what the Fathers of XML had smoked when they got together to define the Foundation of the Second Biggest Blunder of the Century - the First being HTML.

Release It !



Luciano has recommended me this book, he says it's full of insight on how to build testable applications.

I have started reading it and I am enjoying every line I read.

This is a great quote from the book:

Your early decisions make the biggest impact on the eventual shape of
your system. The earliest decisions you make can be the hardest ones
to reverse later. These early decisions about the system boundary and
decomposition into subsystems get crystallized into the team structure,
funding allocation, program management structure, and even timesheet
codes. Team assignments are the first draft of the architecture.
It’s a terrible irony that these very early
decisions are also the least informed. This is when your team is most
ignorant of the eventual structure of the software in the beginning, yet
that is when some of the most irrevocable decisions must be made.

Indirectly referenced variables in BPEL

or "Dynamically specified XPaths in BPEL"

Let's assume I have a String variable "counter",
and I want to do a lookup on a collection MyCollection accessing its MyElement number "counter".

In Java it would be Element element = myCollection.get(counter).

In BPEL you have to toil a lot more even to do the simplest thing:



                    
                        
                        
                    
                    
                        
                        
                    
                


If Counter contains 4,
Temp_Variable will contain a string "/ns2:MyCollection/ns2:MyElement[4]"
which will be evaluated as a XPath by the second "copy" statement.

One can - more effectively - use dynamic indexing:

http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#CIHGBJCE




Why do simple things in Java, when you can do overly complicated programming in XML?

Friday, December 3, 2010

Good introduction to BPEL

Great tutorial for absolute beginners:

http://www.radikalfx.com/bpel/language.html


Here is the BPEP XSD : http://schemas.xmlsoap.org/ws/2003/03/business-process/


The main elements of a BPEL Process definition are:

process

partnerLinks

variables
  • messageType
  • type
  • element


sequence
  • receive
  • assign
  • invoke (sync or async)
  • reply (only for sync)

switch

while

throw

fault

empty

pick - like "receive" but lets you specify multiple triggers

flow - executes multiple activities in parallel

faultHandlers catch and catchAll




A Synchronous process will have a Receive/Reply

An Asynchronous process will have a Receive/Invoke

OSR: org.idoox.wasp.WaspInternalException: java.lang.RuntimeException: Updates to config files not supported

I get a

Error 500--Internal Server Error
org.idoox.wasp.WaspInternalException: java.lang.RuntimeException: Updates to config files not supported


after installation of OSR,
when I hit
http://localhost:7001/registry/uddi/web


After restart, I get


java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "com.idoox.wsdl.DefinitionImpl.getMessage(Ljavax/xml/namespace/QName;)Ljavax/wsdl/Message;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, com/idoox/wsdl/DefinitionImpl, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for interface javax/wsdl/Definition have different Class objects for the type javax/xml/namespace/QName used in the signature
at com.idoox.wsdl.factory.WSDLFactoryImpl.newDefinition(WSDLFactoryImpl.java:60)



It turns out that
http://forums.oracle.com/forums/thread.jspa?threadID=952237

you should not install OSR in a WLS instance that has SOA Suite stuff deployed to it.... choose an EMPTY WLS server....I will do that as soon as I find time...

Tab Kit for Firefox

Struggling with TABs in Firefox can be frustrating....
I keep closing tabs because I dislike having them disappearing at the right end side.

I have installed https://addons.mozilla.org/en-US/firefox/addon/5447 Tab Kit,
it's really nice, and it supports multiple layouts !

Thursday, December 2, 2010

WSDL import vs XSD import

Ever found yourself struggling because your WSDL doesn't validate because some types - defined in an imported XSD - seem missing?

Most likely you should read this article:
http://www.ibm.com/developerworks/xml/library/ws-tip-imports.html

You better use this clause:

 
  
  
  
 


The clause wsdl:import should be reserved for WSDL only (although it DOES work also with XSDs), otherwise you will get the infamous:

Import of file:BLA.xsd is violation of BP 1.1 R2001.
Proceeding with a warning.
R2001 A DESCRIPTION MUST only use the WSDL "import" statement to import another WSDL description.


If you find all this confusing, so do I. At least they should give a warning at design time. Probably Java IDEs have spoiled me, I am expecting too much :o)

JDeveloper : how to clean up the list of recent Applications

Jdeveloper, how to clear application data.

Jdeveloper keeps some IDE-related data here:

C:\Users\pierre\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\o.ide\preferences.xml
C:\Users\pierre\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\o.ide\
windowinglayout.xml


C:\Users\pierre\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\o.ide\projects\index2.xml
and other files in this directory



C:\Users\pierre\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\o.jdeveloper\applications.xml

C:\Users\pierre\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\o.jdeveloper\ide.properties



I have experimentally found that cleaning all the "Item" elements in C:\Users\pierre\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\o.jdeveloper\applications.xml does the trick of cleaning your environment from old Applications.

Wednesday, December 1, 2010

Windows could not start the OracleXETNSListener service

I had the smart idea of declaring ORACLE_HOME in the System Variables, as c:\Oracle1\Middleware . Apparently this interferes with the Oracle TNS Listener installed as a System Service.
Removing the variable ORACLE_HOME from the System area fixes the problem.... funny!