Bindul,

schemaLocation attribute is not required, as both the schemas are defined in
a single WSDL file.


Bindul Bhowmik wrote:
> 
> Hello,
> 
> On Thu, Mar 15, 2012 at 01:18, rJassal <jassal.ravinder...@gmail.com>
> wrote:
>>
>>
>> Hi,
>>
>> I am using the below schema in one of my WSDL, I didn't find anything
>> wrong
>> in the schema but not sure why Xerces is complaining.
>>
>>        <xs:schema xmlns:ax223="http://example.com/loan";
>> attributeFormDefault="qualified" elementFormDefault="qualified"
>> targetNamespace="http://example.com/xsd";>
>>            <xs:import namespace="http://example.com/loan"/>
>>            <xs:complexType name="Input">
>>                <xs:sequence>
>>                    <xs:element minOccurs="0" name="loanDecision"
>> nillable="true" type="ax223:LoanDecision"/>
>>                    <xs:element minOccurs="0" name="loanInformation"
>> nillable="true" type="ax223:LoanInformation"/>
>>                </xs:sequence>
>>            </xs:complexType>
>>            <xs:complexType name="Output">
>>                <xs:sequence>
>>                    <xs:element minOccurs="0" name="loanDecision"
>> nillable="true" type="ax223:LoanDecision"/>
>>                    <xs:element minOccurs="0" name="loanInformation"
>> nillable="true" type="ax223:LoanInformation"/>
>>                </xs:sequence>
>>            </xs:complexType>
>>        </xs:schema>
>>
>>                <xs:schema attributeFormDefault="qualified"
>> elementFormDefault="qualified"
>> targetNamespace="http://example.com/loan";>
>>            <xs:complexType name="LoanDecision">
>>                <xs:sequence>
>>                    <xs:element minOccurs="0" name="decision"
>> nillable="true" type="xs:string"/>
>>                    <xs:element minOccurs="0" name="paymentDuration"
>> nillable="true" type="xs:int"/>
>>                    <xs:element minOccurs="0" name="rate" nillable="true"
>> type="xs:double"/>
>>                </xs:sequence>
>>            </xs:complexType>
>>            <xs:complexType name="LoanInformation">
>>                <xs:sequence>
>>                    <xs:element minOccurs="0" name="amountNeeded"
>> nillable="true" type="xs:int"/>
>>                    <xs:element minOccurs="0" name="currentIncome"
>> nillable="true" type="xs:int"/>
>>                    <xs:element minOccurs="0" name="privateInput"
>> nillable="true" type="xs:int"/>
>>                </xs:sequence>
>>            </xs:complexType>
>>        </xs:schema>
>>
>> And I am getting below message.
>>
>> src-import.3.1: The namespace attribute, 'http://example.com/loan', of an
>> <import> element information item must be identical to the
>> targetNamespace
>> attribute, 'http://example.com/xsd', of the imported document.
>>
>> What could be reason for this message and why?
> 
> Perhaps you are missing the schemaLocation attribute of the xs:import
> element (with the relative or absolute location of the second schema)
> ? Otherwise according to Schema Representation Constraint: Import
> Constraints and Semantics [1] of the Xml Schema specification, the
> error from xerces is correct.
> 
>>
>> Thanks.
>> --
> 
> Regards,
> Bindul
> 
> [1] http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#src-import
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> For additional commands, e-mail: j-users-h...@xerces.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/src-import.3.1-error-message-tp33507809p33507987.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to