users@jax-rpc.java.net

Re: Class not generated

From: Matt Swensson <matman2k1_at_yahoo.com>
Date: Wed, 13 Apr 2005 14:48:35 -0700 (PDT)

Thanks for your reply...

Ok, so it is safe to say that this isn't a bug, but still a limitation
in a sense. The problem is, this WSDL is generated from a .NET service
and the wscompile tool currently doesn't handle this case (as per the
spec - as you mentioned).

Sels Wannes stated this would be different in 2.0, although the spec
doesn't yet show this. (at least the pdf I viewed isn't yet fully
complete I think)

I believe both examples are valid and my question is more along the
lines of something like "is this on a checklist somewhere or in the
upcoming spec?" as it seems as though, for interoperability, this
should be supported.

If not, then should it be added somewhere for tracking purposes.

Thanks again to everyone for your help with this.

Matt


--- Vivek Pandey <Vivek.Pandey_at_Sun.COM> wrote:

> I just found your reply earlier about Item definition. The reason
> Book
> type is maped to SOAPElement in the first case is because JAXRPC only
>
> supports extension of complexType with empty content. In the first
> case
> Book type has empty content and so is mapped to SOAPElement.
>
> In the second Book type, it has elements and so mapped to the
> equivalent
> java type.
>
> I dont think its bug. Refer to jaxrpc 1.1 sepc, page 141 table 18-1,
> it
> only requires support for complexType with content such as sequence.
>
> thanks,
>
> -vivek
>
>
>
> > -------- Original Message --------
> > Subject: Re: Class not generated
> > Date: Fri, 08 Apr 2005 12:01:10 -0700 (PDT)
> > From: Matt Swensson <matman2k1_at_yahoo.com>
> > Reply-To: users_at_jax-rpc.dev.java.net
> > To: users_at_jax-rpc.dev.java.net
> >
> >
> >
> > Sure!
> >
> > <s:complexType name="Item" abstract="true">
> > <s:attribute name="ID" type="s:string" use="required"/>
> > <s:attribute name="Name" type="s:string"/>
> > </s:complexType>
> >
> > So, Item is abstract, but Item.java
> > Item_InterfaceSOAPSerializer.java
> > Item_LiteralSerializer.java
> >
> > are getting generated, but not Book.
> >
> > There are other items in the WSDL that extend Item and get
> generated
> > fine, but they have the format of the second example I showed (with
> a
> > sequence of elements and not attributes).
>
> >
> > Thanks for your help,
> > Matt
>
>
>
> Vivek Pandey wrote:
>
> > Hi Matt,
> >
> > Book type extends from tns:Item. It will help if I can see tns:Item
> or
> > infact the entire schema. If tns:Item is unsupported type then the
> > types extended from it will be mapped to SOAPElement.
> >
> > thanks,
> >
> > -vivek.
> >
> > Matt Swensson wrote:
> >
> >> I did try the searchschema feature, but it doesn't seem to work.
> >>
> >> Is this considered a bug? If so, shall I/someone log this
> somewhere?
> >> Or is this already in 'the list' of things to be addressed?
> >>
> >> Matt
> >>
> >>
> >> --- Sels Wannes <Wannes.Sels_at_cronos.be> wrote:
> >>
> >>
> >>
> >>> Kevin,
> >>>
> >>> This is indeed a limitation of the code generation. This issue
> will
> >>> be
> >>> addressed with the JAX-RPC 2.0 specification and the integration
> with
> >>> JAXB 2.0 . You can try using the -f:searchschema switch on
> wscompile.
> >>> If
> >>> that doesn't work you can try using JAXB bindings
> >>>
> >>> Regards,
> >>>
> >>> Wannes Sels
> >>> -----Original Message-----
> >>> From: Kevin Jones [mailto:kevinj_at_develop.com] Sent: vrijdag 8
> april
> >>> 2005 19:33
> >>> To: users_at_jax-rpc.dev.java.net
> >>> Subject: RE: Class not generated
> >>>
> >>> I don't think it's that.
> >>> It's more likely to do with the fact that you are using extension
> and
> >>> attributes (the second example you gave was using extension and
> >>> element).
> >>> Although of the top of my head I don't know why this would cause
> the
> >>> code
> >>> not to be generated. It may simply be a limitation of the code
> >>> generation
> >>> tool rather than a limitation of the JAX-RPC spec,
> >>>
> >>> Kevin Jones
> >>> http://kevinj.develop.com/weblog
> >>>
> >>>
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Matt Swensson [mailto:matman2k1_at_yahoo.com] Sent: 08 April
> >>>> 2005 17:37
> >>>> To: users_at_jax-rpc.dev.java.net
> >>>> Subject: Re: Class not generated
> >>>>
> >>>> I have done some reading and found that abstract types get
> mapped
> >>>> to javax.xml.soap.SOAPElement, which is what I am seeing below.
> I
> >>>> am wondering if the Book type is considered abstract and thus
> >>>> instead of it getting generated as a class, it just gets mapped
> (in
> >>>> ArrayOfBook).
> >>>>
> >>>> IF this is the case, then I am not sure why Book is considered
> >>>> abstract.
> >>>>
> >>>> Matt
> >>>>
> >>>> --- Matt Swensson <matman2k1_at_yahoo.com> wrote:
> >>>>
> >>>>
> >>>>> I have a wsdl file that contains:
> >>>>> <s:complexType name="ArrayOfBook">
> >>>>> <s:sequence>
> >>>>> <s:element minOccurs="0" maxOccurs="unbounded" name="BookSlot"
> >>>>> nillable="true" type="tns:Book"/>
> >>>>> </s:sequence>
> >>>>> </s:complexType>
> >>>>>
> >>>>> <s:complexType name="Book">
> >>>>> <s:complexContent mixed="false">
> >>>>> <s:extension base="tns:Item">
> >>>>> <s:attribute name="numPages" type="s:string" use="required"/>
> >>>>> </s:extension>
> >>>>> </s:complexContent>
> >>>>> </s:complexType>
> >>>>>
> >>>>> and I am using wscompile on it:
> >>>>> wscompile.sh -s src/ -d classes/ -gen:client -keep
> >>>>> -f:explicitcontext,searchschema -verbose bin/config.xml
> >>>>>
> >>>>> But the Book class never gets generated, only:
> >>>>> ArrayOfBook.java
> >>>>> ArrayOfBook_LiteralSerializer.java
> >>>>>
> >>>>> and in that class it has:
> >>>>> protected javax.xml.soap.SOAPElement[] BookSlot
> >>>>>
> >>>>> If I change the WSDL to have this:
> >>>>> <s:complexType name="ArrayOfBook">
> >>>>> <s:sequence>
> >>>>> <s:element minOccurs="0" maxOccurs="unbounded" name="BookSlot"
> >>>>> nillable="true" type="tns:Book"/>
> >>>>> </s:sequence>
> >>>>> </s:complexType>
> >>>>>
> >>>>> <s:complexType name="Book">
> >>>>> <s:complexContent mixed="false">
> >>>>> <s:extension base="tns:Item">
> >>>>> <s:sequence>
> >>>>> <s:element minOccurs="1" maxOccurs="1" name="numPages"
> >>>>> type="s:string"/>
> >>>>> </s:sequence>
> >>>>> </s:extension>
> >>>>> </s:complexContent>
> >>>>> </s:complexType>
> >>>>>
> >>>>> The classes generate fine. ArrayOfBook.java
> >>>>> ArrayOfBook_LiteralSerializer.java
> >>>>> Book.java
> >>>>> Book_LiteralSerializer.java
> >>>>>
> >>>>> and the ArrayOfBook.java file contains:
> >>>>> protected blah.blah.blah.Book[] BookSlot
> >>>>>
>
=== message truncated ===



                
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/