Posts

Showing posts from 2007

JAX-RPC or JAX-WS ?

With the latest technology preview of JDeveloper, you have to choose between two flavors. Kind of like Strawberry vs. Vanilla. Which one should I pick. After all it's a question of taste. Personally, I pick JAX-RPC for the following reasons: - It's more stable as it was already part of 10.1.3 release. - There is a nice helper to set endpoint address (and other little things). - It does not query for the WSDL every time you instantiate a new object, which is mainly adding HTTP requests I do not want to see in the HTTP Analyzer window. - Most of the time, I can work around schema issues with the no-data-binding options. You just need to learn how to leverage this class: oracle.webservices.SOAPUtil and the 'toSOAPElement()' method. If you are looking into new features, like addressing, ws-rm or any policy-based feature, you should look at JAX-WS. It's the future. For those who are missing setEndpoint(), the equivalent in JAX-WS will look like this: URL endpointUrl; ...

Is bigger really better ?

Image
Do you need dual screen or a bigger screen? For a long time, I have been thinking that having dual screen setup was more productive than having a single screen, then I start to look at some other developers having a single large 24" screen with many xterm. I am getting tired to see pop-up showing up in the middle of the virtual screen that is the result of two screens. I know, the correct answer is to have 3 screens. Then, the small pop-up will be centered in the middle of the virtual space as well as the physical display. Soon, I'm hoping to get a new 24" iMac for my home operations. Yes, I still believe in Santa... My YouTube pick for today (in memory of WebVan): http://fr.youtube.com/watch?v=5TYobcseYfE http://fr.youtube.com/watch?v=fi4fzvQ6I-o Until next time...

Bye bye Vista - Welcome Linux

Image
I have been busy recently, and this is how it translate on my blog. Not much was happening there... I use to post about Web Services, and Vista until that day, where I got a system upgrade. It all started nicely with a nice screen and a simple prompt. The only problem was that it took me to much time before to get to that screen. (I even had the time to turn on the camera on my "Mobile5" device to take the two shoots. That was it. Bye bye vista / Welcome to Entreprise Linux 5. Maybe, it was made to happen, when I picked this background for my laptop. To be fair, I have to said that I got my first 'screen of death' on my iMac during the same periode of time... With all that, I wish you a good day. Next time, I may be back with useful stuff.

Undeploy app from JDeveloper 11g

Image
With Technology Preview II, you can now undeploy your J2EE applications from within JDeveloper - no need to get back to the command line or to write ant task to do this. From the 'view' menu, select the 'Application Server Navigator' Navigate to Application Servers -> IDE Connections -> [AppServerConnection] -> standalone -> Applications Select your application node and using the context menu, pick the 'undeploy' command. It's that simple: [AppServerConnection] has to be replaced with the name of the name you gave to your connection.

JDeveloper .Next

If you are trying to stay on top of the latest technologies in the Java land, you can get your hands on the latest preview version of JDeveloper today: Oracle JDeveloper 11g Technical Preview 2 is available here More on this, once I get a chance to install the Mac OS X version.

Web Services: TopDown vs. BottomUp

As I am going through some more web-services related work, I came across two arguments to favor TodDown (or WSDL first) design pattern: 1) Including the partner link information that BPEL is expecting to find is trivial when you own the WSDL document. Try to get this added at the end of your document, using code first... <plnk:partnerLinkType name="StepTransform" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"> <plnk:role name="XmlStepTransformPort"> <plnk:portType name="tns:XmlStepTransformPort"/> </plnk:role> </plnk:partnerLinkType> 2)Adding wsdl:documentation element within wsdl:portType/wsdl:operation will improve the end-user experience, and should be done always. It's like arguing against the value of javadoc on external APIs.... Today, the mood is WSDL first: Design, then code.

Consistency and Diagnosability - ζ release

