Importing a schema into another schema: "invalid schema file"? [message #203757] |
Tue, 06 November 2007 10:29 |
Eclipse User |
|
|
|
Originally posted by: mauro.molinari.cardinis.com
Hello all!
I'm editing the inline schema of a WSDL and I tried to add an import
directive to import another schema I defined on a stand-alone XSD file.
This file is well-formed and valid (no validation errors given by
Eclipse), but in the import wizard dialog, when I try to select it from
the workspace (step named "Select XML schema file"), as soon as I click
on it an error hint is given: "filename.xsd is an invalid XML schema
file". The "Finish" button is grayed out and I cannot import it...
I'm quite new to WSDL and XSD, I'm learning now... anyone could help me
to determine the source of the problem?
The XSD I'm trying to import is the following:
<?xml version="1.0" encoding="UTF-8"?>
<schema
targetNamespace="http://webservice.cardinis.com/AccessServices/xsd"
elementFormDefault="qualified"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://webservice.cardinis.com/AccessServices/xsd">
<annotation>
<documentation>
Schema per la definizione dei tipi usati dal webservice di
autenticazione.
</documentation>
</annotation>
<element name="Login_Username" type="string">
<annotation>
<documentation>
Parametro d'ingresso relativo al nome utente nell'operazione di
login.
</documentation>
</annotation>
</element>
<element name="Login_Password" type="string">
<annotation>
<documentation>
Parametro d'ingresso relativo alla password nell'operazione di
login.
</documentation>
</annotation>
</element>
<element name="Login_Ticket" type="string">
<annotation>
<documentation>
Parametro di uscita relativo al ticket assegnato all'utente
dall'operazione di login.
</documentation>
</annotation>
</element>
</schema>
Thanks in advance.
Mauro.
|
|
|
|
Re: Importing a schema into another schema: "invalid schema file"? [message #203875 is a reply to message #203837] |
Wed, 07 November 2007 11:00 |
Eclipse User |
|
|
|
Originally posted by: mauro.molinari.cardinis.com
Keith Chong ha scritto:
> Hi, what version of WTP are you using? I used WTP 2.0.2 and 3.0
> and I can successfully import this schema from an inline schema of a
> WSDL.
>
> Can you please attach your wsdl file too?
Hi Keith,
thanks for your help.
I'm using WTP 2.0.1.
The WSDL I'm editing is the following: please note that it is
"work-in-progress", so it may contain some validation errors.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions name="AccessService"
targetNamespace="http://webservice.cardinis.com/AccessService/wsdl"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://webservice.cardinis.com/AccessService/wsdl"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tsns="http://webservice.cardinis.com/AccessService/xsd">
<wsdl:documentation>
Servizio di accesso ai servizi della <em>Suite
Cardinis</em>
</wsdl:documentation>
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://webservice.cardinis.com/AccessService/wsdl">
</xsd:schema>
</wsdl:types>
<wsdl:message name="LoginRequest">
<wsdl:documentation>
Messaggio corrispondente alla richiesta per l'operazione di login.
</wsdl:documentation>
<wsdl:part name="Username" element="tsns:Login_Username">
<wsdl:documentation>Nome utente</wsdl:documentation>
</wsdl:part>
<wsdl:part name="Password" element="tsns:Login_Password">
<wsdl:documentation>Password.</wsdl:documentation>
</wsdl:part>
</wsdl:message>
<wsdl:message name="LoginResponse">
<wsdl:documentation></wsdl:documentation>
<wsdl:part name="Ticket" element="tsns:Login_Ticket">
<wsdl:documentation>
Ticket restituito a seguito dell'operazione di login
</wsdl:documentation>
</wsdl:part>
</wsdl:message>
<wsdl:message name="LogoutRequest">
<wsdl:documentation>
Richiesta per effettuare il logout
</wsdl:documentation>
<wsdl:part name="void" type="tsns:Empty"></wsdl:part>
</wsdl:message>
<wsdl:portType name="AccessService">
<wsdl:operation name="Login">
<wsdl:documentation>
Effettua l'operazione di login nei webservice della
<em>Suite Cardinis</em>
</wsdl:documentation>
<wsdl:input message="tns:LoginRequest" name="LoginRequest">
</wsdl:input>
<wsdl:output message="tns:LoginResponse" name="LoginResponse" />
</wsdl:operation>
<wsdl:operation name="Logout">
<wsdl:input message="tns:LogoutRequest"
name="LogoutRequest"></wsdl:input>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AccessServiceSOAP" type="tns:AccessService">
<wsdl:documentation>Binding mediante SOAP.</wsdl:documentation>
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Login">
<soap:operation
soapAction="http://webservice.cardinis.com/AccessService/wsdl/Login" />
<wsdl:input name="LoginRequest">
<soap:body use="literal" />
</wsdl:input>
<wsdl:output name="LoginResponse">
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Logout">
<soap:operation
soapAction="http://webservice.cardinis.com/AccessService/wsdl/Logout" />
<wsdl:input name="LogoutRequest">
<soap:body use="literal" />
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AccessService">
<wsdl:port binding="tns:AccessServiceSOAP"
name="AccessServiceSOAP">
<soap:address location="http://www.example.org/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Mauro.
|
|
|
|
Re: Importing a schema into another schema: "invalid schema file"? [message #203987 is a reply to message #203900] |
Thu, 08 November 2007 08:28 |
Eclipse User |
|
|
|
Originally posted by: mauro.molinari.cardinis.com
David Carver ha scritto:
>
> Mauro,
>
> You need to specify the WSDL to import in the wsdl:types, something like
> the following:
> Mauro Molinari wrote:
>>
>> <wsdl:types>
>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>
>> targetNamespace="http://webservice.cardinis.com/AccessService/wsdl">
> <xsd:include schemaLocation="filexsd.xsd"/>
>> </xsd:schema>
>> </wsdl:types>
>
> Where the schemaLocation points to the file you want to include.
>
> Dave
Hi Dave,
yes, I know, but I tried to use the wizard instead of editing manually
the code and the wizard says the XSD is invalid as soon as I select it
in the dialog named "Select XML schema file" opened by clicking on "..."
beside the "location" attribute of the newly created import element
(Properties view).
I searched here for a confirmation of this IMHO strange behaviour,
before filing a new bug...
Cheers,
Mauro.
|
|
|
Powered by
FUDForum. Page generated in 0.03195 seconds