jax-rpc build client problem

Discussion in 'Software' started by prasu, Oct 7, 2010.

  1. prasu

    prasu

    Joined:
    Oct 7, 2010
    Messages:
    1
    hi all,


    I have been started working on java web services.I have created jax-rpc web services.But While creating client for the service,I am getting error in build.xml file of client application when running ant generate-client target.


    Here is my build.xml file for client


    <project name="MyHelloWorldClient" default="run-client" basedir=".">
    <property file="build.properties"/>
    <property name="endpoint" value="localhost:8080/jaxrpc-MyHelloWorld/myhello"/>
    <property name="server.port.url" value="localhost:8080/jaxrpc-MyHelloWorld/myhello"/>
    <property name="appname" value="${ant.project.name}"/>
    <property name="source.home" value="${samplesbuild}/${appname}/src"/>
    <property name="compile.debug" value="true"/>
    <property name="compile.optimize" value="false"/>
    <property name="config.rpcenc.file" value="${basedir}/etc/config.xml"/>
    <property name="model.rpcenc.file" value="model-wsdl-rpcenc.xml.gz"/>

    <path id="compile.classpath">
    <pathelement location="${javamail.jar}"/>
    <pathelement location="${jaf.jar}"/>
    <pathelement location="${jaxp-api.jar}"/>
    <pathelement location="${dom.jar}"/>
    <pathelement location="${sax.jar}"/>
    <pathelement location="${xalan.jar}"/>
    <pathelement location="${xercesImpl.jar}"/>
    <pathelement location="${jaxrpc-api.jar}"/>
    <pathelement location="${jaxrpc-spi.jar}"/>
    <pathelement location="${jaxrpc-impl.jar}"/>
    <pathelement location="${saaj-api.jar}"/>
    <pathelement location="${saaj-impl.jar}"/>
    <pathelement location="${relaxngDatatype.jar}"/>
    <pathelement location="${xsdlib.jar}"/>
    <pathelement location="${jax-qname.jar}"/>
    <pathelement location="${ant.jar}"/>
    </path>
    <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
    <classpath refid="compile.classpath"/>
    </taskdef>
    <target name="init">
    <echo message="-------- ${appname} Sample --------"/>
    </target>
    <target name="prepare" depends="init">
    <mkdir dir="${buildhome}"/>
    <mkdir dir="${samplesbuild}/${appname}/classes"/>
    <mkdir dir="${samplesbuild}/${appname}/classes/client"/>
    </target>
    <target name="generate-client" depends="prepare">

    <antcall target="edit-config">
    <param name="config.rpcenc.file" value="${config.rpcenc.file}"/>
    </antcall>

    <wscompile
    keep="true"
    client="true"
    base="${samplesbuild}/${appname}/classes/client"
    xPrintStackTrace="true"
    verbose="false"
    classpath="${compile.classpath}"
    config="${config.rpcenc.file}">

    <classpath>
    <path refid="compile.classpath"/>
    </classpath>
    </wscompile>

    <antcall target="unedit-config">
    <param name="config.rpcenc.file" value="${config.rpcenc.file}"/>
    </antcall>
    </target>

    <target name="compile-client" depends="generate-client">

    <javac srcdir="${samples.home}/${appname}/src/client" destdir="${samplesbuild}/${appname}/classes/client" debug="${compile.debug}" optimize="${compile.optimize}">
    <classpath refid="compile.classpath"/>
    </javac>
    </target>

    <path id="run.classpath">
    <path refid="compile.classpath"/>
    <pathelement location="${samplesbuild}/${appname}/classes/client"/>
    </path>

    <target name="run-client" depends="compile-client">

    <waitfor>
    <url="//localhost:8080/jaxrpc-MyHelloWorld"/>
    </waitfor>

    <java classname="myhello.MyHelloClient" classpathref="run.classpath" fork="true">
    <sysproperty key="endpoint" value="${endpoint}"/>
    <arg value="${server.port.url}"/>
    </java>
    </target>

    <target name="clean">
    <delete dir="${buildhome}"/>
    <delete dir="${samplesbuild}/${appname}"/>
    </target>
    <!--
    @param: config.file - file to be edited
    -->

    <target name="edit-config">
    <replace
    file="${config.rpcenc.file}"
    token='location="'
    value='location="${basedir}/'/>
    </target>
    <!--
    @param: config.file - file to be edited
    -->

    <target name="unedit-config">
    <replace
    file="${config.rpcenc.file}"
    token='location="${basedir}/'
    value='location="'/>
    </target>
    </project>




    I am getting some kind of parsing error like

    C:\tomcat50-jwsdp\jaxrpc\samples\MyHelloWorldClient>ant generate-client
    Buildfile: build.xml

    init:
    [echo] -------- MyHelloWorldClient Sample --------

    prepare:

    generate-client:

    edit-config:
    [wscompile] error parsing configuration file: XML parsing error: com.sun.xml.rpc.sp.ParseException:5: Value must be quoted

    [wscompile] error parsing configuration file: XML parsing error: com.sun.xml.rpc.sp.ParseException:5: Value must be quoted
    [wscompile] at com.sun.xml.rpc.processor.config.parser.ConfigurationParser.p
    arse(ConfigurationParser.java:67)
    [wscompile] at com.sun.xml.rpc.tools.wscompile.CompileTool.createConfigurati
    on(CompileTool.java:919)
    [wscompile] at com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.j
    ava:682)
    [wscompile] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43)
    [wscompile] at com.sun.xml.rpc.tools.ant.Wscompile.execute(Wscompile.java:74
    6)
    [wscompile] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
    va:275)
    [wscompile] at org.apache.tools.ant.Task.perform(Task.java:364)
    [wscompile] at org.apache.tools.ant.Target.execute(Target.java:341)
    [wscompile] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [wscompile] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)

    [wscompile] at org.apache.tools.ant.Project.executeTargets(Project.java:1062
    )
    [wscompile] at org.apache.tools.ant.Main.runBuild(Main.java:673)
    [wscompile] at org.apache.tools.ant.Main.startAnt(Main.java:188)
    [wscompile] at org.apache.tools.ant.Main.start(Main.java:151)
    [wscompile] at org.apache.tools.ant.Main.main(Main.java:241)
    [wscompile]
    [wscompile] CAUSE:

    [wscompile] XML parsing error: com.sun.xml.rpc.sp.ParseException:5: Value must b
    e quoted
    [wscompile] at com.sun.xml.rpc.streaming.XMLReaderImpl.next(XMLReaderImpl.ja
    va:120)
    [wscompile] at com.sun.xml.rpc.streaming.XMLReaderBase.nextContent(XMLReader
    Base.java:23)
    [wscompile] at com.sun.xml.rpc.streaming.XMLReaderBase.nextElementContent(XM
    LReaderBase.java:41)
    [wscompile] at com.sun.xml.rpc.processor.config.parser.ConfigurationParser.p
    arseConfiguration(ConfigurationParser.java:87)
    [wscompile] at com.sun.xml.rpc.processor.config.parser.ConfigurationParser.p
    arse(ConfigurationParser.java:65)
    [wscompile] at com.sun.xml.rpc.tools.wscompile.CompileTool.createConfigurati
    on(CompileTool.java:919)
    [wscompile] at com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.j
    ava:682)
    [wscompile] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43)
    [wscompile] at com.sun.xml.rpc.tools.ant.Wscompile.execute(Wscompile.java:74
    6)
    [wscompile] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
    va:275)
    [wscompile] at org.apache.tools.ant.Task.perform(Task.java:364)
    [wscompile] at org.apache.tools.ant.Target.execute(Target.java:341)
    [wscompile] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [wscompile] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)

    [wscompile] at org.apache.tools.ant.Project.executeTargets(Project.java:1062
    )
    [wscompile] at org.apache.tools.ant.Main.runBuild(Main.java:673)
    [wscompile] at org.apache.tools.ant.Main.startAnt(Main.java:188)
    [wscompile] at org.apache.tools.ant.Main.start(Main.java:151)
    [wscompile] at org.apache.tools.ant.Main.main(Main.java:241)
    [wscompile]
    [wscompile] CAUSE:

    [wscompile] com.sun.xml.rpc.sp.ParseException:5: Value must be quoted
    [wscompile] at com.sun.xml.rpc.sp.Parser2.fatal(Parser2.java:1942)
    [wscompile] at com.sun.xml.rpc.sp.Parser2.fatal(Parser2.java:1927)
    [wscompile] at com.sun.xml.rpc.sp.Parser2.parseLiteral(Parser2.java:434)
    [wscompile] at com.sun.xml.rpc.sp.Parser2.getElement(Parser2.java:2551)
    [wscompile] at com.sun.xml.rpc.sp.Parser2.parseContent(Parser2.java:2970)
    [wscompile] at com.sun.xml.rpc.sp.Parser2.parse(Parser2.java:2325)
    [wscompile] at com.sun.xml.rpc.streaming.XMLReaderImpl.next(XMLReaderImpl.ja
    va:115)
    [wscompile] at com.sun.xml.rpc.streaming.XMLReaderBase.nextContent(XMLReader
    Base.java:23)
    [wscompile] at com.sun.xml.rpc.streaming.XMLReaderBase.nextElementContent(XM
    LReaderBase.java:41)
    [wscompile] at com.sun.xml.rpc.processor.config.parser.ConfigurationParser.p
    arseConfiguration(ConfigurationParser.java:87)
    [wscompile] at com.sun.xml.rpc.processor.config.parser.ConfigurationParser.p
    arse(ConfigurationParser.java:65)
    [wscompile] at com.sun.xml.rpc.tools.wscompile.CompileTool.createConfigurati
    on(CompileTool.java:919)
    [wscompile] at com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.j
    ava:682)
    [wscompile] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43)
    [wscompile] at com.sun.xml.rpc.tools.ant.Wscompile.execute(Wscompile.java:74
    6)
    [wscompile] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
    va:275)
    [wscompile] at org.apache.tools.ant.Task.perform(Task.java:364)
    [wscompile] at org.apache.tools.ant.Target.execute(Target.java:341)
    [wscompile] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [wscompile] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)

    [wscompile] at org.apache.tools.ant.Project.executeTargets(Project.java:1062
    )
    [wscompile] at org.apache.tools.ant.Main.runBuild(Main.java:673)
    [wscompile] at org.apache.tools.ant.Main.startAnt(Main.java:188)
    [wscompile] at org.apache.tools.ant.Main.start(Main.java:151)
    [wscompile] at org.apache.tools.ant.Main.main(Main.java:241)
    [wscompile] Command invoked: wscompile -d C:\tomcat50-jwsdp\jaxrpc\build\samples
    \MyHelloWorldClient\classes\client -gen:client -keep -Xprintstacktrace C:\tomcat
    50-jwsdp\jaxrpc\samples\MyHelloWorldClient\etc\config.xml -classpath C:\tomcat50
    -jwsdp\jwsdp-shared\lib\mail.jar;C:\tomcat50-jwsdp\jwsdp-shared\lib\activation.j
    ar;C:\tomcat50-jwsdp\jaxp\lib\jaxp-api.jar;C:\tomcat50-jwsdp\jaxp\lib\endorsed\d
    om.jar;C:\tomcat50-jwsdp\jaxp\lib\endorsed\sax.jar;C:\tomcat50-jwsdp\jaxp\lib\en
    dorsed\xalan.jar;C:\tomcat50-jwsdp\jaxp\lib\endorsed\xercesImpl.jar;C:\tomcat50-
    jwsdp\jaxrpc\lib\jaxrpc-api.jar;C:\tomcat50-jwsdp\jaxrpc\lib\jaxrpc-spi.jar;C:\t
    omcat50-jwsdp\jaxrpc\lib\jaxrpc-impl.jar;C:\tomcat50-jwsdp\saaj\lib\saaj-api.jar
    ;C:\tomcat50-jwsdp\saaj\lib\saaj-impl.jar;C:\tomcat50-jwsdp\jwsdp-shared\lib\rel
    axngDatatype.jar;C:\tomcat50-jwsdp\jwsdp-shared\lib\xsdlib.jar;C:\tomcat50-jwsdp
    \jwsdp-shared\lib\jax-qname.jar;C:\tomcat50-jwsdp\apache-ant\lib\ant.jar;C:\tomc
    at50-jwsdp\jaxrpc\samples\MyHelloWorldClient\${compile.classpath}

    BUILD FAILED
    C:\tomcat50-jwsdp\jaxrpc\samples\MyHelloWorldClient\build.xml:61: wscompile fail
    ed

    Can any one help me in resolving this issue..

    Thanks in advance
     
    prasu, Oct 7, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron Martell

    RPC & NT Authority problem fix

    Ron Martell, Aug 12, 2003, in forum: Computer Support
    Replies:
    1
    Views:
    5,346
    longshotjohn7
    Aug 12, 2003
  2. synaptyx

    NT Authority\System RPC shutdown problem

    synaptyx, Sep 9, 2004, in forum: Computer Support
    Replies:
    6
    Views:
    12,217
    synaptyx
    Sep 13, 2004
  3. vvcd
    Replies:
    0
    Views:
    2,352
  4. Urik of Vancouver
    Replies:
    1
    Views:
    1,404
    Alan Morris [MSFT]
    Nov 25, 2008
  5. jimmy

    To build or not to build

    jimmy, Feb 23, 2009, in forum: Computer Information
    Replies:
    7
    Views:
    584
    ewmpsi@hotmail.com
    Feb 28, 2009
Loading...

Share This Page