This could be another WTF entry, somewhere else... A small sample from a log file,as I was trying to search for some potential explanation - No, I didn't made it up or remove a single line in between. 07/05/24 14:25:52 ------> creating monitor 2007-05-24 14:25:52.203 ERROR WSM-xxxx Unable to find audit event definitions. May 24, 2007 2:25:52 PM xxxx.xxxxx.audit.spi.AuditProvider init just using some xxxxx so that google does not index this blog entry, and you end-up here while trying to find some help on the net. It may be time to rethink the Greek alphabet and start using the letter zeta (ΞΆ)...

Internal Server Error (unexpected null value for literal data)

Image
Here is a slightly different version of an error, that took me more than a blink off an eye to recognize. Unlike in my previous post , the error is coming from the server, wrapped in a soap:fault. <env:Body> < env:Fault> < faultcode>env:Server < /faultcode> < faultstring>Internal Server Error (unexpected null value for literal data) < /faultstring> < /env:Fault> < /env:Body> The root cause is the same -- a serialization error, but this time on the implementation of the service instead of the client proxy. Remember that all the parts of the schema not marked as nullable or optional must have a value. And you have the same options to handle this: change your XML Schema, so that it's aligned with your code. add code in the generated JavaBean, so that you have default value set remember to always use all the setter when instan

JDev 11g new feature - webapp.deploy

Image
If you are moving from JDeveloper 10g to 11g Technology Preview, as I did in the past days, you may find this handy - it took me a while to figure it out, so it may save you time. I used to deploy my Web Services applications directly from the IDE with the context menu on the webapp.deploy node, as in the picture below. With 11g, it's a little different. The node is gone; instead you can find the command directly on the project's node. And, if you want to make modification to the deployment descriptor, you will find a new entry in the project properties screen, under the deployment category. I'll share some more, as there are some nice features. Check the " Test Proxy " feature on Brian's blog.

Who likes F.U.D.G.E ?

The new acronym FUDGE of the day: Fear, Uncertainty, and Doubt around Governance in the Enterprise. No, it's not a cookie , but it goes well with S.C.A: Society of Confused Architects .

Who Need Dual Screen?

Image
I do - a picture is worth 100ths words... And you only need to hit (right-Shift + Print Screen) to get both screens into your clipboard. By the way, you can see the new version of JDeveloper with the WSIL browser and the Test Web Service integration, working on a remote OC4J instance even with 0 project on your local disk - pretty cool. I'll write some more about it once I got it figured out. Nice Work, Alan and Gerard (sorry if I missed anyone).

Latest OC4J released

Image
As we are heading to the 2007 cru for JavaOne, we are also getting the latest oc4j version available, to start playing with the latest technology available on the J2EE trent: get it from OTN on the oc4j homepage . This mark another personal achievement : closing up on the number of posts with Mike, on the OTN Web Services forum.

PHP and JDeveloper - Hand by Hand

Image
If you are looking for a simple editor, with the ability to do simple validation of your PHP files, JDeveloper 10.1.3.2 may be an option for you. Look for the PHP extension using the "Check for Updates..." feature in the Help menu. For long, I have been thinking that scripting was not easy to use, as you have to wait until the execution time to get syntax errors. Now, you can see some of the basic syntax error as you type in. Here are some other resources I wanted to share: - The DeployPHP Series - Configuring MySQL DataSources with OC4J and JDeveloper - How To Use ADF Business Components with MySQL Web services are getting the back seat on my blog;-)

iPod auto sink

Image
Is there anyway we can turn off the use of this nice "auto erase" feature on the iTunes software, so that you don't loose the content if the pop-up " do you want to erase the content of this foreigner iPod? " get the focus as you are typing in text and hit ENTER ? The result is quiet simple: a clean iPod. Cool to go with this piece of electronic equipement to the gym. I guess it will be my lane excuse to go back home directly, tonight ;-) This will be a good one for the 'get a Mac' commercial...

[SOAPAction] Error: Unable to determine operation id

