logo       

[jira] Commented: (XERCESJ-1051) rcase-NameAndTypeOK.1 Error Not Reported C: msg#00048

Subject: [jira] Commented: (XERCESJ-1051) rcase-NameAndTypeOK.1 Error Not Reported Correctly
     [ 
http://issues.apache.org/jira/browse/XERCESJ-1051?page=comments#action_61667 ]
     
Arthur Ryman commented on XERCESJ-1051:
---------------------------------------

Here's the failing derived namespace: reservationDetails.xsd. No error gets 
reported.
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema";
        elementFormDefault="qualified"
        
targetNamespace="http://greath.example.com/2004/schemas/reservationDetails";
        xmlns:tns="http://greath.example.com/2004/schemas/reservationDetails";
        
xmlns:wdetails="http://greath.example.com/2004/services/reservationDetails";
        xmlns:wsdl="http://www.w3.org/2004/08/wsdl";>

        <import namespace="http://www.w3.org/2004/08/wsdl";
                schemaLocation="wsdl20.xsd" />

        <element name="confirmationNumber" type="string" />

        <element name="checkInDate" type="date" />

        <element name="checkOutDate" type="date" />

        <element name="reservationDetails">
                <complexType>
                        <sequence>
                                <element ref="tns:confirmationNumber" />
                                <element ref="tns:checkInDate" />
                                <element ref="tns:checkOutDate" />
                                <element name="roomType" type="string" />
                                <element name="smoking" type="boolean" />
                        </sequence>
                </complexType>
        </element>

        <complexType name="ReservationDetailsEndpointType">
                <complexContent>
                        <restriction base="wsdl:EndpointType">
                                <attribute name="binding" type="QName" 
use="required"
                                        
fixed="wdetails:reservationDetailsSOAPBinding" />
                        </restriction>
                </complexContent>
        </complexType>

        <complexType name="ReservationDetailsServiceType">
                <complexContent>
                        <restriction base="wsdl:ServiceType">
                                <sequence>
                                        <element name="endpoint"
                                                
type="tns:ReservationDetailsEndpointType" />
                                </sequence>
                                <attribute name="interface" type="QName" 
use="required"
                                        
fixed="wdetails:reservationDetailsInterface" />
                        </restriction>
                </complexContent>
        </complexType>

        <element name="reservationDetailsService"
                type="tns:ReservationDetailsServiceType">
                <annotation>
                        <documentation>
                                This element contains a reference to the 
Reservation
                                Details Web Service for this reservation.
                        </documentation>
                </annotation>
        </element>

</schema>

> rcase-NameAndTypeOK.1 Error Not Reported Correctly
> --------------------------------------------------
>
>          Key: XERCESJ-1051
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1051
>      Project: Xerces2-J
>         Type: Bug
>   Components: XML Schema Structures
>     Versions: 2.6.2
>  Environment: Windows XP
>     Reporter: Arthur Ryman

>
> The rcase-NameAndTypeOK.1 error is not being reported correctly for some 
> documents. I created a large schema that used <restruction> incorrectly, but 
> the error was not reported. I cut down the file to the bare minimum, and then 
> the error was reported correctly. The error occurs when you try to restrict a 
> complex type from a different namespace. In the restriction, any <element> 
> refers to the derived namespace, not the base namespace. Here is the simple 
> case where the error is reported correctly:
> Base schema: wsdl20-1.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema";
>       targetNamespace="http://www.w3.org/2004/08/wsdl";
>       xmlns:tns="http://www.w3.org/2004/08/wsdl";
>       elementFormDefault="qualified">
>       <complexType name="ServiceType">
>               <sequence>
>                       <element name="endpoint" type="tns:EndpointType" />
>               </sequence>
>       </complexType>
>       <complexType name="EndpointType">
>               <attribute name="binding" type="QName" />
>       </complexType>
> </schema>
> Derived namespace: reservationDetails-1.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema";
>       elementFormDefault="qualified"
>       
> targetNamespace="http://greath.example.com/2004/schemas/reservationDetails";
>       xmlns:tns="http://greath.example.com/2004/schemas/reservationDetails";
>       
> xmlns:wdetails="http://greath.example.com/2004/services/reservationDetails";
>       xmlns:wsdl="http://www.w3.org/2004/08/wsdl";>
>       <import namespace="http://www.w3.org/2004/08/wsdl";
>               schemaLocation="wsdl20-1.xsd" />
>       <complexType name="ReservationDetailsEndpointType">
>               <complexContent>
>                       <restriction base="wsdl:EndpointType">
>                               <attribute name="binding" type="QName" 
> use="required"
>                                       
> fixed="wdetails:reservationDetailsSOAPBinding" />
>                       </restriction>
>               </complexContent>
>       </complexType>
>       <complexType name="ReservationDetailsServiceType">
>               <complexContent>
>                       <restriction base="wsdl:ServiceType">
>                               <sequence>
>                                       <element name="endpoint"
>                                               
> type="tns:ReservationDetailsEndpointType" />
>                               </sequence>
>                       </restriction>
>               </complexContent>
>       </complexType>
>       <element name="reservationDetailsService"
>               type="tns:ReservationDetailsServiceType">
>               <annotation>
>                       <documentation>
>                               This element contains a reference to the 
> Reservation
>                               Details Web Service for this reservation.
>                       </documentation>
>               </annotation>
>       </element>
> </schema>
> There above case correctly reports the error rcase-NameAndTypeOK.1. I'll 
> append the failing test case after I create this bug.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe