The problem in the axis webservice configuration if you get "Error: missing type or ref attribute for node 'unknown'" when you generate the client classes

Lets say this is our bean and service

class Foo{
     String name;
     ClassInsideFoo classInsideFoo;
}

class MyService{
    public Foo getFoo(){
        return new Foo();
    }
}

then the configuration should be
    <service name="myServiceName" provider="java:RPC">
        <parameter name="className" value="MyService"/>
        <parameter name="allowedMethods" value="*"/>
        <parameter name="scope" value="Application"/>
        <namespace>http://example</namespace>
        <beanMapping languageSpecificType="java:com.domain.Foo" qname="ns:Foo" xmlns:ns="http://example"/>
        <beanMapping languageSpecificType="java:com.domain.ClassInsideFoo" qname="ns:ClassInsideFoo" xmlns:ns="http://example"/> (this line generates the error, "Error: missing type or ref attribute for node 'unknown'", should not be added)
    </service>

Posted

iPad ile sahibinden.com da gezmek

nasip olursa kendime bir araba almak istiyorum, tabiki her araba almak isteyen vatandas gibi sahibinden de bakacam arabalara, ayiptir soylemesi yenide iPad'im var hani guzel guzel bakacam ilanlara. gelgelelim sahibindenin sitesi iPad'de calissin diye elden gecirilmemis maalesef, benim icin buyuk hayal kirikligi yaratmistir bu olay, bunun ustune bendenizde sahibinden.com'a iPad icin optimize edilmis bir arayuz yazma planlarina giristim. benim siteyi kullanmamdaki problem otomobil kategorisini sectikten sonra cikan ekranda arac markalarini scroll ederek renault'u secmek istememle baslamisti ve yapacagim arayuzdede oncelikle sadece o kismi duzeltmeyi planliyordum, neyseki co gec olmadan fark ettimki aslinda yeni arayuz yapmaya gerek yokmus, iPad zaten o tarz div'leri scroll edebiliyormus; iki parmaginizi kullanarak sayfa icinde scroll etmek istediginiz kismi scroll edebiliyormussunuz.

Posted

no dots in the html component ids

While preparing a web page dot (.) shoudn't be used in the component ids.

For example
<input type="text" name="foo.id" id = "foo.id"> is not cool instead "foo_id" or "fooid" or something else is cool.
Because when you try to get that component using its id you can't get it

$('foo.id').val() --> undefined
$('foo_id').val() --> working

Posted

Gzip your response in Play framework

I've been using Play framework more than a year now. I didn't use it very heavily but I'm happy with it, because it is very easy to use, easy to find solutions to your problems, and intuitive.

In this time I used Play in my 2 projects. The first one is completed but not being used by the customer yet, the second one is also in the completing stage. In both of them latency was a matter, and I've been looking time to time if there is a solution in the Play community for gzipping applications' responses.

