Friday 20 April 2012

how to use singleton class for handling multiple request at runtime

I faced this issue when i was working with one of my web project. The issue comes in picture when i generated web stub to use web methods for a particular wsdl URL. Previously i had requirement for hitting one web port only but later i received requirement for handling multiple web port at run-time.As i had only one singleton class for dealing with one web port so i used my design pattern in which i created one hash table like bucket in which i put object first time and second time the request search for the old object inside bucket.In this way we can create multiple singleton object each referring to a separate wsdl URL. so my problem got solved.

Not getting intelligence in layout xml in android

Simple and small solution: just restart your computer :)

Saturday 14 April 2012

Apache CXF 2.5 Issue- Two classes have same XML type and namespace issue.


I faced this issue while i was working on one of my web service project. I was trying to consume soap web service using Apache CXF 2.5 framework.I generated the web stub to use web services directly from web method generated. I used wsdl batch file to generate web stub.First time i got some error some of the methods as they were not getting appropriate jax-ws environment. so i resolved this error by generating the web stub using augmented command like : wsdl2java -frontend jaxws21 <wsdlurl>
Then my web method error get removed . Now to remove actual error: IllegalAnnotation..20 counts found.
I was getting this error when i was running my project in server mode but it was running proper as java application. So when i include the Apache CXF 2.5 lib into WEB-INF folder. My problem get resolved.

How to add google account in AVD .

I faced this issue while i was trying to implement C2DM push at my AVD in android version 2.2.
This was very small thing but no where find any solution clearly to add google account in emulator .
So Here is the solution:
Create an AVD with target as google api's .It will automatically provide you google account option
when you will visit from Setting -> Accounts & Sync