To try to make it easier for those who google with error message, here are two possible explanations for this error message, when using JAX-RPC based Web Service runtine. a) The value of the SOAPAction attribute on the HTTP Header on the wire do not match with the value expected by the service endpoint, as advertised on the WSDL soap:binding. Wire sample: ... User-Agent: Oracle HTTPClient Version 10h SOAPAction: "CalculatePrice" ... WSDL snippet: 44 < binding name = "XmlCalculatePricePort" type = "tns:XmlCalculatePricePort" > 45 < soap:binding transport = "http://schemas.xmlsoap.org/soap/http" 46 style = "document" /> 47 < operation name = "CalculatePrice" > 48 < soap:operation soapAction = "CalculatePrice" /> 49 < input > 50 < soap:body use = "literal" /> 51 </ input > 52 < output > 53

Elections 2007 - qui l'eu cru !!!

Image
Je ressemble à Dominique Voynet 40% Mes points communs avec les autres candidats: 2/ François Bayrou 40% 3/ Olivier Besancenot 36% 4/ Marie-Georges Buffet 36% 5/ Nicolas Sarkozy 32% 6/ Ségolène Royal 32% 7/ Philippe de Villiers 28% 8/ Frédéric Nihous 24% 9/ Jean-Marie Le Pen 16% 10/ Arlette Laguiller 12%

Why do I get a null value back...

Why do I get a null value back from my JAVA object when the data was there in my XML stream? This is a question, that I have seen over and over with different O2X mapping technologies. Sometime using JAXB, sometime using Web Services, and now with SDO. It's also a common issue with .NET Web services. I do see the data on the wire or in my XML file, but I am getting a null value once I try to retrive it using the JAVA accessor APIs. How is this possible, is this a bug? The short answer is No. It's a feature!!! When the instance data do not match with the schema definition, it will be silently ignored by the XML processor (a.k.a. de-serialization layer). Let me try to give a simple example to illustrate this. XML Schema 1 <? xml version = "1.0" encoding = "UTF-8" ?> 2 < xsd:schema xmlns = "http://www.oracle.com/ias/automation/dte" 3 xmlns:xsd = "http://www.w3.org/2001/XMLSchema" 4 targetNamespace

Multiple servies in a single application.

Image
Here are some simple step by step instructions to be able to package two Web Services that implement the same service with different SEI, using a single contract (the wire format as described in the WSDL). Here is the Ant task once would write to achieve this: <o:topdownassemble uri="PojoPricer" output="./to_hide" classname="com.siebel.ordermanagement.quote.psp.PojoPriceCalculator" input="./classes" wsdl="./etc/calculateprice.wsdl"/> <o:topdownassemble uri="XmlPricer" output="./to_hide" classname="com.siebel.ordermanagement.quote.psp.XmlPriceCalculator" input="./classes" wsdl="./etc/calculateprice.wsdl" ear="./dist/${app.name}.ear" databinding="false" appendtoexistingdds="true/> Unfortunately, this will not work, as the two service endpoints are using the same service name. [o:topDownAssemble] oracle.j2ee.ws.common.tools.api.Vali

Scalling your Web Site for the un-expected...

Image
This was so funny (or sad) that I could not keep it for myself: A web application with Oracle's branding that is not able to handle the load as the Access ODBC drivers gets the number of connections down to 0. There was just a few hundreds of frantic web shoppers trying to get first to the registration page. A static HTML form may have done just fine. Next time you design a web site to scale up, remember to avoid unnecessary use of resource that are finite...

soap UI - or a dream come true

Image
If you are on the market for a tool that can help you with your SOA quest, here is a new addition to the mandatory toolbox (or USB key swiss knife). Finding Oracle in the drop-down list, together with Axis and XFire is a sign: there are some real people out there using our stuff. And, the best part is that it works!!! I won't need to continu maintaining my own ant scripts for plain vanilla use of wsa when I am not using JDeveloper. Download the latest here and see it for yourself, if you don't believe me.

Vista unzip performance, PNG files and more

