[
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: [email protected]
For additional commands, e-mail: [email protected]