XML - WML; Unable to open in WAP/WEB browser

I am trying to convert an XML document into a WML document. I have the following code:
private void generateWML() {
     wmlPath = root+System.getProperty("file.separator")+"results.wml";
     File results = new File(wmlPath);
     try {
          //instantiate a TransformerFactory
          TransformerFactory tFactory = TransformerFactory.newInstance();
          //Generate TRansformer object using stylesheet Source
          Source stylesheet = new StreamSource(stylePath);
          Transformer transformer = tFactory.newTransformer(stylesheet);
          transformer.setOutputProperty(OutputKeys.INDENT, "yes");
          transformer.setOutputProperty(OutputKeys.MEDIA_TYPE, "text/vnd.wap.wml");
          //Use transformer to transform XML source and send the output to SourceResult object
          StreamSource xmlIn = new StreamSource(xmlPath);
          StreamResult wmlOut = new StreamResult(results);
          transformer.transform(xmlIn, wmlOut);
     catch (TransformerConfigurationException tce) {
          out.println(tce.getMessage()+"<br />");
     catch (TransformerException te) {
          out.println(te.getMessage()+"<br />");
}I can open the resultant wml file in my text editor, but am unable to load the file both in IE and in my WAP phone simulator.
I get an alert box saying Access to the specified device, path, or file is denied when I try to open the file in IE, and I get a No response, Try again alert when I try to load the file in my Nokia Mobile Internet Toolkit.
Does anyone know how to solve this problem?
Thanking in advanced.
gerbera

Hi ,
I've a problem in browsing in WAP phone simulator. I use xml --> xsl --> wml.
But, in wap phone, i can see only "url not found" error. How can i solve it?
Plz help me if possible.
Here's my code.....
----------------------------- address-wml.xsl ------------------------------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template
match="contact">
<xsl:processing-instruction name="cocoon-format">
type="text/wml"
</xsl:processing-instruction>
<wml>
<card id="index" title="Your Contacts">
<p align="center">
Phone Book
</p>
</card>
<card id="contact" title="Phone Book">
<p>
<b><xsl:value-of select="name/first-name"/>
<xsl:text>
</xsl:text>
<xsl:value-of select="name/last-name"/></b>
<xsl:value-of select="phone"/>
<do type="accept" label="More">
<go href="#Address"/>
</do>
</p>
</card>
<card
id="Address" title="address">
<p>
<b>
<xsl:value-of
select="name/first-name"/>
<xsl:text> </xsl:text>
<xsl:value-of
select="name/last-name"/>
</b>
<xsl:value-of select="address/street"/>
<xsl:value-of select="address/city"/>
<xsl:value-of
select="address/state"/>
<xsl:value-of select="address/country"/>
Main
<do type="prev">
<prev/>
</do>
</p>
</card>
</wml>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------- homer.xml ------------------------------------------------------------
<?xml-stylesheet href="address-wml.xsl? type="text/xsl? media="wap"?>
---------------------------------------------- sitemap.xmap --------------------------------------------------------
<?xml version="1.0"?>
<!-- CVS $Id: sitemap.xmap,v 1.13 2003/11/18 07:12:10 tony Exp $ -->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<!-- =========================== Views =================================== -->
<map:views>
<map:view name="content" from-label="content">
<map:serialize type="xml"/>
</map:view>
<map:view from-label="content" name="pretty-content">
<map:transform src="context://stylesheets/system/xml2html.xslt"/>
<map:serialize type="html"/>
</map:view>
<map:view name="links" from-position="last">
<map:serialize type="links"/>
</map:view>
</map:views>
<!-- =========================== Pipelines ================================= -->
<map:serializers>
<!--<map:serializer logger="sitemap.serializer.wml" mime-type="text/vnd.wap.wml" name="wml" src="org.apache.cocoon.serialization.XMLSerializer">
<doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public>
<doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system>
<encoding>ASCII</encoding>
<omit-xml-declaration>yes</omit-xml-declaration>
</map:serializer>
</map:serializers>
<map:pipelines>
<map:pipeline>
<map:match pattern="homer.wml">
<map:generate src="homer.xml"/>
<map:transform src="address-wml.xsl"/>
<map:serialize type="wml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>

Similar Messages

  • Unable to open reports in web browser through 9ias

    Hi ...
    I got the following error when i am clling from web.
    I saved my reports into database from .rdf format.
    Error: The requested URL was not found, or cannot be served at
    this time.
    Oracle Reports Server CGI - Report Job has terminated with error.
    Reports Server Replies:
    REP-0110: Unable to open file 'STATION'.
    REP-1070: Error while opening or saving a document.
    REP-0110: Unable to open file 'STATION'.
    I wouid appreciate any help
    Regards
    Gopi

    Hi,
    Just check I think users are executing reports first time, Go to Start Menu of Windows -> All Programs -> Business Explorer -> Analyser.
    Then a pop windows will come which will ask for enabling Macros in Excel.
    Check the Authorization Role for User in TCode PFCG, Check the Sub option for S_RS_COMP & S_RS_COMP1.
    Regards,
    Rajdeep.

  • Unable to open PDF in Web Browser and delay for printing

    In my LAN, on several PCs running with Windows 7 (32 and 64 bits), I observe two problems with "Acrobat Reader XI":
    - Delays / unable to open pdf files in the web browser (Internet Explorer).
    - Delays in printing: for example it takes over 8 minutes to print a pdf file: 400kB for two pages (on different printers / models).
    Here's the list of actions that I've allready tried to issue those problems:
    For the Web Browser problem :
    - Repair the "Acrobat Reader XI" installation.
    - Uninstalling and Installing Acrobat Reader.
    - In the web browser, disabling and activating the add-on (Adobe PDF Reader).
    - Uninstall "Acrobat Reader XI" and install "Acrobat Reader X"
    Temporary issue: downgrade to "Acrobat Reader 9", which solves the problem with the web browser.
    For the printing delay:
    - Repair the "Acrobat Reader XI" installation
    - Change the printers drivers (install Universal Drivers PCL)
    - Check the box: "Print As Image" before printing
    Any Idea ?

    You can get that error if there is still an old Adobe Reader plugin in the plugins folder in the Firefox program folder.
    C:\Program Files\Mozilla Firefox\plugins\nppdf32.dll
    See also http://kb.mozillazine.org/Adobe_Reader

  • Unable to open up another web browser when using a button among item

    I am trying to call another web page(pop up window) with button displayed among items, the problem is there is not place to put a URL redirect. I could only do it with a button not displayed among items by putting in URL javascript: openPopUp(); which is calling a function which is in the HTML Header of my page.
    function openPopUp()
    window.open('f?p=&APP_ID.:14:&SESSION.::NO.:::','Popup','width=800,height=500,scrollbars=1,resizable=1');
    Doews anyone have an idea. I was unable tofind an in this forum that would work for me.
    Thanks
    Aron

    Aron,
    Did you try to add the link in the button Attibutes property ?
    Button>> edit >> attribute : onClick="javascript:window.open('f?p=&APP_ID.:14:&SESSION.::NO.:::','Popup','width=800,height=500,scrollbars=1,resizable=1');"
    This should work,
    Thanks
    Sam
    Please reward good answers by marking them corrent or helpful!

  • Unable to open reports with Web intelligence

    Hi there,
    We are unable to open reports using Webi Intelligence.  Error of "Session is closed(Error: INF)" apears.
    I have restarted the SIA and Apache services with no luck.
    Version : Business Objects XI3, Edge Series professional
    Kind regards,

    Try changing the idle connection timeout on your Web Intelligence Processing Server to 60 minutes (from the CMC).
    If this doesn't work, please add a trace to the Web Intelligence Processing Server (add a -trace to the command line parameters of the server). and post the log for the relevant time period.

  • "This form cannot be opened in a web browser. to open this form use microsoft infopath" while adding a new Approval - Sharepoint 2010 and Publishing Approval workflow.

    I am trying to add a new workflow to a document library with the below mentioned settings and getting error saying "This form cannot be opened in a web browser. to open this form use microsoft infopath" while adding a new Approval - Sharepoint
    2010 and  Publishing Approval workflow" . For your information the I have checked the server default option to open in browser.
    Versioning Settings.
    Error
    This is quiet urgent issue . Any help would be really helpful.. Thanks.. 

    Hi Marlene,
    Thank you very much for your suggestions.
    But I am not creating a custom workflow in designer as Laura has mentioned. I am instead trying to create a new Out of the box Approval Workflow and I get the error mentioned above.
    As it works in other environment, I tried figuring out the possible differences which can lead to this error.
    Today I found one difference which is there are no form Templates within Infopath Configurations in Central Admin. Now I am trying to figure out what makes this form templates to be added to the template gallery.
    Regards,
    Vineeth

  • Opening PDF in Web Browser(IE)

    Hi,
    I have written a program to download PDF file. When user will click on "Download" link, PDF file should open in web browser IE itself. Currently file is opening in separate window. I am creating this PDF file run time and it is not stored in harddisk. In Acrobar Reader, I have checked the check box "Display PDF in browser". Despite this it is opening in separate window.
    I have written following code:
    byte abyte0[] = pdfGenerator.generatePDF(getXslFile(instancedata), new String(instancedata.requestResult.message, "UTF-8"));
    httpservletresponse.setHeader("Cache-Control", "no-cache");
    httpservletresponse.setHeader("Cache-Control", "max-age=0");
    httpservletresponse.setHeader("Content-Disposition", "inline; filename=" + instancedata.userId + "_" + System.currentTimeMillis() + ".pdf");
    httpservletresponse.setContentType("application/pdf");
    String s = new String(abyte0, "UTF-8");
    servletoutputstream = httpservletresponse.getOutputStream();
    servletoutputstream.write(abyte0, 0, abyte0.length);
    servletoutputstream.flush();
    Kindly suggest what is required to open PDF in Web browser (IE).
    Regards,
    Dev

    I don't see anything wrong here offhand.
    In your download link, you aren't using target="new" or anything, are you?

  • One or more PDF documents are open inside a web browser - message

    Hi,
    I have a new L series notebook and its great. The only foible I can think of is a message I keep getting when I try to shutdown. There is a message box that says "One or more PDF documents are open inside a web browser. If you exit adobe reader now, those documents will be closed. Are you sure you want to exit?".
    The thing is I do not have any PDF's or web browsers open at the time! Can you help me please?
    Thanks, Mark.

    Hi Mark
    Believe me its nothing serious the same happens on my notebook from time to time
    Usually the PDF files can be read with the Adobe Acrobat reader. This application service runs in the OS background and this message can appears if the Adobe Acrobat reader cannot close the background process automatically
    I have solved this tiny problem by removing the acrobat reader from the system. After new reboot I have reinstalled it again
    Now the message does not appear and all runs like a dream ;)

  • Loading a website without opening a new web-browser

    Can someone tell me how to load a webpage without opening a new web-browser, having it displayed on the current one...
    I have tried the following code but it opens up a new browser instead... :
    getAppletContext().showDocument(new URL("http://www.angelfire.com"), "_blank");
    Million thanks

    getAppletContext().showDocument(new URL("http://www.angelfire.com"), "_self");

  • My course designed in Captivate 5 will not open in the web browser when published or in preview mode

    Does anyone know why my course will not open in a web browser. It's a pretty standards course. It's 800 X 600 with 73 slides that are all about 10 seconds long. It does have a few videos incorporated, but I removed them and published and I still got nothing in a web browser. Any ideas?

    I'm afraid you haven't given us enough information to know how to help you.
    More details please. 
    Screenshots of what you see perhaps?
    Do you have the same issue with a new blank project uploaded to the same publish folder with the same browser?

  • Open URL in Web Browser from a Java Application

    Hi,
    I have an HTML document that I want to load in a browser window by clicking on a button in my java GUI application.
    Any suggestions?
    Thanks.

    You can use the Process class to start the web browser with the proper command line arguments (depends on the web browser though). Or on windows, you can have your program create a batch file with the code start url (where [url] is your url), and this will open the default web browser when run (again you must run it with a Process).

  • Openning a native web browser on Air desktop app

    I have developed an desktop air app with aptana studio.
    i want to attach a google adsense banner into my air app.
    but i got a problem that air app doesn't open a native webrowser.
    How can app open a native web browser when click in iframe?

    The iframe seems to load code from a remote location, and thus this code will be in a remote sandbox, not in the application sandbox, for obvious security reasons. This means that the code inside the iframe will net be able to use the air APIs.
    If you can control the content from the remote location, you can use the parent sandbox bridge (http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7f08. html#WS5b3ccc516d4fbf351e63e3d118666ade46-7edd) to make a call from inside the iframe to the main application to open the browser window.
    Otherwise, I don't think there's a way for content loaded from a remote location to open native browser windows (this would be a security issue).

  • "Unable to open document in this browser"

    I get this notification when I try to open this documents. "Unable to open document in this browser".

    In firefox go to Tools>Options>Applications. Find Portable document format (PDF), click the drop-down next to it and choose "Use Adobe Reader.

  • Unable to open the Project web app Instnace , giving STS error

    I am unable to open the Project server web app instance from CA- Proejctserver application service -- Manage , it is giving error and I am unable to open the instance as well http://intranet.cmpy.com/pwa also giving error . LOg is showing as below
    An operation failed because the following certificate has validation errors:  Subject Name: CN=SharePoint Security Token Service, OU=SharePoint, O=Microsoft, C=US Issuer Name: CN=SharePoint Root Authority, OU=SharePoint, O=Microsoft, C=US Thumbprint:
    I have tried all the ways to fix STS error , is there any option to reprovision with out loosing the data and projects and subsites
    Srini

    By Creating the root certificate solved my issue
    Srini

  • Unable to open /delete a Web Template in Development

    Hi Experts,
    I am unable to open a web template. It says "You do not have sufficient authorization to change the template,Do you want to  create a copy". I need to delete this template and when i click on delete ,there is no impact on the template. Please let me know how i can delete this template. I tried to see what authorization I am missing in SU53, but it did not help.How can I find what authorization is associated with that web template? Kindly suggest.
    Regards,
    Kavitha

    if you get no authorization error message, then it is purely authorization issue.
    When you executing Templates in BEx, it wont help in SU53. in this case, you have to check the roles and its authorization assigned on it.
    By checking with your roles matrices, you can check the authorization.
    Please check the auth objects, S_RS_COMP, S_RS_COMP1, S_RS_MPRO, S_RS_ICUBE.
    Please check whether the cubes, multi/info providers are assigned properly and the activities too.
    Hope this would help you.

Maybe you are looking for

  • Interaction records,Service tickets,Follow-up activities

    hi all! I need objects (FM, BDoc’s...Etc...) that related to interaction records, service tickets, follow-up activities of the business partners. can anybody help me out. regards sachin

  • 845GL TV-Mode selection doesn't work

    hi, i have a hermes 845GL with Bios A6557IMS V1.1 061002. in bios settings i selected PAL as default tv mode but when plugging the box to my tv, i get ntsc (i suppose - synchronisation does not work). starting up windows solves the problem so i think

  • Numbers instead of names

    My messages and calls are suddenly showing up with contact numbers instead of contact names.  How do I get the names back?

  • Depreciation posting

    Hi, I want to calculate depreciation of assets according to the day when the Asset is capitalized on : If date <= 15th of the month, so calculate the depreciation for all the month If date > 15th of the month, so don't calculate depreciation fo this

  • Cost Center and Profit Center Planning

    Hi, I have one  Co issue.  Pls Suggest me the wiseful solution. Cost Center and Profit Center Planning. For F-2008 Planning  data they have updated in the month of Aug, 07 for Profit and Loss Items and they have revised the plan data of some cost ele