Forum Discussion

Jon's avatar
Jon
Contributor
16 years ago

soapui doesn't like object redefinitions?

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:

 
 
   
   
   
   
 

 



 
 
   
   
   
   

   

 

 


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

3 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    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
  • Jon's avatar
    Jon
    Contributor
    Hey Ole,

    Here it is:

    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;
    };

  • omatzura's avatar
    omatzura
    Super Contributor
    Thanks!

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

    regards!

    /Ole
    eviware.com