header
header
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome, Guest. Please login or register.
January 09, 2009, 08:15:31 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
soapui doesn't like object redefinitions?
Welcome, Guest. Please login or register.
January 09, 2009, 08:15:31 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  soapui doesn't like object redefinitions?
« previous next »
Pages: [1] Print
Author Topic: soapui doesn't like object redefinitions?  (Read 422 times)
Jon
Newbie
*
Posts: 20


« on: July 25, 2008, 07:50:49 pm »

Trying to optimize a wsdl file (generated for me by soapcpp2) by subclassing a return object.  Works fine in gsoap, but soapui complains when I try to import the wsdl.  Here's the relevant snips from the wsdl:

  <complexType name="ReturnStatus">
   <sequence>
     <element name="success" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
     <element name="locked" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
     <element name="infoStrings" type="NetManager:ArrayOfstring" minOccurs="1" maxOccurs="1" nillable="false"/>
     <element name="returnObject" type="xsd:string" minOccurs="1" maxOccurs="1"/>
   </sequence>
  </complexType>


  <complexType name="HealthCheckReturnStatus">
   <complexContent>
    <extension base="NetManager:ReturnStatus">
     <sequence>
     <element name="returnObject" type="NetManager:healthcheckreturnobject" minOccurs="1" maxOccurs="1"/>
     </sequence>
    </extension>
   </complexContent>
  </complexType>

And from the error log:

Fri Jul 25 14:43:12 EDT 2008:ERROR:An error occured [http://192.168.2.39/NetManagerServicesBinding.wsdl:0: error: cos-element-consistent: Type of 'returnObject' is inconsistent with another element with the same name in this content model.], see error log for details
Fri Jul 25 14:43:12 EDT 2008:WARN:Error: http://192.168.2.39/NetManagerServicesBinding.wsdl:0: error: cos-element-consistent: Type of 'returnObject' is inconsistent with another element with the same name in this content model.
Fri Jul 25 14:43:12 EDT 2008:ERROR:An error occured [com.eviware.soapui.impl.wsdl.support.xsd.SchemaException], see error log for details
Fri Jul 25 14:43:12 EDT 2008:ERROR:Loading of definition failed for [http://192.168.2.39/NetManagerServicesBinding.wsdl]; com.eviware.soapui.impl.wsdl.support.xsd.SchemaException: Error loading schema types
Fri Jul 25 14:43:12 EDT 2008:ERROR:An error occured [Error loading schema types], see error log for details
Fri Jul 25 14:43:12 EDT 2008:ERROR:Error loading schema types from http://192.168.2.39/NetManagerServicesBinding.wsdl, see log for details

Its complaining about the redefinition of returnObject.

Using soapui pro 2.0.2 (due to problems with 2.0.3).

Cheers!
Jon
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,666


« Reply #1 on: July 25, 2008, 10:31:35 pm »

Hi Jon,

I'm not sure if this kind of redefinition of returnElement is valid, can you show the definition of the NetManager:healthcheckreturnobject type?

regards,

/Ole
eviware.com
Logged
Jon
Newbie
*
Posts: 20


« Reply #2 on: July 28, 2008, 07:26:11 pm »

Hey Ole,

Here it is:

Code:
class ins1__HealthCheck
{ public:
    std::string                HostIP;
    enum ns1__BWIStatus         BWIStatus;
    enum ns1__HealthStatus      HealthStatus;
};

class HealthCheckArray
{ public:
    ns1__HealthCheck           *__ptritem;
    int                        __size;
};

// A normal return status .. returns a string.
class ns1__StringReturnStatus
{ public:
    bool                        success;
    bool                        locked;
    ns1__stringArray            infoStrings;
    std::string                 returnObject;
};

// A more complex return status .. overrides returnObject to return a structure.
class ns1__HealthCheckReturnStatus : public ns1__StringReturnStatus
{ public:
    struct _healthcheckreturnobject
    {
        enum ns1__DBStatus      OwnDBStatus;
        enum ns1__BWIStatus    OwnBWIStatus;
        HealthCheckArray        PeerHealthCheck;
    } returnObject;
};

Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,666


« Reply #3 on: July 28, 2008, 11:02:09 pm »

Thanks!

Can you show me the actual type generated in the corresponding XML Schema? Or mabye attach the entire WSDL?

regards!

/Ole
eviware.com
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
header header
header
header