Posts tagged web service
I was googling trying to find any example how-to do it on client side. There is a plenty numbers of examples for server side. In theory it should be easy – implement Handler interface and add it to particular phase in execution queue – easy? Yes! In practice not really 🙁
I wasn’t able to find any example how I should instruct Axis 2 client to use my handler. I found that I must create axis2.xml configuration file and put on class path, then Axis will auto-magically read that file and my handler will work! In practice it didn’t work, to inform Axis 2 base client that it should use that specific configuration I had to change the way how I was creating stubs.
I based my axis2.xml file on original one from main Axis 2 jar. I just removed classes that have been depending on JavaEE 5 (J2EE rulez!) to had everything up and running! I added my handler to OperationOutPhase phase – hopefully is the correct one 😀
The funny thing was that each time I started my WebLogic server my start up environment just blown up! After stopping server I had to reinstall it to be able to rebuild a project 😛
Anyway, my first approach got positive opinion and will be implemented! Uff… I could get rid of this whole Axis 2 custom configuration!
Another day I was fighting with Axis 2 and optimizing namespaces for Xml generated from XmlBeans – I mentioned that in my previous post. With help from a team mate I was able to introduce changes to how Axis 2 Ant task generating client’s web service stubs. I modified XSLT file used to do that – I was basing on existing issues with exactly the same problem. I followed the advice and changed XSLT template, added also some debug info and functionality do save results to file – to be sure I got what I wanted to get.Платежки на зарплату
Everything went well, the first results were promising so I started an application to have a full test. And then I got such a problem:
It looks like one of web services has some problems with optimized namespaces because the application is calling few other web services before I hit in the trouble with that one 😛
So after two day I’m still in the same place!
I got a new task! Hurraaa! I’m not able to be bored at work 😉
It was once again related to print layout, but I’m not complaining. Many of them was quite simply – move one line there, make some part of text bold, change text size and so on. Nothing complicated. Till the last task.
I had to show on a print page customer’s bank location, but not a name – some 6 digits long number! We have dedicated web service to retrieve such informations base on logged in user. So I started looking in to it to find that data. Yeah… bunch of XMLs with different data structures… hopeless job! I tried asking around, maybe someone already did that or would be able to push me in right direction, but no luck! I asked our architect, but he didn’t know also, he will try to find someone who did the web service 😉
The last chance left, try to ask a business guy for some example of the value and then traverse databases to find that data 😀 So, it looks like I have a work for next day!