|
|
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Today I got the following error in the problems view when I create a new Sopera Project:
SOPERA Validation: XSD Validation: ['org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'definitions'.'] for any sdx-file and SOPERA Validation: XSD Validation: ['org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'wsdl:definitions'.'] for any spdx-file I'm kind of helpless how to resolve this issue. Can anybody help me? |
|
#2
|
|||
|
|||
|
well - another confusing thing: in another workspace I don't get the error
|
|
#3
|
|||
|
|||
|
Ok now the error occurs as well if I change something in the service description in the until-now-working workspace or if I validate SOPERA-projects. any ideas?
|
|
#4
|
||||
|
||||
|
Hello Sid,
Hm... it's hard to tell what may go wrong, may be you could post your project here? Renat |
|
#5
|
|||
|
|||
|
As I today continued working on the project I hadn't those validation errors described above. But I have another one. I imported an XML-schema file (hti.xsd) which is placed in a subdirectory of the service description file. I added it to the imports. Because I only need elements out of the schema as you can see in the following service description:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<definitions
targetNamespace="http://services.saxsys.de/HTInfrastructure"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:pri="http://services.saxsys.de/HTInfrastructure/types"
xmlns:sdx="http://types.sopware.org/service/ServiceDescription/2.0"
xmlns:tns="http://services.myurl.de/HTInfrastructure"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd1="http://myurl.de/schemas/hti">
<wsdl:import namespace="http://myurl.de/schemas/hti" location="schemas/hti.xsd"></wsdl:import>
<types>
<xsd:schema
targetNamespace="http://services.myurl.de/HTInfrastructure" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://myurl.de/schemas/hti">
<xsd:import namespace="http://myurl.de/schemas/hti" schemaLocation="schemas/hti.xsd"/>
</xsd:schema>
</types>
<wsdl:message name="htiRequestMsg">
<wsdl:part element="xsd1:htiRequest" name="body" />
</wsdl:message>
<wsdl:message name="htiResponseMsg">
<wsdl:part element="xsd1:htiResponse" name="body" />
</wsdl:message>
<portType name="HTInfrastructure">
<wsdl:operation name="HTIRequest">
<wsdl:input message="tns:htiRequestMsg"/>
</wsdl:operation>
<wsdl:operation name="HTIResponse">
<wsdl:output message="tns:htiResponseMsg"/>
</wsdl:operation>
</portType>
</definitions>
Code:
SOPERA Validation: The message htiRequestMsg references an unresolved element {http://myurl.de/schemas/hti}htiRequest
SOPERA Validation: The message htiResponseMsg references an unresolved element {http://myurl.de/schemas/hti}htiResponse
|
|
#6
|
|||
|
|||
|
ok I discovered that external schemas are not supported by SOPERA. a tiny little warning shows it. that's very annoying because with an SOPERA-validation-error I can't do anything (e.g. code generation). is there a workaround for that problem, maybe by specifiying the same namespace for both schemas? reluctantly I want to just copy my external schema into my service description :/
|
|
#7
|
|||
|
|||
|
I didn't find a workaround. so I really copied the schema into the sdx
![]() but now another fact: minLength-expressions aren't supported by SOPERA nor enumerations. why? and what to do? |
|
#8
|
|||
|
|||
|
I resolved the problem. As I had to copy(!) my external schema into the sdx I had to manually add an "xsd:" in front of every "string"-base because the SOPERA validator thought that the string-type came from the wsdl-namespace. well the problem is resolved but the the procedure of integrating an external schema is very annoying.
|
|
#9
|
|||
|
|||
|
Sid,
you had to copy the schema manually? Importing schemas into sdx-files is supported and works like this: Make sure that the sdx file in question is not open in any editor Right-click on the sdx file in the navigator view Select "Import ..." Select "Sopera -> XML Schema" Select the directory where your schema file(s) are located, then select the file(s) you want to import If this does not work for you, please tell us. External schema support is definitely on our roadmap. Unfortunately this not only means updating the editor, we also need to update our registry to handle this. But it is something that we will include in the new registry we're working on as part of our Eclipse projects. Best regards Jerry |
|
#10
|
|||
|
|||
|
ok - I didn't know that there is such a functionality. I'll try it this week and give feedback
Thanks
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|