Java JDK 6 update 5 has got a new JAX-WS 2.1 version. JAX-WS 2.1 among many things has support for WS-Addressing.
Thursday, 22 May 2008
JAX-WS 2.1 - Dynamically changing endpoint address for Yahoo Webservices
At Shopzilla I am currently developing an application that uses Yahoo Webservices (EWS 4.0). One frustration I had today was that they have a special location service that you need to call to get IP address before you can call any other service. I have used wsimport from JDK6 to generate JAXB annotated classes from WSDL document but then I realised that all WSDL documents apart from LocationService.wsdl have a fake port definition in their WSDL file. Something like. USE_ADDRESS_FROM_LOCATION_SERVICE. Now JAX-WS relies heavily on WSDL also at runtime so I couldnt dynamically change the endpoint address. I thought about downloading WSDL file and replacing this string: USE_ADDRESS_FROM_LOCATION_SERVICE with an actual endpoint address but this solution seemed to be hacked and I thought to my self -> there must be a better way of doing this. After researching, poking around and googling I found it!
In JAX-WS every port which you can get from XXXServiceService is a proxy that implements BindingProvider.
You have to cast your port to BindingProvider and get public abstract java.util.Map getResponseContext(); from it. Request context is just a map mapping a string to an object.
When you do that you have to put BindingProvider.ENDPOINT_ADDRESS_PROPERTY property to that request context with the full endpoint address and voila! It works like a charm!
In JAX-WS every port which you can get from XXXServiceService is a proxy that implements BindingProvider.
You have to cast your port to BindingProvider and get public abstract java.util.Map getResponseContext(); from it. Request context is just a map mapping a string to an object.
When you do that you have to put BindingProvider.ENDPOINT_ADDRESS_PROPERTY property to that request context with the full endpoint address and voila! It works like a charm!
ADOBE AIR: New Parleys.com website!
Parleys.com has launched today a new version of their website. It is built using Adobe AIR and I can finally watch presentation on my ubuntu box with power point presentations and before I was forced to use windows for that reason!
Monday, 19 May 2008
Trip to the US
I am flying to America on 27th of May and I will be back on 7th June (11 days). I have B1/B2 VISA for ten years (sic!).
Monday, 12 May 2008
VISA application and my visit to Shozilla in Los Angeles
My USA VISA application was successful and I will be flying to Los Angeles for two weeks.
Sunday, 11 May 2008
Motley Fool and stock market investments
I am studying how to invest on stock exchange. I began my journey by reading a book Motley Fool -> Online Guide to Investing.
http://www.amazon.co.uk/Motley-Fool-Fools-Online-Investing/dp/0752218107/ref=sr_1_2?ie=UTF8&s=books&qid=1210504071&sr=8-2
Having read that I am reading now
http://www.amazon.co.uk/Motley-Fool-Investment-Workbook-Books/dp/0743229983/ref=sr_1_5?ie=UTF8&s=books&qid=1210504071&sr=8-5
This book is supposed to teach me how to evaluate financial position of the company. Learn how to interpret various metrics for quantative analysis and teach some obvious things happening on stock exchange. I have read half of the book and so far I must say half of it was childish but the other half is pretty decent and dives into what I was expecting to find in this book. Currently I am reading a chapter on analysis of financial statements of companies, which ought to be published every year. I must admit that some metrics might be misleading, for instance if company has got lots of Accounts Receiveable you would think it is good. That means that many other companies or people own money to company but company needs to collect that money. If that value increases and the current assets (cash) does not increase -> that means that company has problems collecting its debt and it is considered to be bad debt. There are many more metrics to analyse and I am really just scratching the surface.
Have you ever traded on stock exchange? Do you have any useful tips?
http://www.amazon.co.uk/Motley-Fool-Fools-Online-Investing/dp/0752218107/ref=sr_1_2?ie=UTF8&s=books&qid=1210504071&sr=8-2
Having read that I am reading now
http://www.amazon.co.uk/Motley-Fool-Investment-Workbook-Books/dp/0743229983/ref=sr_1_5?ie=UTF8&s=books&qid=1210504071&sr=8-5
This book is supposed to teach me how to evaluate financial position of the company. Learn how to interpret various metrics for quantative analysis and teach some obvious things happening on stock exchange. I have read half of the book and so far I must say half of it was childish but the other half is pretty decent and dives into what I was expecting to find in this book. Currently I am reading a chapter on analysis of financial statements of companies, which ought to be published every year. I must admit that some metrics might be misleading, for instance if company has got lots of Accounts Receiveable you would think it is good. That means that many other companies or people own money to company but company needs to collect that money. If that value increases and the current assets (cash) does not increase -> that means that company has problems collecting its debt and it is considered to be bad debt. There are many more metrics to analyse and I am really just scratching the surface.
Have you ever traded on stock exchange? Do you have any useful tips?
ESBs and Mule
At work I am creating one application and I am considering to use ESB in future. I am not sure if it is going to be a sensible approach to the problem I am trying to resolve. I was looking the other day on amazon Mule 2.0 book is going to be published soon. There are lots of books on ESBs and I have number of them but they are very generic, talk about message routing, message exchange patterns. ESBs might be a level of complication which we might not need so I will try to establish that. KISS principle will be a driving force but too much KISS also limits as well so it is a balance thing.
The reason I consider Mule is that I think we can free users from "pointless clicking" by automating data exchange between applications. The trick is that I still need to build few applications before I can start thinking about automating data exchange between them. The idea is that every application will have a user interface so that a human being can interrupt process and fix it but in addition every application will have an automated interface for internal inter-application data exchange. I must admit that one problem is also to decide on granuality of applications and services, which ones should be deployed in separate processes and which services should be part of the same application.
The other problem is that some changes might require cooperation with US and them exposing some services via REST or SOAP and they have different set of priorities so to sync all of this might be a challange.
I have seen number of presentation from parleys.com about Mule and ESBs in investment banking and I think I understand more about how it works. We have specific requirements in which we have lots of data exchange (huge files) so not every solution might work out.
The reason I consider Mule is that I think we can free users from "pointless clicking" by automating data exchange between applications. The trick is that I still need to build few applications before I can start thinking about automating data exchange between them. The idea is that every application will have a user interface so that a human being can interrupt process and fix it but in addition every application will have an automated interface for internal inter-application data exchange. I must admit that one problem is also to decide on granuality of applications and services, which ones should be deployed in separate processes and which services should be part of the same application.
The other problem is that some changes might require cooperation with US and them exposing some services via REST or SOAP and they have different set of priorities so to sync all of this might be a challange.
I have seen number of presentation from parleys.com about Mule and ESBs in investment banking and I think I understand more about how it works. We have specific requirements in which we have lots of data exchange (huge files) so not every solution might work out.
Friday, 9 May 2008
JMX and JManage
Since I joined Shopzilla I have been developing one application. As most applications this application has two parts, one is core and one is web application. I wanted to deliver something that is usable as quickly as possible for users. Users are in fact employees of the company so it could be quick and dirty but not much. Users I deal with don't like command like applications and don't have skills to install things like java, python, perl or ruby.
I found a brilliant solution, which has proven to be the right so far. It is JMX. JMX is bit techy but a lot boils down to a frontent application. One is limited in certain way, user interface cannot be as sophisticated as it could be if everything was developed from scratch but the speed at which you can deliver something that works is exceptional.
I have delivered a core and an useable graphical applications after 3 weeks of working. This already provides a business value and Shopzilla is able to monetize on that!
I recommend JManage to everyone it is also brilliant for monitoring of production applications (it was designed to be just that) but can be used for internal applications as user interface is really appealing.
http://www.jmanage.org
I found a brilliant solution, which has proven to be the right so far. It is JMX. JMX is bit techy but a lot boils down to a frontent application. One is limited in certain way, user interface cannot be as sophisticated as it could be if everything was developed from scratch but the speed at which you can deliver something that works is exceptional.
I have delivered a core and an useable graphical applications after 3 weeks of working. This already provides a business value and Shopzilla is able to monetize on that!
I recommend JManage to everyone it is also brilliant for monitoring of production applications (it was designed to be just that) but can be used for internal applications as user interface is really appealing.
http://www.jmanage.org
Wednesday, 7 May 2008
Finding a jar containing a class
I found a nice script that searches through all of your jar files and finds which jars have a particular class. It is a shell script:
mati@mati-ubuntu:~/.m2/repository$ find . -name *.jar -exec csh -c ' (jar tvf $1 | grep org.springframework.jdbc.UncategorizedSQLException) && echo "======= found in $1" ' '{}' \;
mati@mati-ubuntu:~/.m2/repository$ find . -name *.jar -exec csh -c ' (jar tvf $1 | grep org.springframework.jdbc.UncategorizedSQLException) && echo "======= found in $1" ' '{}' \;
Tuesday, 6 May 2008
IPod and Podcasts
I am a happy owner of 80GB IPod and I must say that I like it a lot. I use it mainly to listen to my favourite podcasts. ITunes is full of podcast feeds. My favourite podcasts are:
1. BBC Focus Podcast
2. Polskie Radio - Nauka
3. Polskie Radio - Radionowela - Motel w Pol Drogi
4. Software Engineering Radio
5. Bloomberg news
6. BBC's Digital Planet
7. In Our Time with Melvyn Brag (BBC Radio 4)
8. Parleys.com
9. Java Posse
10. Google's Developer Podcast
11. ThoughtWorks Podcast
1. BBC Focus Podcast
2. Polskie Radio - Nauka
3. Polskie Radio - Radionowela - Motel w Pol Drogi
4. Software Engineering Radio
5. Bloomberg news
6. BBC's Digital Planet
7. In Our Time with Melvyn Brag (BBC Radio 4)
8. Parleys.com
9. Java Posse
10. Google's Developer Podcast
11. ThoughtWorks Podcast
Scrum
New job comes with new responsibilities but also knowledge. Here at Shopzilla they use Scrum and I must admit that so far I like this agile methodology. We have daily scrums in which we quickly tell each other what we are working on. We plan iteration in so called sprints. A lot of these practices I have been doing before but the whole thing was more chaotic, scrum introduces common sense project management practices worth following. I am still learning Scrum so don't consider to me an expert!
You can listen to this great scrum interview with Roman Pichler. It is worth listening.
http://www.se-radio.net/podcast/2007-06/episode-60-roman-pichler-scrum
You can listen to this great scrum interview with Roman Pichler. It is worth listening.
http://www.se-radio.net/podcast/2007-06/episode-60-roman-pichler-scrum
Subscribe to:
Posts (Atom)