I) Unzip speed. I found an easy work around for my unzip issue; it's called PODP (Plain Old Dos Promt). Thanks to C. Spieler , I can execute unzip from the command line . C:\Users\erajkovi\Downloads>unzip sqldeveloper-1.1.2.2579-no-jre.zip -d \opt II) Screen capture and files size. This may just be a fact: PNG is far from giving you a compression level that is comparable to JPEG on Windows Vista, using Paint. I have done a screen capture of my full desktop screen (1280x1024) and save it in PNG, as I was becoming acoustate to use open formats. The bottom line: vista-desktop.jpg -> size = 190KB vista-desktop.png -> size = 2.690MB I must be doing something wrong... III) SQL Developer Migration Workbench Early Adopter for public evaluation is out !!!

JAX-WS 2.1 : First spin.

Image
JAX-WS 2.1 is out. Here is a blog entry that will give you all the details you need: see the Fast & Furious . For me, it means it's time to give it a try and build some interface to PayPal Web services. The performance improvement seams to be worth a closer look. In my current project, I have start to look at performance between different implementations for a given Business Process, and I am getting to the point were the interpretation of the performance number can be swinged either way, just with a few tweaks on my dataset. Here is a tip I wanted to share with those that are trying to use SOAPElement --the JAX-RPC/SAAJ equivalent of the DOM Element-- when trying to work with large datagram that are handled as XML: Make sure you do not try to preserve whitespace. Otherwise, for every nested element you have (XMLElement) you will have an extra java object to carry the linefeed (an XMLText). It can add up very quick. The key is on line 193, in the code folowing code snippet: 189

Vista and the integrated unzip feature, tips wanted?

Image
If you have any tips to share, please drop me a comment here. It may help other as well... So far, the only result I got from Google are this "Worse Than Failure" entry with screen shoot similar to mine, and an entry from Microsoft's support that seams off topic... Here is how the process started. After I got started on search the net and into the mood that trigger this entry, it got even worth. A few years back, at JavaOne, there was a presentation were Oracle was demonstrating how JDeveloper intaller, or the lack of it, was easy to used, compared to the VisualStudio equivalent of the time. Could have this been done on purpose? Or is this just that I need to turn off the remaining security features that I have still not totaly disabled? By the time the unzip was done with the extra process, I had already configure IIS 7.0 on than same Vista Ultimate instance, thanks to this post . Just remember to enable the new default port on your local firewall. Some things are gett

SOAPFaultException: IllegalArgumentException: Decoding tip

As part of my ongoing work on the SOA and SCA (Society of Confused Architects) bandwagon, I have a new not-so-easy error to explain and share with you. Here is how the error will reads from the client side, when using Oracle Web Services tech Stack on the 10gR3 releases: javax.xml.rpc.soap.SOAPFaultException: Caught exception while handling request: deserialization error: java.lang.IllegalArgumentException The SOAP response will look something like that: 1 <? xml version = '1.0' encoding = 'UTF-8' ?> 2 < env:Envelope xmlns:env = "http://schemas.xmlsoap.org/soap/envelope/" > 3 < env:Body > 4 < env:Fault > 5 < faultcode > env:Client </ faultcode > 6 < faultstring > Caught exception while handling request: deserialization 7 error: java.lang.IllegalArgumentException </ faultstring > 8 </ env:Fault > 9 </ env:Body > 10 <

WS 10.1.3.1 faultcode of the day - env:Server UndeclaredThrowableException

Here is an error that I have seen a few time in the past days, for which I have not find an easy way around. Just a user error, hard to catch... < env:Body > < env:Fault > < faultcode > env:Server< /faultcode> < faultstring > Internal Server Error (Caught exception while handling request: java.lang.reflect.UndeclaredThrowableException)< /faultstring> < /env:Fault> < /env:Body> In playing with the 'mapheaderstoparameters' option for the topDownAssemble target, I forgot to change the method signature on the implementation class before to repackage my application. When the code generated at deployement time does not match with the code packaged in your application, this is the error you may get. Until we get smarter in the code generation and have dynamic services with pre-deployment check, the best remains to make a knot on your handkerchief.

Some random notes, in a developer's reading day.

