Thursday, December 2, 2010

Jaxp Error ' Content is not allowed in prolog.'

I had the above error when I tried to transform a xml in to another xml.
The mistake was, I have pass the xml file as a ByteArrayInputStream instead of InputStream. I was searching every where about the error but no clue with my code.

            xsltFile = getInputStream(xslPath);
            xmlFile = getInputStream(inputXML);
            Source xmlSource = new StreamSource(xmlFile);
            Source xsltSource = new StreamSource(xsltFile);

            // the factory pattern supports different XSLT processors
            TransformerFactory transFact = TransformerFactory.newInstance();               
            Templates cachedXSLT = transFact.newTemplates(xsltSource);
            Transformer trans = cachedXSLT.newTransformer();

            writer = new StringWriter();
            trans.transform(xmlSource, new StreamResult(writer));


Try to chenge the input type and it would help for you.
Aalso I saw some info in Wrox site.

Sri Lanka - Anyone needs B Positive Blood ?

I have B+ Blood if anyone wants can donate.

Tuesday, October 26, 2010

DIALOG GSM GPRS/MMS Settings for Sri Lanka

DIALOG GSM GPRS/MMS Settings for Sri Lanka

““Sanctuary in the middle of nature” The Wallawwa

It was a wonderful experience to be able to rest in a natural and rich surroundings before my long flight to Toronto. The Garden suite and the bathrooms were huge and I couldn’t have asked for more. I enjoyed the gentle winds and the breathtaking spectacular view of the natural beauty of the place along with the mature trees and birds. Amenities, cleanliness and impeccable service of the helpful and friendly staff made my stay pleasurable. Close to the Katunayake International airport, they have made sure that this place is always immaculate and pure for a comfortable sleep. Soft beddings with high quality linen were extras added to this relaxed atmosphere. An Escape from the ordinary, there was breathtaking landscapes and the delightful cuisine was lovely. The spa was another extra facility for tranquility. You will truly enjoy yourself if you want to get away from all the hassle before your Journey. “Sanctuary in the middle of nature”

Mobitel MMS GPRS settings

I wanted to enable MMS and Internet for my new NOKIA 2720. I took the Mobitel customer service (0712755777) and they kept me for more than 17 minutes as they say "We Care Always".
I tried another day and fortunately they caught me withing 5 min. So the person spoke from other side said that he will sms the settings shortly. As he said I got 2 sms but those are not the settings.
Mobitel gives only 2 free calls to contact their customer service per month and now my free calls were finished. So I took another call from one of my friends phone and explained the discussion I had with their fellow. Without listening to me properly this stupid man said me he will send it again and if that does not work, try with 222#. He sent the configuration details to my friend's phone not to mine.
Then I tried with 222# but it did not work. I took another call from my friend's phone then another girl spoke, said me that she can not send the details to my phone, I have to take the call from the one which setting wants. I said I am already done with my free calls and she said me to wait till next month Or go to their dealer shop.

Later I tried in my phone settings and finally I got fixed it. Here's how I did it.

Menu > Settings > Configuration > Device Manager Settings > Service Provider Software Updates

In above place select "Always Allow" option.
Then I tried with #222# and it worked.

I found another link I would like to share with you all. I did not try with this but FYI.

Monday, June 28, 2010