users@jax-rpc.java.net

WSCOMPILE : Invalid Entity Name

From: Yadav, Sharad \(Cognizant\) <"Yadav,>
Date: Fri, 11 Nov 2005 05:28:22 +0530

Hi,

I am trying to compile a very simple WSDL that imports an XSD. However, I have been getting a rather unintiutive error message. I have been stuck on this problem for 2 days and some help will be really appreciated.

I am using wscompile at the command prompt. Here is the command being used:

wscompile -verbose -gen:both -d test -f:wsi gen-config.xml

------------------------------
Error

error: modeler error: invalid entity name: "PurchaseOrderDocument" (in namespace : "http://localhost:8080/example/rss.xsd")
------------------------
XSD
------------------------
<?xml version="1.0" encoding="UTF-8"?>
<schema targetnamespace="http://localhost:8080/example/rss.xsd"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tns="http://localhost:8080/example/rss.xsd">

<element name="PurchaseOrderDocument" type="tns:PurchaseOrder"/>

<complextype name="Address">
<sequence>
<element name="street" type="string" nillable="false"/>
<element name="city" type="string" nillable="false"/>

<element name="state" type="string" nillable="false"/>
<element name="zipCode" type="string" nillable="false"/>
</sequence>
</complextype>
<complextype name="LineItem">
<sequence>
<element name="itemname" type="string" nillable="false"/>
<element name="price" type="decimal" nillable="false"/>
<element name="quantity" type="int" nillable="false"/>
</sequence>
</complextype>
<complextype name="PurchaseOrder">
<sequence>
<element name="billTo" type="tns:Address" nillable="false"/>
<element name="createDate" type="dateTime" nillable="false"/>
<element name="items" type="tns:LineItem"
nillable="false" minoccurs="0" maxoccurs="unbounded"/>
<element name="poID" type="string" nillable="false"/>
<element name="shipTo" type="tns:Address" nillable="false"/>
</sequence>
</complextype>
</schema>

------------------------------
WSDL
------------------------------

<definitions

xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://localhost:8080/example/rss.xsd"
xmlns:tns="http://www.examples.com/rss.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetnamespace="http://www.examples.com/rss.wsdl" name="RSSService">

<types>
<xsd:schema targetNamespace="http://examples.com/rss.xsd">
<xsd:import namespace="http://localhost:8080/example/rss.xsd" schemalocation="http://localhost:8080/example/rss.xsd" id="ns1" />
</xsd:schema>
</types>

<message name="AccountCenterService_updateAccount">
<part name="parameter" element="ns1:PurchaseOrderDocument"/>
</message>

<message name="AccountCenterService_updateAccountResponse">
<part name="result" element="ns1:PurchaseOrderDocument"/>
</message>

<portType name="AccountCenterService">
<operation name="getAccountInformation">
<input message="ns1:AccountCenterService_updateAccount"/>
<output message="ns1:AccountCenterService_updateAccountResponse"/></operation>
</portType>

<binding name="AccountCenterServiceBinding" type="tns:AccountCenterService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>

<operation name="getAccountInformation">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation>
</binding>

<service name="AccountCenterService">
<port name="AccountCenterServicePort" binding="tns:AccountCenterServiceBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/></port>
</service>
</definitions>

------------------------------------------------------------------------------------
I have tried to use some examples from Sun as well, but even they are failing. This means that there is obviously something wrong in my configuraiton. Please let me know what is amiss here ...

Thanks in advance.

Shayad_




This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com