Sunday, January 25, 2015

Flying Saucer API Chinese font problem

I have an HTML page with Chinese text in it . I use Flying Saucer API Version R8 to convert the HTML to PDF. Below are two set of problems I am facing.

1. Need Bold and Italic in text.
2. Line wrap is issue and much of line text is lost due to incorrect line wraps.

Solutions :

The support will come in R9 version which does not exist since 2011 so there is no point in waiting for it.

There are some extension which can solve both of the above problems, but I may not be able to use such extension because of restrictions.

Luckily there are work arounds :
1. Chinese/Japanese text never has Bold or Italic because the strokes are important in characters and bold font and italic fonts will ruin it. So we cannot do anything about it. I am using ArialUni font which does not support bold or italic.

2. For line wrap , added space between every chinese 'comma', 'period' , 'semi colon' characters. It works fine.

Saturday, January 24, 2015

Not able to locate adb.exe in windows 7

The adb is located here :
C:\AndroidStudio\platform-tools\adb.exe

Wednesday, January 21, 2015

My Git hub repository

Here is my public git hub reposiotory link
Currently I am working on Android applications , you can get the code from below link :

https://github.com/yogiji

Thursday, January 15, 2015

svn connector

If you did not install the svn connector when eclipse/RAD restarted then you can get it from below link

http://community.polarion.com/projects/subversive/download/eclipse/4.0/builds/

On RAD 8.5 the install routine fetches com.lowagie.itext_1.5.4.v20090305.jar.pack.gz from a mirror.

On RAD 8.5 the install routine fetches 
com.lowagie.itext_1.5.4.v20090305.jar.pack.gz from a mirror.  It then decides 
it doesn't like what it downloaded and gets the same file from a different 
mirror.  It decides it doesn't like the file and repeats the process with a 
different mirror.  It keeps doing this forever. 

Solution :  Apparently one of RAD's repositories is messed up.  
Don't use RAD's default repositories.
First, add the desired Eclipse update site URL to RAD.  In the "Install New 
Software" dialog click on the Add button.  For Name call it whatever you 
want, I chose "Subclipse Direct 1.10.x".  In the location field paste the 
appropriate Eclipse update site URL from the subclipse.tigris.org Download 
and Install page.  Click OK.
Second, in the Work With drop down select the site you just added.
Third, you should see Subclipse and SVNKit below.  Expand them and install 
the projects/features you want.
Fourth, uncheck the "Contact all update sites during install to find 
required software" checkbox.  Doing this step without doing the first 3 
steps will NOT work.  
Fifth, continue the install process as normal.  It won't hang up on itext 
anymore.

Tuesday, January 6, 2015

Web Services Interview Questions

What types of operations are available in WSDL?

There are four operations available:
1. One-way, where the operation can receive a message but will not return a response.
2. Request-response, where the operation can receive a request and will return a response.
3. Solicit-response, where the operation can send a request and will wait for a response.
4. Notification, where the operation can send a message but will not wait for a response.
What tools are used to test a web service?
I have used SoapUI for SOAP WS and Firefox poster plugin for RESTFul Services.

Differentiate between a SOA and a Web service?
SOA is a design and architecture to implement other services. SOA can be easily implemented using various protocols such as HTTP, HTTPS, JMS, SMTP, RMI, IIOP, RPC etc. While Web service, itself is an implemented technology. In fact one can implement SOA using the web service.

Discuss various approaches to develop SOAP based web service?
We can develop SOAP based web service with two different types of approaches such as contract-first and contract-last. In the first approach, the contract is defined first and then the classes are derived from the contract while in the later one, the classes are defined first and then the contract is derived from these classes.
If you have to choose one approach, then what will be your choice?
In my point of view, the first approach that is the contract-first approach is more feasible as compared to the second one but still it depends on other factors too.
Can you name few free and commercial frameworks for web services?
The frameworks I know are Apache Axis2, JAX-WS Reference Implementation, JAX-RS Reference Implementation, Metro, Apache CXF, MS.NET and Java 6.
Explain in brief, what DISCO is?
DISCO means discovery. It groups the list of interrelated web services. The organization that provides web services, issues a DISCO file on its server and that file contains the links of all the provided web services. This standard is good when client knows the company already. Also it can be used within a local network as well.

Define a REST web service.

REST is Representational State Transfer and it is a network of web pages where the client progresses through an application by selecting links. REST is an architectural style that uses existing standards such as HTTP.

What is SOAP?

Simple Object Access Protocol
<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

<soap:Header>

</soap:Header>

<soap:Body>

  <soap:Fault>
  
  </soap:Fault>
</soap:Body>

</soap:Envelope
WSDL file contains following :

<types>data type definitions used by the web service
<message>typed definition of the data being communicated
<portType>set of operations supported by one or more endpoints
<binding>protocol and data format specification for a particular port type