I trust it by now you have stumbled upon SchemaType.isDocumentType() :-)

Radu

On Tue, 2007-10-23 at 13:07 -0700, Vance Vagell wrote:
> Hi Jacob,
> 
> As a future improvement, it would be helpful if the Javadoc for SchemaType 
> explained how to determine if the "type" is really an element definition 
> (what I now realize is termed a "document type").  I previously had some 
> complicated logic to determine if a SchemaType defines an element (as opposed 
> to a type), and it worked most of the time; however, it failed in these very 
> specific cases with single-element compositors.
> 
> That's why I thought XmlBeans wasn't properly compiling them -- I didn't see 
> them in the element list our product was outputting.  But they weren't in the 
> list because our software was filtering them out, not XmlBeans.
> 
> Regards,
> Vance
> 
> 
> > -------- Original Message --------
> > Subject: Re: Single-item sequence causes failure
> > From: "Jacob Danner" <[EMAIL PROTECTED]>
> > Date: Tue, October 23, 2007 3:33 pm
> > To: [email protected]
> > 
> > Thanks for the update Vance.
> > I wasn't having any luck reproducing the problem and this is probably why ;)
> > Let the list know if there is something we can do?
> > -jacobd
> > 
> > On 10/23/07, Vance Vagell <[EMAIL PROTECTED]> wrote:
> > >
> > > As a quick sanity check, I created a small test app (outside of our own
> > > product) that uses XmlBeans to process such schemas.  It worked.
> > >
> > > Using that knowledge, I was able to trace down some logic in our product
> > > which was using XmlBeans improperly.  So ignore the wayward engineer...
> > >
> > > Thanks for taking a look anyway Jacob.  Sometimes it helps just to explain
> > > a problem to someone else.
> > >
> > > - Vance
> > >
> > > > -------- Original Message --------
> > > > Subject: RE: Single-item sequence causes failure
> > > > From: Vance Vagell <[EMAIL PROTECTED]>
> > > > Date: Tue, October 23, 2007 12:22 pm
> > > > To: [email protected]
> > > >
> > > > Hi Jacob,
> > > >
> > > > Thanks for the responses.  I should have been clearer; there is no error
> > > while compiling these schemas, it's simply that the definition of "Map" 
> > > does
> > > not appear in the resultant SchemaTypeSystem (i.e., not in globalTypes()
> > > or documentTypes()).
> > > >
> > > > The tool we're using is a product we're developing, which leverages
> > > XMLBeans for schema processing.  It works great for all other types we've
> > > encountered, but for some reason certain compositors (like sequence, all)
> > > with only one element in them simply do not show up in the types once
> > > XMLBeans is done compiling.  There is no exception thrown, the type is
> > > simply missing.
> > > >
> > > > We resolved the technical difficulties in compiling WSDL schemas some
> > > time ago; we already include the SOAP and WSDL schemas during compilation,
> > > and handle all imports/includes to ensure that all cross-referenced types
> > > are available for the compile.  There are no problems with that.
> > > >
> > > > Only these single-element compositors are causing issues -- I confirmed
> > > it by adding another (arbitrary) element to them, and their type suddenly
> > > appears after compilation.
> > > >
> > > > Any ideas?
> > > >
> > > > Thanks,
> > > > Vance
> > > >
> > > > > -------- Original Message --------
> > > > > Subject: Re: Single-item sequence causes failure
> > > > > From: "Jacob Danner" <[EMAIL PROTECTED]>
> > > > > Date: Mon, October 22, 2007 8:04 pm
> > > > > To: [email protected]
> > > > >
> > > > > right, this is another rpc/encoded schema and you get the same error
> > > > > message.
> > > > > http://api.eurocv.eu/euroserver.php?wsdl:525:5: error: src-resolve:
> > > > > attribute 'a
> > > > > [EMAIL PROTECTED]://schemas.xmlsoap.org/soap/encoding/' not found.
> > > > >
> > > > > One other item you can use to get around this is to add the
> > > schemaLocation
> > > > > attribute to the soap encoding xsd:import.
> > > > >
> > > > > Just out of curiousity, which tool are you using?
> > > > > In particular:  'Only when our software (which uses XMLBeans) goes to
> > > find
> > > > > the "Map" type does it fail, because that type isn't in the
> > > list.'  How are
> > > > > you looking up the map type in this case since the xsd could not be
> > > > > compiled?
> > > > >
> > > > > -jacobd
> > > > >
> > > > >
> > > > > On 10/22/07, Vance Vagell <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Another example is:
> > > > > >
> > > > > > http://api.eurocv.eu/euroserver.php?wsdl
> > > > > >
> > > > > > The type "License" defined as:
> > > > > >
> > > > > > <xsd:complexType name="License">
> > > > > >   <xsd:all>
> > > > > >     <xsd:element name="license" type="xsd:string"/>
> > > > > >   </xsd:all>
> > > > > > </xsd:complexType>
> > > > > >
> > > > > > is not loaded.  This one has an <all>, instead of a <sequence>, but
> > > is the
> > > > > > same behavior.
> > > > > >
> > > > > > - Vance
> > > > > >
> > > > > > > -------- Original Message --------
> > > > > > > Subject: Single-item sequence causes failure
> > > > > > > From: Vance Vagell <[EMAIL PROTECTED]>
> > > > > > > Date: Mon, October 22, 2007 7:42 pm
> > > > > > > To: [email protected]
> > > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > I'm running into an issue with compiling certain schemas.  After
> > > much
> > > > > > testing, I've been able to narrow down the issue.  It stems from
> > > definitions
> > > > > > of the following format:
> > > > > > >
> > > > > > >    <complexType name="Map">
> > > > > > >     <sequence>
> > > > > > >      <element maxOccurs="unbounded" minOccurs="0" name="item"
> > > > > > type="apachesoap:mapItem"/>
> > > > > > >     </sequence>
> > > > > > >    </complexType>
> > > > > > >
> > > > > > > In particular, it seems that XMLBeans cannot compile a sequence
> > > with
> > > > > > just one element in it.  If I add another <element> to this, it
> > > > > > works.  What's interesting is that this does not throw an exception,
> > > it
> > > > > > fails silently.  Only when our software (which uses XMLBeans) goes
> > > to find
> > > > > > the "Map" type does it fail, because that type isn't in the list.
> > > > > > >
> > > > > > > Is this a known issue/bug, perhaps with a fix or workaround?  Have
> > > > > > others experienced this problem?
> > > > > > >
> > > > > > > For reference, here is a WSDL file with a <types> section that can
> > > be
> > > > > > used to reproduce this issue (includes example above):
> > > > > > >
> > > > > > > http://ws.soatrader.com/easycfm.com/1.0/Captcha?WSDL
> > > > > > >
> > > > > > > Note that we compile the types programatically at runtime, using
> > > > > > XmlBeans.compileXsd().  We do not use the provided automated scripts
> > > to
> > > > > > generate Java classes out of the schema.
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Vance
> > > > > > >
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > >
> > > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Notice:  This email message, together with any attachments, may contain 
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally 
privileged, and is intended solely for the use of the individual or entity 
named in this message. If you are not the intended recipient, and have received 
this message in error, please immediately return this by email and then delete 
it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to