There was a pull request to Play (https://github.com/lights51/play/tree/response-optimization), he actually made the work but it is not added inside the framework, but preffered as an external module.

Using some of his codes and approach I made a simple way to gzip my applications' responses in Play, and shared it in the 'Code Snippets' part of the framework's site (http://www.playframework.org/community/snippets/18).

My contribution to the community yayy:D

Posted

trafik kurallarına uyan ambulansın aq

Bugünkü otobüscü abi ücretleri hazırlayarak gelelim arkadaşlar diyerek milleti aceleylen bindirdi otobüse ondan sonra da 5 dakka durakta bekledi, sonrada tam gaz bastı devam devam ediyo, yolda makaslar falan atarak ilerliyo, herkes dışarıya bakmakta ha çarptı ha ezdi ha ezecek diye heycanla dışarı bakıyo. Böyle heycanlı yola devam ederken bizim otobüs aralardan makaslarla sıyrılırken birden trafik bi durdu, bekle bekle açılmaz, kaptan yolu değiştirdi aynı ayardan devam, nasıl etti bilmiom Keçiörene doğru dönmüştü 10 dakka sonra bi baktım ankamolun ordayız. Haldır huldur devam edio bizim kaptan ışıkta kornalar, son anda frene basmalar falan (heycanı sürekli belli bi seviyede tutmaya çalışıor kendisi, gayette başarılı bu konuda). Bizim abi ankamolun ordan girdi antaresin ordan devam edecek ordan aşağıeğlence dağıtacak bitirecek yolcusunu, inen yolcuda rahatlıyacak kendide rahatlıyacak ama ama trafik yoğunluğu geciktiriyor amacını. Ankamolden antarese giden o ince yolda nedeni bilinmez yol boyunca trafik var, çok durağan bi trafikte bekliyoruz arkadan arkadan bi ambulans sesi geliyor, yolda trafikli olunca herkes stres oldu şu ambulans bi geçse diye, neyse bütün arabalar sağa sola kaçmaya çalışıyor, (bizim otobüs normal seyrine devam ediyor) ambulans bizi geçti bi kaç araba daha geçti sonra tiponun içinden bitane çocuk çıldırmışcasına bağırdı kızdı bizim kaptana neyse o da geçti ilerliyolar, orda tarım ve köy işlerinin sanırım bi yeri var onun çıkışının olduğu yerde yolu ikiye ayıran bariyerleri kaldırmışlar ordan çıkan arabalar karşıya geçebilsin yada karşıdan gelen arabalar içeri girebilsin diye, trafik kurallarına sadık ambulansımız o geçiti kullanarak karşı şeritten gitmeyi akıl edemiyor, ama bizim atik hazır ve nazır kaptanımız o trafiği çekmiyor, tam gaz karşı şeritten yardırıyor, ambulansın yanından geçiyoruz trafikte bekliyor biz ilerliyoruz......üzüldüm

Posted

İntellij'de 'I' içeren karakterli arama yapmak

İntellij'de içerisinde 'I' karakteri içeren bir kelimeyi arattığınızda bulmayabiliyor, idea.exe.vmoptions dosyasına "-Duser.language=en" yazdığımda artık arama sonuçları düzgün geliyor

Posted

Saving and retrieving image from MySQL using hibernate

I have created a PersistentImage class to convert the image byte array and vice versa;

public class PersistentImage {
    byte[] data;

    public BufferedImage getImage() {
        InputStream in = new ByteArrayInputStream(data);
        try {
            return ImageIO.read(in);
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }

    public void setImage(Image image) {
        int width = image.getWidth(null);
        int height = image.getHeight(null);
        int type = BufferedImage.TYPE_INT_ARGB;
        BufferedImage bi = new BufferedImage(width, height, type);
        Graphics2D g2d = bi.createGraphics();
        g2d.drawImage(image, 0, 0, null);
        g2d.dispose();

        ByteArrayOutputStream bas = new ByteArrayOutputStream();
        try {
            ImageIO.write(bi, "jpg", bas);
            data = bas.toByteArray();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

and the mapping is like 

            <component name="picture">
                <property name="data" type="binary" column="PICTURE"/>
            </component>

Posted

My redmine 1.2 setup command history, on a brand new linode 512 vps

    1  sudo apt-get update
    2  sudo apt-get upgrade --show-upgraded
    3  echo "fdnsoft" > /etc/hostname
    4  hostname -F /etc/hostname
    5  dpkg --install webmin_1.550_all.deb
    6  apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions
    7  apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions libapt-pkg-perl
    8  sudo apt-get install ruby
    9  sudo apt-get install subversion
   11  cp redmine-1.2/database.yml.example redmine-1.2/database.yml
   12  cp redmine-1.2/config/database.yml.example redmine-1.2/config/database.yml
   13  vim redmine-1.2/config/database.yml
   15  unzip rubygems-1.5.3.zip
   16  ruby rubygems-1.5.3/setup.rb
   17  gem1.8 install -v=0.4.2 i18n
   18  gem install rails -v=2.3.11
   19  gem1.8 install rails -v=2.3.11
   20  gem1.8 install rack -v=1.1.1
   21  apt-get install mysql-server
   22  sudo apt-get install libmysqlclient-dev
   23  gem1.8 install mysql
   24  apt-get install mysql-client
   25  gem1.8 install mysql
   26  cd redmine-1.2/
   27  gem1.8 install mysql
   28  sudo apt-get install ruby-full
   29  gem1.8 install mysql
   30  sudo apt-get install libmysqlclient
   31  sudo apt-get install build-essential
   32  gem1.8 install mysql
   33  mysql -u root -p
   34  rake generate_session_store
   35  RAILS_ENV=production rake db:migrate
   36  RAILS_ENV=production rake redmine:load_default_data
   37  clear
   38  history

Posted

PhoneGap + iPhone

Having completed the steps on http://www.phonegap.com/start

My project didn't worked as i was expecting, libPhoneGapLib.a and phonegap.js were missing

to correct it I needed to do 2 more things

1. PhoneGap installation creates a Xcode project under /Users/username/Documents/PhoneGapLib, I needed to open this project and compile it

this made libPhoneGapLib.a available

2. I copied phonegap.version.js from /Users/username/Documents/PhoneGapLib/javascripts folder to myProject/www folder

after that I was able to continue as expected

Posted