You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Deepti Garg (Created) (JIRA)" <xe...@xml.apache.org> on 2011/10/20 18:57:10 UTC

[jira] [Created] (XERCESJ-1540) getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type

getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type
-----------------------------------------------------------------------------------------------------

                 Key: XERCESJ-1540
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1540
             Project: Xerces2-J
          Issue Type: Bug
          Components: XML Schema API
    Affects Versions: 2.11.0
         Environment: Windows 7, xercesImpl-2.11.0b.jar
            Reporter: Deepti Garg
             Fix For: 2.11.0


The element references of complex types in the XSD are not returned by the method of the Xerces API, getPaticle(.

<xs:complexType name="result">
    <xs:sequence>
     <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
     <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
     <xs:element ref="ns:name"/>
     <xs:element minOccurs="0" ref="ns:author"/>
    </xs:sequence>
   </xs:complexType>

Here for the complex type result, only username and password elements are returned by the getParticle() method. Even if the element reference belongs to the same namespace as the complex type, it is not returned by the getParticle() method. 


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Commented] (XERCESJ-1540) getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type

Posted by "Deepti Garg (Commented) (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153114#comment-13153114 ] 

Deepti Garg commented on XERCESJ-1540:
--------------------------------------

Thanks for your detailed response. 

I tried running your sample program against the sample test.xsd you provided and indeed it returns the correct number of particles. Then I ran test.xsd against my code and my program returned the correct number of particles too! I then created this test.wsdl file:

<definitions name="ChronoService" targetNamespace="http://gov.uscourts.ao.pacts/chrono" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://gov.uscourts.ao.pacts/chrono" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <types>
    <xs:schema targetNamespace="http://gov.uscourts.ao.pacts/chrono" version="1.0" xmlns:ns2="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws" xmlns:xs="http://www.w3.org/2001/XMLSchema">	
	   <xs:import namespace="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws"/>	   
	   <xs:element name="getChrono" type="tns:getChrono"/>
	   <xs:complexType name="getChrono">
		<xs:sequence>
		 <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
		 <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
		 <xs:element ref="ns2:attempted"/>
		 <xs:element minOccurs="0" ref="ns2:author"/>
		</xs:sequence>
	   </xs:complexType>		   
	</xs:schema>
    <xs:schema targetNamespace="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	   <xs:element name="attempted" type="xs:boolean"/>
	   <xs:element name="author" type="xs:string"/>	   
	</xs:schema>
  </types>
</definitions>

and ran my program (which uses the same API methods as your sample program) against this test.wsdl. And again for the complex type 'getChrono' in this wsdl, I get only 2 particles, username and password, instead of all four particles, username, password, attempted and author. Any idea why it would treat this case differently and how I can retrieve all four particles for complex type 'getChrono'? Thanks!







                
> getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type
> -----------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1540
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1540
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.11.0
>         Environment: Windows 7, xercesImpl-2.11.0b.jar
>            Reporter: Deepti Garg
>             Fix For: 2.11.0
>
>         Attachments: Chrono1.wsdl, Chrono1.wsdl, WebservicesBaseComplexTypeWrapper.java
>
>
> The element references of complex types in the XSD are not returned by the method of the Xerces API, getPaticle(.
> <xs:complexType name="result">
>     <xs:sequence>
>      <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
>      <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
>      <xs:element ref="ns:name"/>
>      <xs:element minOccurs="0" ref="ns:author"/>
>     </xs:sequence>
>    </xs:complexType>
> Here for the complex type result, only username and password elements are returned by the getParticle() method. Even if the element reference belongs to the same namespace as the complex type, it is not returned by the getParticle() method. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Updated] (XERCESJ-1540) getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type

Posted by "Deepti Garg (Updated) (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepti Garg updated XERCESJ-1540:
---------------------------------

    Attachment: WebservicesBaseComplexTypeWrapper.java
                Chrono1.wsdl

Attaching the WSDL file which has the XSD elements. Also attaching the java code which calls the getParticle() method and processes its result.
                
> getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type
> -----------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1540
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1540
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.11.0
>         Environment: Windows 7, xercesImpl-2.11.0b.jar
>            Reporter: Deepti Garg
>             Fix For: 2.11.0
>
>         Attachments: Chrono1.wsdl, WebservicesBaseComplexTypeWrapper.java
>
>
> The element references of complex types in the XSD are not returned by the method of the Xerces API, getPaticle(.
> <xs:complexType name="result">
>     <xs:sequence>
>      <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
>      <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
>      <xs:element ref="ns:name"/>
>      <xs:element minOccurs="0" ref="ns:author"/>
>     </xs:sequence>
>    </xs:complexType>
> Here for the complex type result, only username and password elements are returned by the getParticle() method. Even if the element reference belongs to the same namespace as the complex type, it is not returned by the getParticle() method. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Commented] (XERCESJ-1540) getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type

Posted by "Deepti Garg (Commented) (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153123#comment-13153123 ] 

Deepti Garg commented on XERCESJ-1540:
--------------------------------------

I also modified test.xsd to look like this:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ns" xmlns:ns2="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws">

   <xs:import schemaLocation="person.xsd" namespace="http://ns"/>
   <xs:import namespace="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws"/>
   
   <xs:schema targetNamespace="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	   <xs:element name="attempted" type="xs:boolean"/>
	   <xs:element name="author" type="xs:string"/>	   
	</xs:schema>
	
   <xs:complexType name="result">
      <xs:sequence>
         <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
         <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
         <xs:element ref="ns:name"/>
         <xs:element minOccurs="0" ref="ns:author"/>
         <xs:element ref="ns2:attempted"/>
     </xs:sequence>
   </xs:complexType> 
   
</xs:schema>

and ran your sample code against it and I still got back only four particles for complex type result: username, password, name & author, instead of all five particles. Is there any other processing required to get back all five particles? Thanks!
 
                
> getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type
> -----------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1540
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1540
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.11.0
>         Environment: Windows 7, xercesImpl-2.11.0b.jar
>            Reporter: Deepti Garg
>             Fix For: 2.11.0
>
>         Attachments: Chrono1.wsdl, Chrono1.wsdl, WebservicesBaseComplexTypeWrapper.java
>
>
> The element references of complex types in the XSD are not returned by the method of the Xerces API, getPaticle(.
> <xs:complexType name="result">
>     <xs:sequence>
>      <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
>      <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
>      <xs:element ref="ns:name"/>
>      <xs:element minOccurs="0" ref="ns:author"/>
>     </xs:sequence>
>    </xs:complexType>
> Here for the complex type result, only username and password elements are returned by the getParticle() method. Even if the element reference belongs to the same namespace as the complex type, it is not returned by the getParticle() method. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Commented] (XERCESJ-1540) getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type

Posted by "Mukul Gandhi (Commented) (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151787#comment-13151787 ] 

Mukul Gandhi commented on XERCESJ-1540:
---------------------------------------

I wrote a small test case (and using Xerces 2.11.0 to run this test case), trying to verify your claim that Xerces isn't modeling XSD particles (and consequently the XSD complex type model) correctly.

I'm using the following XSD documents:

test.xsd

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ns">

   <xs:import schemaLocation="person.xsd" namespace="http://ns"/>
   
   <xs:complexType name="result">
      <xs:sequence>
         <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
         <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
         <xs:element ref="ns:name"/>
         <xs:element minOccurs="0" ref="ns:author"/>
      </xs:sequence>
   </xs:complexType> 
	 
</xs:schema>

person.xsd :

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ns">

     <xs:element name="name" type="xs:string"/>
	 
     <xs:element name="author" type="xs:string"/>
	 
</xs:schema>

The following java test case, builds an XSModel instance from the XSD document test.xsd and then queries certain aspects (essentially the XSParticle details which you think are incorrectly modeled) of the constructed XSModel instance:

XSLoader xsLoader = new XSLoaderImpl();
XSModel xsModel = xsLoader.loadURI("test.xsd");
XSComplexTypeDefinition cmplxTypeDefinition = (XSComplexTypeDefinition)xsModel.getTypeDefinition("result", null);
XSParticle compositeParticle = cmplxTypeDefinition.getParticle();
XSTerm term1 = compositeParticle.getTerm();
if (term1 instanceof XSModelGroup) {
   System.out.println("the complex type 'result' has a model group particle");
   XSModelGroup modelGp = (XSModelGroup)term1;
   if (modelGp.getCompositor() == XSModelGroup.COMPOSITOR_SEQUENCE) {
       System.out.println("the compositor kind of model group particle(that is within a complex type 'result') is 'sequence'");
       XSObjectList modelGpPrtcls = modelGp.getParticles();
       System.out.println("no of particles within the model group particle are: " + modelGpPrtcls.getLength());
       for (int prtclIdx = 0; prtclIdx < modelGpPrtcls.getLength(); prtclIdx++) {
          XSParticle partclInst = (XSParticle)modelGpPrtcls.get(prtclIdx);
          XSTerm prtclTrm = partclInst.getTerm();
          if (prtclTrm instanceof XSElementDeclaration) {
	     XSElementDeclaration elmDecl = (XSElementDeclaration) prtclTrm;
	     System.out.println("particle "+(prtclIdx+1)+". element name: "+elmDecl.getName());
          }
      }
   }
}


The above program prints following output,

the complex type 'result' has a model group particle
the compositor kind of model group particle (that is within a complex type 'result') is 'sequence'
no of particles within the model group particle are: 4
particle 1. element name: username
particle 2. element name: password
particle 3. element name: name
particle 4. element name: author

Following is some explanation what the above output indicates,
1. The complexType in this example has only one particle, which is of kind model group whose compositor is "sequence"
2. When we further query the model group particle from step 1, it shows to contain four particles which are of kind "element declarations"

I believe, this test case showcases that Xerces correctly models XSD complex types and particles. You seem to have incorrectly assumed the nature of the particle within the complex type (it is a model group particle, and not four element particles as you incorrectly thought).

I therefore think, your bug report may be incorrect.
                
> getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type
> -----------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1540
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1540
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.11.0
>         Environment: Windows 7, xercesImpl-2.11.0b.jar
>            Reporter: Deepti Garg
>             Fix For: 2.11.0
>
>         Attachments: Chrono1.wsdl, Chrono1.wsdl, WebservicesBaseComplexTypeWrapper.java
>
>
> The element references of complex types in the XSD are not returned by the method of the Xerces API, getPaticle(.
> <xs:complexType name="result">
>     <xs:sequence>
>      <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
>      <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
>      <xs:element ref="ns:name"/>
>      <xs:element minOccurs="0" ref="ns:author"/>
>     </xs:sequence>
>    </xs:complexType>
> Here for the complex type result, only username and password elements are returned by the getParticle() method. Even if the element reference belongs to the same namespace as the complex type, it is not returned by the getParticle() method. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Updated] (XERCESJ-1540) getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type

Posted by "Deepti Garg (Updated) (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepti Garg updated XERCESJ-1540:
---------------------------------

    Attachment: Chrono1.wsdl

Please consider this modified WSDL file. Look at the complex type "result". 
I had modified the complex type sample before posting on the jira issue. Now this WSDL file is the correct test. 
                
> getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type
> -----------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1540
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1540
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.11.0
>         Environment: Windows 7, xercesImpl-2.11.0b.jar
>            Reporter: Deepti Garg
>             Fix For: 2.11.0
>
>         Attachments: Chrono1.wsdl, Chrono1.wsdl, WebservicesBaseComplexTypeWrapper.java
>
>
> The element references of complex types in the XSD are not returned by the method of the Xerces API, getPaticle(.
> <xs:complexType name="result">
>     <xs:sequence>
>      <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
>      <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
>      <xs:element ref="ns:name"/>
>      <xs:element minOccurs="0" ref="ns:author"/>
>     </xs:sequence>
>    </xs:complexType>
> Here for the complex type result, only username and password elements are returned by the getParticle() method. Even if the element reference belongs to the same namespace as the complex type, it is not returned by the getParticle() method. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Updated] (XERCESJ-1540) getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type

Posted by "Deepti Garg (Updated) (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepti Garg updated XERCESJ-1540:
---------------------------------

    Comment: was deleted

(was: I also modified test.xsd to look like this:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ns" xmlns:ns2="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws">

   <xs:import schemaLocation="person.xsd" namespace="http://ns"/>
   <xs:import namespace="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws"/>
   
   <xs:schema targetNamespace="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	   <xs:element name="attempted" type="xs:boolean"/>
	   <xs:element name="author" type="xs:string"/>	   
	</xs:schema>
	
   <xs:complexType name="result">
      <xs:sequence>
         <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
         <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
         <xs:element ref="ns:name"/>
         <xs:element minOccurs="0" ref="ns:author"/>
         <xs:element ref="ns2:attempted"/>
     </xs:sequence>
   </xs:complexType> 
   
</xs:schema>

and ran your sample code against it and I still got back only four particles for complex type result: username, password, name & author, instead of all five particles. Is there any other processing required to get back all five particles? Thanks!
 )
    
> getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type
> -----------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1540
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1540
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.11.0
>         Environment: Windows 7, xercesImpl-2.11.0b.jar
>            Reporter: Deepti Garg
>             Fix For: 2.11.0
>
>         Attachments: Chrono1.wsdl, Chrono1.wsdl, WebservicesBaseComplexTypeWrapper.java
>
>
> The element references of complex types in the XSD are not returned by the method of the Xerces API, getPaticle(.
> <xs:complexType name="result">
>     <xs:sequence>
>      <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
>      <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
>      <xs:element ref="ns:name"/>
>      <xs:element minOccurs="0" ref="ns:author"/>
>     </xs:sequence>
>    </xs:complexType>
> Here for the complex type result, only username and password elements are returned by the getParticle() method. Even if the element reference belongs to the same namespace as the complex type, it is not returned by the getParticle() method. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Commented] (XERCESJ-1540) getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type

Posted by "Mukul Gandhi (Commented) (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153435#comment-13153435 ] 

Mukul Gandhi commented on XERCESJ-1540:
---------------------------------------

First of all you seem to be tight coupling your bug report to WSDL + XSD combination, and not to XSD alone.

We can only verify bug reports relating to XSD that make use of only the XSD language in isolation (therefore, accepting any bugs for approval that reflects specific behavior of our XSD implementation that is dependent on a specific context [WSDL in this case] wouldn't be in our scope) as per rules of the XSD language while working with the Xerces product.

Therefore, while reporting a problem relating to XSD implementation of Xerces, please isolate your problem at XSD + Xerces level alone.

Having said this, I tried isolating your new WSDL + XSD source code into only the XSD + Xerces scope. Below are my findings to your current claim of a possible bug,

1) You don't make correct use of the <import> statement at XSD level (it may be right with WSDL + XSD combine, but I'm not sure of that just now; may be a WSDL system can make the association between your two schemas -- i.e one importing another, as you've currently specified, provided you specify other XSD syntaxes correctly).

You don't specify "schemaLocation" in <import>, so the parent schema cannot find schema components it is depending on from the imported schema. This would result in an XSD schema construction error, and further validation won't be possible.

2) I modified your current example to following,

<xs:schema targetNamespace="http://gov.uscourts.ao.pacts/chrono" xmlns:tns="http://gov.uscourts.ao.pacts/chrono" version="1.0" xmlns:ns2="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    
	<xs:import schemaLocation="moreinfo.xsd" namespace="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws"/>
    
	<xs:element name="getChrono" type="tns:getChrono"/>
    
	<xs:complexType name="getChrono">
            <xs:sequence>
               <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
               <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
               <xs:element ref="ns2:attempted"/>
               <xs:element minOccurs="0" ref="ns2:author"/>
           </xs:sequence>
       </xs:complexType>
   
</xs:schema>

moreinfo.xsd

<xs:schema targetNamespace="http://chrono.beans.webservices.pacts.ao.uscourts.gov/jaws" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
   
   <xs:element name="attempted" type="xs:boolean"/>
   
   <xs:element name="author" type="xs:string"/>
   
</xs:schema> 

and also modified one of the java statement in my original test case as follows (which is needed to get the desired XSD complexType component),

XSComplexTypeDefinition cmplxTypeDefinition = (XSComplexTypeDefinition)xsModel.getTypeDefinition("getChrono", "http://gov.uscourts.ao.pacts/chrono");

I again get the correct result, i.e four particles that you're reporting as two.

I therefore think, Xerces doesn't seem to have a bug as you've suspected to be there.

I would also suggest to revisit your WSDL + XSD combined design, and may be there would be an error in that part of your design.
                
> getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type
> -----------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1540
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1540
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.11.0
>         Environment: Windows 7, xercesImpl-2.11.0b.jar
>            Reporter: Deepti Garg
>             Fix For: 2.11.0
>
>         Attachments: Chrono1.wsdl, Chrono1.wsdl, WebservicesBaseComplexTypeWrapper.java
>
>
> The element references of complex types in the XSD are not returned by the method of the Xerces API, getPaticle(.
> <xs:complexType name="result">
>     <xs:sequence>
>      <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
>      <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
>      <xs:element ref="ns:name"/>
>      <xs:element minOccurs="0" ref="ns:author"/>
>     </xs:sequence>
>    </xs:complexType>
> Here for the complex type result, only username and password elements are returned by the getParticle() method. Even if the element reference belongs to the same namespace as the complex type, it is not returned by the getParticle() method. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Resolved] (XERCESJ-1540) getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type

Posted by "Mukul Gandhi (Resolved) (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mukul Gandhi resolved XERCESJ-1540.
-----------------------------------

    Resolution: Invalid

Since there was no response from the reporter of this bug report, as to acceptance or denial of the justification in the last comment, I'm therefore assuming that the reporter of this bug thinks that this bug report is incorrect and Xerces is compliant wrt to the objections raised for the respective XSModel API implementations. I'm therefore marking this bug report as invalid.

Please feel free to reopen this bug, if you think your bug report is still correct with justifications.
                
> getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type
> -----------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1540
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1540
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.11.0
>         Environment: Windows 7, xercesImpl-2.11.0b.jar
>            Reporter: Deepti Garg
>             Fix For: 2.11.0
>
>         Attachments: Chrono1.wsdl, Chrono1.wsdl, WebservicesBaseComplexTypeWrapper.java
>
>
> The element references of complex types in the XSD are not returned by the method of the Xerces API, getPaticle(.
> <xs:complexType name="result">
>     <xs:sequence>
>      <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
>      <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
>      <xs:element ref="ns:name"/>
>      <xs:element minOccurs="0" ref="ns:author"/>
>     </xs:sequence>
>    </xs:complexType>
> Here for the complex type result, only username and password elements are returned by the getParticle() method. Even if the element reference belongs to the same namespace as the complex type, it is not returned by the getParticle() method. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Commented] (XERCESJ-1540) getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type

Posted by "Michael Glavassevich (Commented) (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131816#comment-13131816 ] 

Michael Glavassevich commented on XERCESJ-1540:
-----------------------------------------------

The complexType that you pasted into the JIRA issue doesn't appear in the WSDL. Are you sure that's the right test?
                
> getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type
> -----------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1540
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1540
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.11.0
>         Environment: Windows 7, xercesImpl-2.11.0b.jar
>            Reporter: Deepti Garg
>             Fix For: 2.11.0
>
>         Attachments: Chrono1.wsdl, WebservicesBaseComplexTypeWrapper.java
>
>
> The element references of complex types in the XSD are not returned by the method of the Xerces API, getPaticle(.
> <xs:complexType name="result">
>     <xs:sequence>
>      <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
>      <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
>      <xs:element ref="ns:name"/>
>      <xs:element minOccurs="0" ref="ns:author"/>
>     </xs:sequence>
>    </xs:complexType>
> Here for the complex type result, only username and password elements are returned by the getParticle() method. Even if the element reference belongs to the same namespace as the complex type, it is not returned by the getParticle() method. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Commented] (XERCESJ-1540) getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type

Posted by "Michael Glavassevich (Commented) (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131770#comment-13131770 ] 

Michael Glavassevich commented on XERCESJ-1540:
-----------------------------------------------

Can you provide a full test case (XML Schema documents + Java code)?
                
> getParticle() method of XSComplexTypeDefinition, does not return element references in a complex type
> -----------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1540
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1540
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.11.0
>         Environment: Windows 7, xercesImpl-2.11.0b.jar
>            Reporter: Deepti Garg
>             Fix For: 2.11.0
>
>
> The element references of complex types in the XSD are not returned by the method of the Xerces API, getPaticle(.
> <xs:complexType name="result">
>     <xs:sequence>
>      <xs:element form="qualified" minOccurs="0" name="username" type="xs:string"/>
>      <xs:element form="qualified" minOccurs="0" name="password" type="xs:string"/>
>      <xs:element ref="ns:name"/>
>      <xs:element minOccurs="0" ref="ns:author"/>
>     </xs:sequence>
>    </xs:complexType>
> Here for the complex type result, only username and password elements are returned by the getParticle() method. Even if the element reference belongs to the same namespace as the complex type, it is not returned by the getParticle() method. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org