users@jax-rpc.java.net

Problems getting started with JAX-RPC

From: Gabriel Bauman <gabe_at_bravenet.com>
Date: Thu, 23 Oct 2003 16:17:45 -0700

Hello!

Myself and a colleague are trying to set up our build scripts for a
project that is to use JAX-RPC. We've encountered some strange problems
with the wsdeploy ant task and we're kind of at a loss. We are using the
JWSDP version 1.3.

Our build process performs the following steps:

1. It compiles our tree
2. It calls wscompile, which generates the model and wsdl
3. It builds the initial war file
4. It calls wsdeploy on the initial war file, which begins generating
stubs and ties, etc.

Wscompile does its thing for a while, successfully running through the
CustomClassGenerator and SoapObjectSerializerGenerator segments of its
run. Then it reaches its SOAPObjectBuilderGenerator tasks, and fails
with a NullPointerException. I have included build output and relevant
definitions below.

Any insight would be very much appreciated.

Sincerely,

Gabriel Bauman
Bravenet.com


====== wsdeploy output ========

    [wsdeploy] command line: wsdeploy -classpath "C:\Documents and
Settings\gbauman\.maven\repository\dom4j\jars\dom4j-1.4.jar;C:\Documents
and
Settings\gbauman\.maven\repository\xerces\jars\xercesImpl-2.4.0.jar;C:\D
ocuments and
Settings\gbauman\.maven\repository\jaf\jars\activation-1.0.2.jar;C:\Docu
ments and
Settings\gbauman\.maven\repository\javamail\jars\mail-1.3.1.jar;C:\Docum
ents and
Settings\gbauman\.maven\repository\jax-qname\jars\jax-qname-1.1.jar;C:\D
ocuments and
Settings\gbauman\.maven\repository\jaxrpc\jars\jaxrpc-api-1.1.jar;C:\Doc
uments
andSettings\gbauman\.maven\repository\jaxrpc\jars\jaxrpc-impl-1.1.jar;C:
\Documentsand
Settings\gbauman\.maven\repository\jaxrpc\jars\jaxrpc-spi-1.1.jar;C:\Doc
uments and
Settings\gbauman\.maven\repository\saaj\jars\saaj-api-1.2.jar;C:\Documen
ts and
Settings\gbauman\.maven\repository\saaj\jars\saaj-impl-1.2.jar;C:\Docume
nts and
Settings\gbauman\.maven\repository\jaxp\jars\jaxp-1.2.4.jar;C:\Documents
and
Settings\gbauman\.maven\repository\caucho\jars\resin-ejb-3.0.3.jar;C:\Do
cuments and
Settings\gbauman\.maven\repository\ejb\jars\ejb.jar;C:\Documents and
Settings\gbauman\.maven\repository\sax\jars\sax-2.0.1.jar;C:\Documents
and
Settings\gbauman\.maven\repository\xalan\jars\xalan-2.5.1.jar;C:\Documen
ts and
Settings\gbauman\.maven\repository\xsdlib\jars\xsdlib.jar;C:\Documents
and Settings\gbauman\.maven\repository\xsltc\jars\xsltc.jar;C:\Documents
and Settings\gbauman\.maven\repository\relaxng\jars\relaxngDatatype.jar"
-keep -o L:\cvs\xdms\target\xdms.war -verbose
L:\cvs\xdms\target\xdms-raw.war
    [wsdeploy] info: created temporary directory:
C:\DOCUME~1\gbauman\LOCALS~1\T
emp\jaxrpc-deploy-d46a59
[CustomClassGenerator: generating JavaClass for: createAccount]
[CustomClassGenerator: generating JavaClass for: createAccountResponse]
[CustomClassGenerator: generating JavaClass for: deleteAccount]
[CustomClassGenerator: generating JavaClass for: deleteAccountResponse]
[CustomClassGenerator: generating JavaClass for: setAccountDisabled]
[CustomClassGenerator: generating JavaClass for:
setAccountDisabledResponse]
[CustomClassGenerator: generating JavaClass for: upgradeAccout]
[CustomClassGenerator: generating JavaClass for: upgradeAccoutResponse]
[SOAPObjectSerializerGenerator: writing serializer/deserializer for:
{urn:Foo}createAccount]
[SOAPObjectSerializerGenerator: writing serializer/deserializer for:
{urn:Foo}createAccountResponse]
[SOAPObjectSerializerGenerator: writing serializer/deserializer for:
{urn:Foo}deleteAccount]
[SOAPObjectSerializerGenerator: writing serializer/deserializer for:
{urn:Foo}deleteAccountResponse]
[SOAPObjectSerializerGenerator: writing serializer/deserializer for:
{urn:Foo}setAccountDisabled]
[SOAPObjectSerializerGenerator: writing serializer/deserializer for:
{urn:Foo}setAccountDisabledResponse]
[SOAPObjectSerializerGenerator: writing serializer/deserializer for:
{urn:Foo}upgradeAccout]
[SOAPObjectSerializerGenerator: writing serializer/deserializer for:
{urn:Foo}upgradeAccoutResponse]
[SOAPObjectBuilderGenerator: writing object builder for: createAccount]
[SerializerRegistryGenerator: creating serializer registry:
com.bravenet.xdms.hosting.service.account.provider.jaxrpc.AccountWebServ
ice_SerializerRegistry]
    [wsdeploy] error: java.lang.NullPointerException
    [wsdeploy] java.lang.NullPointerException
    [wsdeploy] at
com.sun.xml.rpc.util.JavaCompilerHelper.internalCompile(JavaCompilerHelp
er.java:45)
    [wsdeploy] at
com.sun.xml.rpc.util.JavaCompilerHelper.compile(JavaCompilerHelper.java:
32)
    [wsdeploy] at
com.sun.xml.rpc.tools.wscompile.CompileTool.compileGeneratedClasses(Comp
ileTool.java:876)
    [wsdeploy] at
com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:578)
    [wsdeploy] at
com.sun.xml.rpc.tools.wsdeploy.DeployTool.process(DeployTool.java:303)
    [wsdeploy] at
com.sun.xml.rpc.tools.wsdeploy.DeployTool.run(DeployTool.java:213)
    [wsdeploy] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:40)
    [wsdeploy] at
com.sun.xml.rpc.tools.ant.Wsdeploy.execute(Wsdeploy.java:351)

    [wsdeploy] at org.apache.tools.ant.Task.perform(Task.java:341)
    [wsdeploy] at
org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
    [wsdeploy] at
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
    [wsdeploy] at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
    [wsdeploy] at
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
    [wsdeploy] at
com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
    [wsdeploy] at com.werken.werkz.Goal.fire(Goal.java:639)
    [wsdeploy] at com.werken.werkz.Goal.attain(Goal.java:575)
    [wsdeploy] at
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:434
)
    [wsdeploy] at
org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
    [wsdeploy] at org.apache.maven.cli.App.doMain(App.java:525)
    [wsdeploy] at org.apache.maven.cli.App.main(App.java:1088)
    [wsdeploy] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
    [wsdeploy] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
    [wsdeploy] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
    [wsdeploy] at java.lang.reflect.Method.invoke(Method.java:324)
    [wsdeploy] at com.werken.forehead.Forehead.run(Forehead.java:543)
    [wsdeploy] at com.werken.forehead.Forehead.main(Forehead.java:573)

BUILD FAILED
File...... file:/L:/cvs/xdms/
Element... wsdeploy
Line...... 97
Column.... 26
wsdeploy failed

====== jaxrpc-ri.xml ========

<?xml version="1.0" encoding="UTF-8"?>

<webServices
    xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/dd"
    version="1.0"
    targetNamespaceBase="urn:Foo"
    typeNamespaceBase="urn:Foo"
    urlPatternBase="/ws">

    <endpoint
        name="Account"
        displayName="Account Web Service"
        description="A simple web service"
        wsdl="/WEB-INF/AccountWebService.wsdl"
 
interface="com.bravenet.xdms.hosting.service.account.provider.jaxrpc.Acc
ountWebService"
 
implementation="com.bravenet.xdms.hosting.service.account.provider.jaxrp
c.AccountWebServiceImpl"
            model="/WEB-INF/model-wsdl-rpcenc.xml.gz"/>

    <endpointMapping
        endpointName="Acount"
        urlPattern="/account"/>

</webServices>

====== config.xml ========

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE configuration>

<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">

    <service
        name="AccountWebService"
        targetNamespace="urn:Foo"
        typeNamespace="urn:Foo"
 
packageName="com.bravenet.xdms.hosting.service.account.provider.jaxrpc">

        <interface
name="com.bravenet.xdms.hosting.service.account.provider.jaxrpc.AccountW
ebService"/>

    </service>

</configuration>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net