users@jax-ws.java.net

RE: Re: for problem of using nested ComplexType

From: yuyin Song <yuyinsong_at_yahoo.com>
Date: Mon, 14 May 2007 06:26:56 -0700 (PDT)

Hi Don,

Thanks for your suggestion.
Regards,

Yin
--- Don Kneller <dkneller_at_good.com> wrote:

> Using the <element name="info" type="infoType" />
> should be fine, but
> you need to be aware of namespaces. When you
> declare a <complexType> it
> exists in the target namespace. That namespace
> probably has a prefix
> associated with it. You need to use that prefix
> when specifying the
> 'type="infoType"' attribute else you get the default
> namespace (which,
> based on our WSDL fragment not using any prefix
> before the <complexType>
> element, is the "http://www.w3.org/2001/XMLSchema"
> namespace).
>
>
>
> In fact, it's a good idea for all 'type="<type>"'
> attributes to use a
> qualified name for the <type>, so "xsd:string"
> rather than "string"
> where "xsd" is the defined in the WSDL's
> <definitions> or <xsd:schema>
> element as an attribute like:
> xmlns:xsd="http://www.w3.org/2001/XMLSchema".
>
>
>
> Does this help?
>
>
>
> - Don
>
> ________________________________
>
> From: Jose Perez [mailto:javaph_at_gmail.com]
> Sent: Friday, May 11, 2007 10:22 AM
> To: users_at_jax-ws.dev.java.net
> Subject: Re: for problem of using nested ComplexType
>
>
>
> Dont you need to use the "ref" instade of name or
> type???
>
>
>
> <complexType name="messageType">
> <sequence>
> <element name="identifier" type="string"/>
> <element name="status" type="String"/>
> <element ref="infoType" />
> </sequence>
> </complexType>
>
> <complexType name="infoType">
> <sequence>
> <element name="category" type="string"/>
> <element name="event" type="string"/>
> </sequence>
> </complexType>
>
>
>
>
> On 5/10/07, yuyin Song <yuyinsong_at_yahoo.com> wrote:
>
> Hi All,
>
> I have problem for nested ComplexType.
>
> I have the following nested ComplexType used in the
> response.
>
> <complexType name="messageType">
> <sequence>
> <element name="identifier" type="string"/>
> <element name="status" type="String"/>
> <element name="info" type="infoType" />
> </sequence>
> </complexType>
>
> <complexType name="infoType">
> <sequence>
> <element name="category" type="string"/>
> <element name="event" type="string"/>
> </sequence>
> </complexType>
>
> When I build web services, there existed some errors
> for nested complexType "infoType". Please give me
> advice how to deal with nested CompexType in the
> request or response. Thanks a lot.
> Regards,
>
> yin
>
>
>
>
>
>
>
>
________________________________________________________________________
> ____________
> Need Mail bonding?
> Go to the Yahoo! Mail Q&A for great tips from Yahoo!
> Answers users.
>
http://answers.yahoo.com/dir/?link=list&sid=396546091
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail:
> users-help_at_jax-ws.dev.java.net
>
>
>
>



 
____________________________________________________________________________________
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367