users@jax-rpc.java.net

[wscompile] invalid entity name

From: Clinton Bosch <clinton.bosch_at_gmail.com>
Date: Wed, 24 Aug 2005 13:29:21 +0200

Hi

Please could somebody help me, I have been struggling for days to get the
wscompile tool to work and I am now desperate.

I have created a wsdl document containing a complex type (AccountAge) as
follows:

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="DoradoService"
targetNamespace="http://dorado/wsdl/"
xmlns:tns="http://dorado/wsdl/"
xmlns:xsd1="http://dorado/xsd/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/">

<types>
<schema targetNamespace="http://dorado/xsd/"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="AccountAge">
<complexType>
<sequence>
<element name="balanceCurrentTerms" type="int"/>
<element name="balanceCurrentCash" type="int"/>
<element name="balance30" type="int"/>
<element name="balance60" type="int"/>
<element name="balance90" type="int"/>
<element name="balance120" type="int"/>
<element name="balance150" type="int"/>
<element name="balance180" type="int"/>
</sequence>
</complexType>
</element>
</schema>
</types>

<message name="sayHello">
<part name="String_1" type="xsd:string"/>
</message>
<message name="sayHelloResponse">
<part name="result" type="xsd:string"/>
</message>
<message name="getAccountAge">
<part name="String_1" type="xsd:string"/>
</message>
<message name="getAccountAgeResponse">
<part name="result" type="xsd1:AccountAge"/>
</message>

<portType name="DoradoIF">
<operation name="sayHello" parameterOrder="String_1">
<input message="tns:sayHello"/>
<output message="tns:sayHelloResponse"/>
</operation>
<operation name="getAccountAge" parameterOrder="String_1">
<input message="tns:getAccountAge"/>
<output message="tns:getAccountAgeResponse"/>
</operation>
</portType>

<binding name="DoradoIFBinding" type="tns:DoradoIF">
<operation name="sayHello">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://dorado/wsdl/"/>
</input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://dorado/wsdl/"/>
</output>
<soap:operation soapAction=""/>
</operation>
<operation name="getAccountAge">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://dorado/wsdl/"/>
</input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://dorado/wsdl/"/>
</output>
<soap:operation soapAction=""/>
</operation>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
</binding>

<service name="DoradoService">
<port name="DoradoIFPort" binding="tns:DoradoIFBinding">
<soap:address location="http://localhost:8080/jaxrpc-Dorado/dorado"/>
</port>
</service>
</definitions>

and when I run the wscompile tool through an ant task as follows:

<target name="generate-server"
depends="init"
description="Runs the wscompile jwsdp tool on the server classes">
<wscompile
keep="false"
import="true"
base="${dir.build.classes}/server"
xPrintStackTrace="true"
verbose="true"
model="${dir.build}/${model.rpcenc.file}"
config="${config.rpcenc.file}">
<classpath>
<path refid="cp.path"/>
</classpath>
</wscompile>
</target>


I get the following error:

[wscompile] invalid entity name: "AccountAge" (in namespace: "
http://dorado/xsd/")


Thanks in advance


-- 
Clinton Bosch
Hemisphere Technologies
Tel: +27 (0)21 6703940
Cell: +27 (0)82 805 9479