users@jax-rpc.java.net

wsdl message part: element or type or both? (error)

From: Pedro Salazar <pedro-b-salazar_at_PTINOVACAO.PT>
Date: Fri, 28 Mar 2003 12:05:27 +0000

Greetings,

I try to define a <message> with a "element" attribute to refer my
element in my schema definition instead using the "type" attribute (I
rather use global schema declarations that is advised). But I received
the error (1) in wscompile:

(1)
error: in message "LocationFinder_getLocationClassesResponse", part
"result" must specify a "type" attribute

So, I added the "type" attribute but a new error (2) occurs:

(2)
error: modeler error: only one of the "element" or "type" attributes is
allowed in part "result"

So I removed the "element" attribute, and now it blocks on a new error
(3):

(3)
error: modeler error: invalid entity name: "LocationClasses" (in
namespace: "http://locawa.eurescom/locationfinder/types")

Can't define <element>s and <complexType>s in my schema definition, or
should I use only <complexType>s referred by message "type" attibute? In
that case, how can I use the "element" attribute in <message> element?

WSDL :
(schema definition)
<element name="LocationClasses" type="LocationClassesType" />
<complexType name="LocationClassesType">
        <sequence>...</sequence>
</complexType>

(1)
<message name="LocationFinder_getLocationClassesResponse">
        <part name="result" type="ns2:LocationClassesType" />
</message>

or

(2)
<message name="LocationFinder_getLocationClassesResponse">
        <part name="result" element="ns2:LocationClasses"
                type="ns2:LocationClassesType" />
</message>

or

(3)
<message name="LocationFinder_getLocationClassesResponse">
        <part name="result" type="ns2:LocationClassesType" />
</message>

thanks,
Pedro Salazar.
--
PS
pedro-b-salazar_at_ptinovacao.pt
PGP:0E129E31D803BC61