Here are some random link to resources I found on the Web, that I have read over the weekend, and that I'll keep in my bookmarks for a while. As I am in transit between different computers, I figure out that my blog was not a bad place to keep them handy... A Cost Analysis of Windows Vista Content Protection Just one viewpoint on Vista's content protection system. As a side note, I have seen Vista Ultimate running on a brand new high-end system over the weekend, at a friend's home, with an XBox 360 and a huge TV screen. Very nice !!! I am jealous , I can't do the same with a 24 inch iMac using my Home Theater setup. Musings of a Windows Vista Technical Evangelist A nice blog with tones of tips on Windows Vista. The Top 12 Productivity Killers in Your Development Methodology I especially have this one reasoning in my mind: "Fact 12: Coding conventions are efficient; they must be imposed." I still have not been able to understand why this is not de - jure in

Santa, or a serious ramen shop for serious ramen fans.

Image
Today was another farwell lunch; this time it's mine turn. The destination was Santa , a ramen place downtown San Mateo. The first time I eat there, about 5 years ago, was when I was interviewing for my current job position. Serge, Olivier, the only reel changes since that time are that the Japanese TV shows are no longer part of the 'atmosphere' and that you are both far away. Nilesh will be able to carry on the tradition. After all, there is such thing as a free lunch !!! For some, it was the price to pay to see me going away. So long everyone.

Access to SOAP Header from response payload

As I was trying to explain the difference between SOAPElement (a.k.a. XMLElement or Element in the java world) and Document, I got to realized that this know-how could be usefull when you need to access the content of the soap:header that is comming back from the service endpoint on the response. To illustrate this technique, I'll be using WS-Addessing and the .NET endpoint Microsoft exposes for testing purposes (http://131.107.72.15/WSAddressingCR_Service_WCF/WSAddressing10.svc). In my test scenario, the request looks like this <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Header> <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://example.org/action/echoIn</wsa:Action> <wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsa:

Did I hear Raw Food ?

Image
This was my lunch plate, from koma-sushi in Menlo Park. I'll to see with my coach if this is a good lunch, based on my current exercise level [0 step/day] and my beer drinking exercise from the past days... I guess I really need to get the iPhone to have better picture quality.

Upgrading to Vista today ...

I could not resist on this one... After seeing the PS3 vs WII ads on YouTube, I am getting used to the pattern. but the last " Get a Mac " clip on Surgery made my day. For me, the upgrade was not that painfull after all. just a few hours to scan and rescan the disk - I was using RC2, so it's one could expect as you move to the production release. Next week, I'll try to locate the anti-virus release of Symantec that's supported for Vista - it should be out by now. For me, the killer app on Vista remain the index on the outlook email that can be accessed from the start menu - Spotlight re-invented, just better. By the way, did you see the new iPhone, the phone re-invented, an ipod with a rotary wheel, like in the old days. When are we going to get iPod analog, for the vynil lovers?

Invalid WSDL - and the answer is ...

I forgot to provide the answer on last quizz about invalid WSDL, and XML tips. The WSDL in question: http://www.rajkovic.org/ws/wsdl/bads/annotatedBank2.wsdl The issue: by mistake, I did reuse the same prefix for two namespace. The tns prefix is associated with 'http://ws.rajkovic.org/demo/annotatedBank' at the global scope (wsdl:definitions) and reused with 'http://ws.rajkovic.org/demo/annotatedBank/types' at the schema scope (xsd:schema element). In the wsdl:part, element="tns:create-account" references an element named {http://ws.rajkovic.org/demo/annotatedBank}create-account, which is not found. Based on the schema's targetNamespace, the QName (qualified name) of the element is {http://ws.rajkovic.org/demo/annotatedBank/types}create-account. There are two ways to fix this error: Uses the same targetNamespace URI (and tns prefix) for both WSDL and Schema elements. Keep It Simple as much as possible. Introduce a new prefixe in your wsdl:definition ele

Happy New Year

As we get into 2007, it's time to take new resolutions, and make some predictions. Resolution: to post on this blog once a week, about Web Services and other rant. Prediction: 2007 will be the year of WS-*, the JAX-WS APIs and Java 6.0. Happy 2007 !!!