Posts

setEndpoint('endpoint') on JAX-WS

I have been so used to the simple way to overwrite the URL endpoint you get from the WSDL location with the Oracle's JAX-RPC client proxy, that I have to remember it's that easy on JAX-WS based proxy: URL endpointUrl; ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointUrl.toExternalForm()); Some reading and video to watch, while your are waiting for your commit,merge, or other integration task to complete: Linus Torvalds on GIT and SCM . My recent YouTube watch: Head tracking: http://www.youtube.com/watch?v=Jd3-eiid-Uw Décompte des manifestants: http://www.youtube.com/watch?v=zFYGxSfVoyU Blue-ray: http://www.youtube.com/watch?v=eiI-z87Hmlk http://www.youtube.com/watch?v=friS4OOcdgQ Mergers: http://www.youtube.com/watch?v=cOlznuyPOeM

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...