|
Title: soapui doesn't like object redefinitions? Post by: Jon 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 Title: Re: soapui doesn't like object redefinitions? Post by: omatzura 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 Title: Re: soapui doesn't like object redefinitions? Post by: Jon 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; }; Title: Re: soapui doesn't like object redefinitions? Post by: omatzura 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 |