SOPERA User's Forum
 

Go Back   SOPERA User's Forum > SOPERA ASF > Development of Business Participants
You are not logged in.
Login

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17.04.2009, 12:17
SidKennedy SidKennedy is offline
Neuer Benutzer
 
Join Date: 27.03.2009
Posts: 26
Default SOPERA Validation error - importing schemas? [solved]

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  
Old 17.04.2009, 12:22
SidKennedy SidKennedy is offline
Neuer Benutzer
 
Join Date: 27.03.2009
Posts: 26
Default

well - another confusing thing: in another workspace I don't get the error
  #3  
Old 17.04.2009, 13:08
SidKennedy SidKennedy is offline
Neuer Benutzer
 
Join Date: 27.03.2009
Posts: 26
Default

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  
Old 20.04.2009, 08:19
zubairov's Avatar
zubairov zubairov is offline
SOPERA Staff
 
Join Date: 24.03.2009
Posts: 53
Default

Hello Sid,

Hm... it's hard to tell what may go wrong, may be you could post your project here?

Renat
  #5  
Old 24.04.2009, 12:50
SidKennedy SidKennedy is offline
Neuer Benutzer
 
Join Date: 27.03.2009
Posts: 26
Default

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>
I thought the import succeeded because the designer hadn't any problems to let me choose the right elements. But in the problems view I get the following to errors:

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
Why is it unresolved? What can I do?
  #6  
Old 24.04.2009, 14:44
SidKennedy SidKennedy is offline
Neuer Benutzer
 
Join Date: 27.03.2009
Posts: 26
Default

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  
Old 24.04.2009, 15:09
SidKennedy SidKennedy is offline
Neuer Benutzer
 
Join Date: 27.03.2009
Posts: 26
Default

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  
Old 24.04.2009, 15:34
SidKennedy SidKennedy is offline
Neuer Benutzer
 
Join Date: 27.03.2009
Posts: 26
Default

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  
Old 24.04.2009, 18:21
Jerry Jerry is offline
SOPERA Staff
 
Join Date: 30.03.2009
Posts: 8
Default

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  
Old 27.04.2009, 11:43
SidKennedy SidKennedy is offline
Neuer Benutzer
 
Join Date: 27.03.2009
Posts: 26
Default

ok - I didn't know that there is such a functionality. I'll try it this week and give feedback Thanks
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT +2. The time now is 00:41.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.