Tuesday, December 26, 2006

SOAP Client: A simple Web Services testing tools for Mac

I was discussing with a friend about SOAP testing tools. We all know SOAP UI that is a very powerful one, but I am also using a very simple one developed on Mac for Mac (cocoa based application), this application is SOAP Client:

Saturday, December 23, 2006

VMWare finally on Mac (Beta)

As Mac user I sometimes need to use Windows (too often...) or Linux computer, and for this I have been using either my PC or Parallels. Parallels is great but in my daily job my coworker are mainly using VMWare images....

VMWare has now open the VMware Virtualization for Mac Beta Program. If you like me need virtualization jump on it and give feedback...

Friday, December 22, 2006

A nice christmas present for Groovy and Grails project

The groovy project gets funding for its development. Big Sky is hiring Jochen Theodorou one of the Groovy commiter. For the people that do not know Big Sky, Big Sky is the company behind the the No Fluff Just Stuff symposium tour. Talking about this symposium, in 2007, Groovy and Grails will have a dedicated track.

More about this funding:


In addition to this very good news, here some other activities around Groovy and Grails:
  • Releases of Groovy 1.0 and Grails 0.4
  • Two books on Groovy and one on Grails.
  • A dedicated Groovy and Grails website: aboutGroovy.com
  • Also a dedicated Groovy and Grails conference: the Grails eXchange 2007
  • And the third Groovy Developer Conference in Paris at the end of January

Tuesday, December 5, 2006

Web Conference: Groovy & Grails UG London

The London Groovy and Grails User Group will be holding their next meeting on Wednesday, 6th December 2006 at Skills Matter in London and for the first time ever the meeting will be available via a live web conference, so don't worry if you are not in London! Speaking at this month's meeting will be Graeme Rocher, Grails Project Lead and CTO at Skills Matter. During his talk entitled; Grails Dynamic Tags: Making Tag Libraries Agile, Graeme will discuss Groovy Server Pages and its support for the creation of dynamic tag libraries without the need for configuration. John Wilson, Groovy Committer, will also be presenting at this meeting. During his talk, entitled; The MetaClass: How Groovy works Under the Hood, John will shed light on the MetaClass so you can better understand its' function and see how to use it to get your Groovy programs smaller, clearer and faster. For more information on attending this meeting or signing up for the web conference, please go to: http://skillsmatter.com/groovy-grails-ug

Monday, December 4, 2006

Calling a Web Services Protected using HTTP Basic

WS-Security provides a way to protect Web Services at the message level (SOAP) and it is independent of the protocol used (HTTP, JMS, ...). However, some services are still using HTTP based authentication for protection. JAX-RPC and its Oracle implementation provides a way to set the username and password in the client (Stub) using some properties on the Stub.

             ((Stub)port)._setProperty(Stub.USERNAME_PROPERTY, "username");
             ((Stub)port)._setProperty(Stub.PASSWORD_PROPERTY, "password");           

That's it...

Theses properties are shortcuts to the standard JAX-RPC properties:

                javax.xml.rpc.security.auth.username
                javax.xml.rpc.security.auth.password

This code is the same when you are using the Call interface.

Tuesday, November 28, 2006

OC4J: Sending system level message in the console window

OracleAS 10gR3, so OC4J standalone, is using the standard Java logging framework. Some of the benefits are easy configuration, and extensibility. The configuration of the level of logging of the different loggers has been exposes in the Oracle Application Server Console. To see the logger configuration, click on the Administration Tab and then Logger Configuration, you can then configure the different loggers.

Oracle ASC Logger Configuration

By default the logger will write all the information in the default log.xml file, and for application lever logger it will go in the application.log. You may want to send the information in the console during development to debug/analyze your application. This is done using the configuration of the Handler. This information is currently not available in the Application Server Console, so I am documenting in the next steps how to send the information in the console (terminal window).

The configuration of the OracleAS Logging is saved in the $ORACLE_HOME/j2ee/home/config/j2ee-logging.xml file. In this file you  can see that Oracle has defined various handlers where information can be sent:
  • console-handler : Log the information in the console (the one we want to use in this sample)
  • oc4j-handler : the default handler for most of the loggers, saving the information in the $ORACLE_HOME/j2ee/home/log/oc4j/log.xml using the Oracle Logger formatting
  • oracle-webservices-management-auditing-handler : the handler used by the Web Services Auditing feature in the $ORACLE_HOME/j2ee/home/log/wsmgmt/auditing/log.xml 
  • oracle-webservices-management-logging-handler : the handler used by the Web Service Logging feature in the $ORACLE_HOME/j2ee/home/log/wsmgmt/logging/log.xml 
As you may know, OracleAS Web Service provides out of the box support for Auditing of the SOAP messages. You just need to go in the administration page of the Web Service and enable the auditing. By default the messages are logged in the auditing log pointed above. But during development it is really interesting to see the SOAP Messages in the console without having to configure a Proxy to capture the request/response. The easiest way to do that is to edit the j2ee-logging.xml file and associate the console-handler to the auditing logger using the following configuration:

      <logger name="oracle.webservices.management.auditing" level="NOTIFICATION:1" useParentHandlers="false">
         <handler name="oracle-webservices-management-auditing-handler"/>
         <handler name="console-handler"/>
      </logger>
by doing this you will see the SOAP Message in the OC4J console that is running in your system.

console-ws

You can also use this configuration with any loggers available in OC4J.