Pass XML in argument tag in JNLP file

Is there a way to pass an xml string in the <argument> tag. I tried to do it but I get xml parsing error. It seems that the xml becomes the child node when I pass that to the arguments tag. the CDATA also does not work. Has anyone done this successfully. thanks
I am trying to pass somthing like
<argument><Settings><URL>http://xxx.com</URL></Settings></argument>
this is just an example I have also tried
<argument>"<Settings><URL>http://xxx.com</URL></Settings>"</argument>
this also errors out.
<argument><![CDATA[<Settings><URL>http://xxx.com</URL></Settings>]]</argument>
that does not work too.
Please let me know if there is anything else I can try

I've successfully used CDATA to embed HTML in an argument, on JDK 1.5 at least (not tried on others yet).
Your CDATA closing section should be: ]]> Yours is missing the end bracket - if that's not an error in your post it's probably the cause of the XML parsing error.

Similar Messages

  • argument ignored in jnlp file

    args.length is always 0.
    public static void main(String[] args) {
    if (args.length > 0) {
    //Do something useful
    Here's my jnlp file, with some names changed "to protect the innocent".
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.5+"
    codebase="http://mysite.com/JavaWebStart"
    href="MyApp.jnlp">
    <information>
    <title>My Title</title>
    <vendor>My Company</vendor>
    <homepage href="http://mysite.com/JavaWebStart/MyApp.html"/>
    <description>MyApp Description</description>
    <description kind="short">MyApp Short Description</description>
    <icon href="MyApp.png"/>
    <offline-allowed/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se"
    java-vm-args="-Xss1M -Xmx256M">
    </j2se>
    <jar href="MyApp.jar" main="true" download="eager"/>
    <jar href="lib/activation.jar"/>
    <jar href="lib/beandt.jar"/>
    <jar href="lib/dbswing.jar"/>
    <jar href="lib/dx.jar"/>
    <jar href="lib/mailapi.jar"/>
    <jar href="lib/postgresql-8.3-603.jdbc3.jar"/>
    <jar href="lib/smtp.jar"/>
    </resources>
    <application-desc main-class="MyApppkg.MainApp">
    <argument>haha</argument>
    </application-desc>
    </jnlp>

    This suddenly started working when I got all-permissions to work. (That was a separate questions I posted on the same day.)

  • Icon tag in jnlp file

    Hello all.
    I've been trying to include a custom icon with my web start application by using the <icon href="/images/camera.gif"> tag in the jnlp file. The image is included in the .jar file properly and then in the .war file, but the default web start icon always shows up instead (ie: on the desktop, start menu, and in the Java Web Start launcher).
    Does anyone have any hints on what might be going on?
    Any help will be greatly appreciated!
    Thanks.
    Chris
    [email protected]

    I'm having a similar problem ... but I think the .jnlp is structured right...
    gfpr.jnlp file...
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for gfpr applet -->
    <jnlp
    spec="1.0+"
    codebase="$$codebase">
    <information>
    <title>Financial Planning & Reporting Accelerator</title>
    <vendor>Unilever Cosmetics International</vendor>
    <description>GFPR Applet</description>
    <description kind="short">The client applet for GFPR.</description>
    <icon href="minesweeper32.gif" width="32" height="32" />
    <icon href="minesweeper64.gif" width="64" height="64" />
    </information>
    <resources>
    <j2se version="1.3"/>
    <jar href="gfprclientapplet.jar"/>
    <jar href="xerces.jar"/>
    <jar href="xalan.jar"/>
    <jar href="log4j.jar"/>
    <jar href="jdom.jar"/>
    <jar href="uciutilities.jar"/>
    <jar href="f1j9swing.jar"/>
    <jar href="crimson.jar"/>
    <jar href="jaxp.jar"/>
    </resources>
    <applet-desc documentBase="$$codebase"
    name="GFPR applet"
    main-class="com.unilever.uci.gfpr.presentation.fprAccelerator"
    width="760"
    height="400">
    </applet-desc>
    </jnlp>
    WAR structure....
    /app/gfpr.jnlp
    /app/minesweeper32.gif
    /app/minesweeper64.gif
    /app/****.jar (all the referenced jars)
    /META-INF/MANIFEST.MF
    /WEB-INF/web.xml
    /WEB-INF/lib/jnlp-servlet.jar
    anyone have any ideas ??
    thanks
    dave

  • security tag in JNLP file

    Hi,
    I have a signed javaws app. I set a couple of PROPERTYs in the JNLP file, leave the <security> tag empty, grant all-permissions in my client machines' javaws.policy file.
    After I started the app via javaws, I can access system properties (such user.home, etc) and read/write/delete local files, I am happy only that I cannot get the PROPERTYs I set in the JNLP file !
    According to the document, reading PROPERTYs set in the JNLP file should be simple and straight forward, System.getProperty() should do the trick, but it does not.
    I add <j2ee-application-client-permissions /> to the <security> tag in the JNLP file, here it goes, I can read the PROPERTYs from the app if it is started by javaws 1.4.2 (coming with JDK1.4.2). But sad again, if the app is started by javaws 1.2, the PROPERTYs still hide from me.
    Eventually, <all-permissions /> in the <security> tag will do the magic, but I am lost here. What is the point of security here that I cannot read the PROPERTYs I set in the JNLP file while I can even delete files from local disk? This <all-permissions /> magic allows the app jumping out of the sandbox?

    This looks like an example of bug:
    5062655: Permissions granted by policy files don't apply to jnlp properties.
    which is marked as fixed in mustang (1.6.0)

  • Query regarding j2se tag in JNLP file for JRE 1.4.2_07

    Hi,
    Can the j2se tag take different servlet link other than "http://java.sun.com/products/autodl/j2se" in the href field.
    eg: <j2se initial-heap-size="64m" max-heap-size="512m" version="1.5+" href="http://localhost:8080/j2se"/>
    Since i am planning to download latest JRE from the sun site and place it my local server so that download time can be reduced for other users.
    Thanks in advance
    Bharath

    There is no utility that I'm aware of. The installer is InstallAnywhere from Zerog, and it uses the MS installer to actually do the install. So you can look at either Zerog or MS for one.
    Sun's Java 5 version has deployment information, including silent install options, at:
    http://java.sun.com/j2se/1.5.0/docs/guide/deployment/index.html
    I don't know if that exists for your version.

  • How to pass command line arguments to JWS app

    Hi,
    I want to pass command line arguments to my JWS application. However those arguments are dynamic (eg the username of the user who launched the app) and thus I can not use the argument tag of JNLP file. So what do I need to do in this case?
    Thanks.

    Well, if it's the username on your server systems you should probably include it in the jnlp: can pass it in the url, write once and remove jnlp href attribute, etc.., etc.. (a quick tour of this forum should suffice).
    If it's the OS username you should be able to retrieve it through system properties.
    Whatever it is, passing dynamic arguments means launching javaws through a shell or a shell script (bat if running on windows), so you won't be able to launch through autogenerated desktop and menu shortcuts.
    Anyway, you have two solutions:
    Clean one: associate an extension to your app and write those infos in a file named after that extension.
    Dirty one (always seen it work, but there's no warranty): javaws -open whateverParamYouLike yourAppURL.jnlp, will pass to your main method '-open' as args[0] and '+whateverParamYouLike+' as args[1]. I gotta admin I used it, but I had the most peculiar reason (my app needed another instance on a different JRE aware of being a secondary instance at startup time).
    Bye.
    PS: I'd really love dukes ;-)

  • Passing dynamic cmdline arguments to app deployed by JWS offline

    Hi,
    i want to deploy my java application through JWS for the benefit of autoupdating.
    my app, when started, needs a cmdline argument that the user supplies. It's a filename, so it can be anything.
    I cannot use the <argument> tag in JNLP file to specify the filename because it's not static.
    I saw some postings of using JSP on the server side to dynamically put the value into the JNLP file, but the thing is I don't want the app to have to go through the web server to get the dynamic arg - what if the server is offline?
    Any solutions?
    thanks,
    LMY

    Hi,
    i want to deploy my java application through JWS for
    the benefit of autoupdating.
    my app, when started, needs a cmdline argument that
    the user supplies. It's a filename, so it can be
    anything.
    I cannot use the <argument> tag in JNLP file to
    specify the filename because it's not static.
    I saw some postings of using JSP on the server side to
    dynamically put the value into the JNLP file, but the
    thing is I don't want the app to have to go through
    the web server to get the dynamic arg - what if the
    server is offline?
    Any solutions?
    thanks,
    LMYTry starting Webstart and your app not by using javaws.exe, but instead by appending your desired args to something like this and execute:
    java.exe "-Djnlpx.home=C:\Programme\Java Web Start" "-Djnlpx.heapsize=NULL,NULL" "-Djnlpx.jvm=C:\Programme\JavaSoft\JRE\1.3.1\bin\javaw.exe" "-Djava.security.policy=file:C:\Programme\Java Web Start/javaws.policy" "-DtrustProxy=true" -classpath "C:\Programme\Java Web Start\javaws.jar;C:\Programme\Java Web Start\javaws-l10n.jar" com.sun.javaws.Main "file:C:/Dokumente und Einstellungen/AJans/isa.jnlp"
    Of course you have to change the given args to your preferences.
    The given args before the com.sun.javaws.Main are obligatory.
    Hope this helps,
    Arne

  • Dynamic generation of jnlp file

    I'm dynamically generating a jnlp file using a jsp to pass run-time parameters over to my Java application thusly:
    <%
    response.setContentType("application/x-java-jnlp-file");
    String userName = request.getParameter("username");
    String password = request.getParameter("password");
    String batchId = request.getParameter("batchid");
    out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
    out.println("<jnlp ");
    out.println("spec=\"1.0+\" ");
    out.println("codebase=\"http://server/directory\" ");
    out.println("href=\"this jsp file\">");
    ... other jnlp stuff...
    out.println("<application-desc main-class=\"myApp.myClass\">");
    out.println("<argument>" + userName + "</argument>");
    out.println("<argument>" + password + "</argument>");
    out.println("<argument>" + batchId + "</argument>");
    out.println("</application-desc>");
    out.println("</jnlp>");
    And use args[] to attempt to get the passed parameters in the Java application:
    userName = args[0];
    password = args[1];
    batchId = args[2];
    However, they don't seem to be passed over to the application as I get NullPointerExceptions. If I try to trace the state of the arguments by adding:
    FileOutputStream f = new FileOutputStream("w:output.txt");
    BufferedWriter w = new BufferedWriter(new OutputStreamWriter(f, System.getProperty("file.encoding")));
    w.write("userName: " + userName);
    w.write("password: " + password);
    w.write("batchId: " + batchId);
    f.flush();
    f.close();
    The output file is completely empty.
    1. Am I passing the arguments in wrongly?
    2. Why is the output not being written in the file?
    My thanks in advance for any assistance offered.
    Erkton

    Erkton,
    I use a similar approach and it does work. The main gotchas I found were typos. I would suggest temporarily changing the
    response.setContentType("application/x-java-jnlp-file");
    line to
    response.setContentType("text/xml");
    and looking at your JNLP file as XML and verifything that you got everything write. Look for beginning and end tags, stuff like that.
    Once you have it right then switch it back to JNLP.
    One other thing to look out for is Internet Explorer doesn't like jnlp files unless they end with a .jnlp extension. I had to rename my jnlp files to end with .jnlp instead of .jsp for IE to parse them correctly. I don't think thats the issue you are running into, but you may want to look out for it.

  • Jnlp file parameter element problem

    Hello all,
    I have a jar file which contains all the class files and an configuration file of type(.cfg).
    For my application to run properly i need to pass this .cfg file as an argument to the main method in one of the file in the jar...
    i did pass the name of the file as one of the parameter element,but my application is not initialized and not working.but the jar files have been deployed in the local machine.
    so my question is , is there a way so that i can pass my file as a parameter to the main method through jnlp xml file.

    thanks andrew,
    but my problem is that i need to pass the path of my file along with the name of the file to the main method ...and in turn my main method will do all the required processing work..
    the jar file that is to be deployed contains the class files and the .cfg file..
    my jnlp files looks as follows:-
    <jnlp spec="1.0+" codebase="$$codebase" href="voicechat.jnlp">
    <information>
    <title>SIP Based Voice Chat</title>
    <vendor>First Internet Systems Pvt Ltd</vendor>
    <description>Voice Chat</description>
    <description kind="short">Voice Chat </description>
    <icon href="images/demologo.gif"/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5" href="http://java.sun.com/products/autodl/j2se"/>
    <jar href="sip.jar"/>
    <jar href="ua.jar"/>
    </resources>
    <application-desc main-class="local.ua.GraphicalUA">
    <argument>-f</argument>
    <argument>a.cfg</argument>
    </application-desc>
    </jnlp>
    the second argument that i had passed is the name of the file in the jar to be passed..
    but as a result when i invoke this file, the jar files are deployed but application is not starting as expected..for it to work the file and its path has to be passed to the main method..
    which is what i tried through argument element...but it does not seem to work..
    so all that i need to know is that, is it possible to pass a file and its path as an argument in the jnlp file..

  • How to pass java.library.path as a VM argument in JNLP file

    I jave a jar file containing reference to sqljdbc4.jar as I am using JDBC to talk with SQL Server. It works fine through eclipse IDE when I give the fillowing VM Argument
    -Djava.library.path=C:\Users\reddys2\Downloads\sqljdbc_4.0\enu\auth\x86. Without this I get the "error message" saying that "failed to load sqljdbc_auth.dll
    Now I would like to bundle working jar file in .jnlp and invoke through browser. I tried to add vm argunment (<property name="java.library.path" value="C:\Users\reddys2\Downloads\sqljdbc_4.0\enu\auth\x86"/> ) in the .jnlp file. But still i am getting "WARNING:Failed to load the sqljdbc_auth.dll cause:no sqljdbc_auth in java.library.path"
    Any help is greatly appreciated. Here are the contents of JNLP file
    =======================================================================================
    ?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://xxx.16.19.56:8080/ifsdTools/" href="PF_UserList.jnlp">
    <information>
    <title>Login into PF</title>
    <vendor>XXX XXXX</vendor>
    <description>Provides ability to mirror PF Data base locally</description>
    </information>
    <resources>
         <j2se version="1.4+"/>
         <jar href="PopulateIFSDProjectForgeData.jar" />
         <jar href="Psqljdbc4.jar" main/>
         <property name="java.library.path" value="."/>
         <property name="javax.net.ssl.keyStore" value="NONE"/>
         <property name="javax.net.ssl.keyStoreType" value="PKCS11"/>
         <property name="http.proxyHost" value="proxy1.lmco.com"/>
         <property name="http.proxyPort" value="80"/>
         <property name="java.library.path" value="C:\Users\xxxx\Downloads\sqljdbc_4.0\enu\auth\x86"/>
         <property name="pfProjectId" value="proj1073" />
    </resources>
    <security>
         <all-permissions/>
    </security>
    <application-desc main-class="ifsdTools.PopulateIFSDProjectForgeData" />
    </jnlp>
    =========================================================================================================
    Edited by: 878645 on Apr 26, 2012 3:43 PM

    Thanks for the pointer. Question that I have is I am referencing sqljdbc4.jar in my application, which in turn using sqljdbc_auth.dll.
    Which one should i refernce through <nativelib>. Is it sqljdbc4.jar or sqljdbc_auth.dll.
    have added the following line to the .jnlp.
    <nativelib href="sqljdbc4.jar"/>
    But still it is complaining on sqljdbc_audth.dll. If it is sqljdbc_auth.dll, can I use <nativelib> to pass it.
    In that case does it need to be signed?. If so,
    Is it possible to sign .dll using 'jarsigner'?.
    Edited by: 878645 on Apr 26, 2012 3:43 PM

  • Passing arguments from jnlp file to application

    Hi,
    I am using a jnlp file to launch an application. This is working perfectly. Now I want my application to get some custom properties for making an rmi connection . The only place where I must specify this is in the jnlp file which is dynamically generated. The dynamically generated JNLP file contains:
    <property name="abc.rmi.adapter.host" value="localhost"/>
    <property name="abc.rmi.adapter.port" value="5050"/>
    <property name="abc.rmi.adapter.servicename" value="abc/RMIClientAdapter/"/>
    This does not work.
    However, according to sun only certain types of properties are supported by jnlp for security reason. Is there any way to get over this and have my custom properties. Any help will be appreciated.
    Thanks,
    dasappan

    If you are trying to use RMI, you probably need all-permissions allready.
    for applications requesting all-permissions, all of the properties set in the jnlp file will be set as system properties before the applications "main" is called.
    If you are not using <security><all-permissions/></security>, then only specific trusted properties, plus any begining with "javaws." or "jnlp." will be allowed.
    For properties you just need to pass to yourself, just append "jnlp." to the front of them.
    /Andy

  • How to change the argument input in a jnlp file?

    A question associated with the following few lines of jnlp codes:
    <application-desc main-class="Main">
    <argument>arg</argument>
    </application-desc>
    My question is: "How can 'arg' be changed dynamically?
    Thanks for help.

    Thank Dietz for help.
    I tried the following jsp code. But it can launch the application only when "test2.jnlp" file exists. "argument to change" can't be passed to the application.
    Thanks.
    <% response.setContentType("application/x-java-jnlp-file");
    out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
    out.println("<jnlp ");
    out.println("spec=\"1.0+\" ");
    out.println("codebase=\"http://tang:8080/examples/rtla/\"");
    out.println("href=\"test2.jnlp\">");
    out.println("<information> ");
    out.println("<title>RTLAFrame viewer</title> ");
    out.println("<vendor>XXX, Inc.</vendor> ");
    out.println("<description>RTLAviewer Application Demo</description>");
    out.println("<description kind=\"short\">A viewer.</description> ");
    out.println("<offline-allowed/> ");
    out.println("</information> ");
    out.println("<security> ");
    out.println("<all-permissions/>");
    out.println("</security> ");
    out.println("<resources> ");
    out.println("<j2se version=\"1.3+\"/>");
    out.println("<jar href=\"test.jar\"/> ");
    out.println("</resources> ");
    out.println("<application-desc main-class=\"RTLAFrame\">");
    out.println("<argument>argument to change</argument>");
    out.println("</application-desc> ");
    out.println("</jnlp> ");
    %>

  • How to pass arguments to a batch file from java code

    Hi
    I have a batch file (marcxml.bat) which has the following excerpt :
    @echo off
    if x==%1x goto howto
    java -cp C:\Downloads\Marcxml\marc4j.jar; C:\Downloads\Marcxml\marcxml.jar; %1 %2 %3
    goto end
    I'm calling this batch file from a java code with the following line of code:
    Process p = Runtime.getRuntime().exec("cmd /c start C:/Downloads/Marcxml/marcxml.bat");
    so ,that invokes the batch file.Till that point its ok.
    since the batch file accpets arguments(%1 %2 %3) how do i pass those arguments to the batch file from my code ...???
    %1 is a classname : for ex: gov.loc.marcxml.MARC21slim2MARC
    %2 is the name of the input file for ex : C:/Downloads/Marcxml/source.xml
    %3 is the name of the output file for ex: C:/Downloads/Marcxml/target.mrc
    could someone help me...
    if i include these parameters too along with the above line of code i.e
    Process p = Runtime.getRuntime().exec("cmd /c start C:/Downloads/Marcxml/marcxml.bat gov.loc.marcxml.MARC21slim2MARC C:\\Downloads\\Marcxml\\source.xml C:\\Downloads\\Marcxml\\target.mrc") ;
    I get the following error :
    Exception in thread main java.lang.Noclassdef foundError: c:Downloads\marcxml\source/xml
    could some one tell me if i'm doing the right way in passing the arguments to the batch file if not what is the right way??
    Message was edited by:
    justunme1

    1 - create a java class (Executer.java) for example:
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    public class Executer {
         public static void main(String[] args) {
              try {
                   for (int i = 0; i < args.length; i++) {
                        System.out.println(args);
                   Class<?> c = Class.forName(args[0]);
                   Class[] argTypes = new Class[] { String[].class };
                   Method main = c.getDeclaredMethod("main", argTypes);
                   // String[] mainArgs = Arrays.copyOfRange(args, 1, args.length); //JDK 6
                   //jdk <6
                   String[] mainArgs = new String[args.length - 1];
                   for (int i = 0; i < mainArgs.length; i++) {
                        mainArgs[i] = args[i + 1];
                   main.invoke(null, (Object) mainArgs);
                   // production code should handle these exceptions more gracefully
              } catch (ClassNotFoundException x) {
                   x.printStackTrace();
              } catch (NoSuchMethodException x) {
                   x.printStackTrace();
              } catch (IllegalAccessException x) {
                   x.printStackTrace();
              } catch (InvocationTargetException x) {
                   x.printStackTrace();
              } catch (Exception e) {
                   e.printStackTrace();
    2 - create a .bat file:
    @echo off
    java -cp C:\Downloads\Marcxml\marc4j.jar; C:\Downloads\Marcxml\marcxml.jar; Executer %TARGET_CLASS% %IN_FILE% %OUT_FILE%3 - use set command to pass variable:
    Open MS-DOS, and type the following:
    set TARGET_CLASS=MyTargetClass
    set IN_FILE=in.txt
    set OUT_FILE=out.txt
    Then run your .bat file (in the same ms dos window)
    Hope that Helps

  • How to embed jnlp file into html page using object tag

    hi everyone,
    i have written one jnlp file like this.
    <?xml version="1.0" encoding="utf-8" ?>
    <!-- JNLP file for Demo applicaion -->
    <jnlp spec="1.0+" codebase="http://localhost:9080/base/" href="SampleExample.jnlp">
         <information>
              <title>Demo Application</title>
              <vendor> </vendor>
              <description>Sample Demo Application</description>
              <offline-allowed/>
         </information>
         <security/>
         <resources>
              <j2se version="1.3+" />
              <jar href="common.jar" main="true" download="eager" />
              <jar href="classes12.jar" download="eager" />
              <jar href="toplink.jar" download="eager"/>
              <package name="com.applet.*" part="applet" recursive="true"/>
         </resources>
         <applet-desc name="grid" main-class="com.applet.PriceGrid" width="1000" height="300"/>
    </jnlp>
    i am trying embed that jnlp file using object tag like
    <OBJECT
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="1000" HEIGHT="300" NAME="grid">     
    <PARAM NAME="jnlp" VALUE="http://localhost:9080/base/SampleExample.jnlp">
    </OBJECT>
    but i am not able to load the applet using Web Start.
    Can anyone please help me. This is very Urgent for me.
    Thanks & Regards,
    Shiva.

    thanks.
    i am giving my problem clearly. i have one applet. Previously i am loading the applet in my html page using object tag like this...
    <OBJECT
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="1000" HEIGHT="300" NAME="grid">
    <PARAM NAME="CODE" VALUE="com.adp.base.applet.PriceGrid.class" >
         <PARAM NAME="ARCHIVE" VALUE="common.jar,classes12.jar,toplink.jar" >
         <PARAM NAME="NAME" VALUE="grid" >
    <PARAM NAME="type" VALUE="application/x-java-applet">
    <PARAM NAME= "cache_option" VALUE ="no">
    </OBJECT>
    now what i need to do is
    i need load the applet only first time using web start and when ever the applet code changes in the server i need to reload the applet.
    for that i kept all the applet resources in .jnlp file.i want to cache all the resources which are in .jnlp file and applet must be displayed within a web page within a browser.
    Webstart always open a new application windows.
    I need to run an Applet embedded within a web page within a browser.
    Is there a way to still use Webstart?

  • How to pass XML tags in a soapbody parameter having datatype as string?

    Hi,
    I need to pass XML tags as a String parameter in SOAP:Body.
    When I tried send SOAP Request, The SOAP Request was changing < to <
    and > to > respectively. Is there any way to ensure that the XML tags (< and >) remain as it is without getting changed.
    I also tried to retrieve XML file and stored in a StringBuffer and tried to send SOAP Request but i am still receiving the < and > tags in my SOAP Request.
    Pl suggest some alternatives to avoid storing the XML in the form of string and instead directly store the XML into a XML Node so that i can avoid the above condition
    Thanks in advance,
    gnsinhyd

    Hi,
    The sample code I used is as follows:
    package somepackage;
    import javax.mail.internet
    import javax.xml.messaging.*;
    import javax.xml.soap.*;
    import javax.xml.transform.*;
    import javax.activation.*;
    public class SomeClassName{
    // Some namespace declarations
    public static void main(String[] args) throws someExceptions{
    try
    // Create the connection
    SOAPConnectionFactory connectionFactory = SOAPConnectionFactory.newInstance();
    SOAPConnection connection = connectionFactory.createConnection();
    // create a new SOAP message using SAAJ API�s
    MessageFactory messageFactory = MessageFactory.newInstance();
    SOAPMessage request = messageFactory.createMessage();
    // Create a SoapAction header
    MimeHeaders headers = request.getMimeHeaders();
    headers.addHeader("SOAPAction", "soapaction url");
    // Object for SOAP Message parts
    SOAPPart part = request.getSOAPPart();
    SOAPEnvelope envelope = part.getEnvelope();
    envelope.addNamespaceDeclaration("xsd","http://www.w3.org/2001/XMLSchema");
    envelope.addNamespaceDeclaration("xsi","http://www.w3.org/2001/XMLSchema-instance");
    //envelope.addNamespaceDeclaration("enc","http://schemas.xmlsoap.org/soap/encoding/");
    envelope.addNamespaceDeclaration("soap","http://schemas.xmlsoap.org/soap/envelop/");
    //envelope.setEncodingStyle("http://schemas.xmlsoap.org/soap/encoding/");
    SOAPBody body = envelope.getBody();
    SOAPHeader header = envelope.getHeader();
    // Now, build the ClaimStorage element in the body for our request
    Name somename = envelope.createName("somename");
    // � and configure it with the specifics of our request
    SOAPElement ClaimStorage = body.addTextNode("somename");
    ClaimStorage.addNamespaceDeclaration("xmlns","url");
    ClaimStorage.addChildElement(somename).addTextNode("somename");
    ClaimStorage.addChildElement(xmlclaim).addTextNode("<XMLTAGS">); <---THE PROBLEM IS HERE
    ----> THE XML TAGS < > ARE CHANGING TO &LT; AND &GT; MOST PROBABLY DUE TO POST I THINK.
    // Save Message
    request.saveChanges();
    // View SOAP Request
    System.out.println("\n Soap Request:\n");
    request.writeTo(System.out);
    System.out.println();
    // Now, create a connection to the HTTP SOAP endpoint
    URLEndpoint endpoint = new URLEndpoint("url.asmx");
    // Send request, view response. In a real program, we�d process the response envelope programmatically to see if there was a fault, etc.
    System.out.println("request =\n" + request);
    SOAPMessage response = connection.call(request, endpoint);
    // View the output
    System.out.println("\nXML Response\n");
    // Create Transformer
    TransformerFactory tff = TransformerFactory.newInstance();
    Transformer tf = tff.newTransformer();
    // Get reply content
    Source sc = response.getSOAPPart().getContent();
    System.out.println("SOAP Body" + response.getSOAPBody());
    // Set output transformation
    StreamResult result = new StreamResult(System.out);
    tf.transform(sc, result);
    System.out.println();
    // Close connection
    connection.close();
    System.out.println("\nResponse =\n" + response);
    catch (Exception e)
    e.printStackTrace();
    Pl. reply as soon as possible
    Thanks in advance

Maybe you are looking for

  • Most efficient way to write 4 bytes at the start of any file.

    Quick question: I want to write 4 bytes at the start of a file without overriding the current bytes in the file. E.g. push bytes 0-4 along... Is my only option writing the bytes into a new file then writing the rest of the file after? RAF is so close

  • MBPro 15'' Early 2011 - Overheated while playing civilization: V

    Well basically summarised by the header. MBPro got overheated CPU more than 70 Deg and both fans avove 6000rpm while less than 5 mins into the game. Anyone having the same probs ? Any advise on how to overcome this and enjoy a game on such an advance

  • Putting Applets Online

    Hey, quick and very dumb question: I use BlueJ, and when I compile my project, it creates a variety of different files (.java, .ctxt, .class). Which one(s) do I need to put in a directory online to be able to run that applet on an html file? I believ

  • Oracle distributed document capture service not started

    Oracle distributed document capture service not started and timeout

  • Tracking preload

    In the tracking section, you can find out what have you done in the WorkSpace, correct? Is there a way to manually create some tracking records into LiveCycle's database? If it's possible to do, how to do it? is it documented somewhere? in SDK, API m