users@jax-rpc.java.net

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

From: Anne Thomas Manes <anne_at_MANES.NET>
Date: Fri, 28 Mar 2003 07:51:42 -0500

You must use type= with rpc/encoded and element= with doc/literal.

This should work:

<types>
 <schema>
  <complexType name="LocationClassesType">
         <sequence>...</sequence>
  </complexType>
 </schema>
</types>

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

Your error references an entity called "LocationClasses". Perhaps it
occurred because you didn't remove the element definition.

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

Anne

> -----Original Message-----
> From: Public discussion on JAX-RPC
> [mailto:JAXRPC-INTEREST_at_JAVA.SUN.COM]On Behalf Of Pedro Salazar
> Sent: Friday, March 28, 2003 7:05 AM
> To: JAXRPC-INTEREST_at_JAVA.SUN.COM
> Subject: wsdl message part: element or type or both? (error)
>
>
> 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
>