|
From: Xose R. S. V. <xr...@op...> - 2012-06-11 14:12:32
|
I've performed the checkin in the TRUNK for the *Soap Generator *and
the*Soap Generator Packag*e to support for internal filter in creation
of closure as in service interface
Best regards
El 11/06/2012 13:35, Xose Ramon Sousa Vazquez escribió:
> Hi all. I think that I have found the error and I will try to fix it
> as soon as possible. There are some related issues, one error in the
> codification of a method and a forgetted evaluation of filtering in
> the velocity template and also a case related with primitive type
> filter not supported in the build of the closure outside the interfaces.
>
> In the interfaces build the search is performed as follows(this works
> fine as reported Marc):
>
> if ("objectName".equalsIgnoreCase(argType.getName())) {
> /*
> * This data type 'objectName' defines the
> protocol
> * neutral unique name of an object. This
> data type will
> * be replaced by the generators by an
> EntityIdentifier
> */
> String pkg = PluginConstants
>
> .getPropVal(PluginConstants.KEY_INTERNAL_MODEL_PKG);
> if (!this.map.containsKey(pkg)) {
> //
> // New package - add new pkg=prefix
> mapping
> // assignment
> //
> String prefix =
> XmlSchemaHelpers.generateXmlPrefix(
> pkg, this.map);
> this.map.put(pkg, prefix);
> }
> } else if
> ("filter".equalsIgnoreCase(argType.getName())) {
> /*
> * This data type 'filter'. This data type
> will
> * be replaced by the generator to
> */
> String pkg = PluginConstants
>
> .getPropVal(PluginConstants.KEY_INTERNAL_FILTER_PKG);
> if (!this.map.containsKey(pkg)) {
> //
> // New package - add new pkg=prefix
> mapping
> // assignment
> //
> String prefix =
> XmlSchemaHelpers.generateXmlPrefix(
> pkg, this.map);
> this.map.put(pkg, prefix);
> }
> } else if
> (XmlSchemaHelpers.isUnbounded(argType)) {
> String pkg = PluginConstants
>
> .getPropVal(PluginConstants.KEY_INTERNAL_MODEL_PRIMITIVES_PKG);
> if (!this.map.containsKey(pkg)) {
> //
> // New package - add new pkg=prefix
> mapping
> // assignment
> //
> String prefix =
> XmlSchemaHelpers.generateXmlPrefix(
> pkg, this.map);
> this.map.put(pkg, prefix);
> }
> } else {
> // XSD default namespace is enough
> }
>
> and in the build of the closure we have got (this fails as reported
> Craig):
>
> if ("objectName".equalsIgnoreCase(type.getName())){
> PluginLog.logDebug("type \'" + type
> + "\' is an array of primitive.");
> addReferencedPackage(PluginConstants
>
> .getPropVal(PluginConstants.KEY_INTERNAL_MODEL_PKG));
> }else if (XmlSchemaHelpers.isUnbounded(type)){
> //will map to array of primitive
> addReferencedPackage(PluginConstants
>
> .getPropVal(PluginConstants.KEY_INTERNAL_MODEL_PRIMITIVES_PKG));
> } else {
> //normal primtive like xsd:int
> }
>
> so the filtering never is considered.
>
> I will perform clean tests because was very difficult to find the real
> cause of the problem, the log file is not very clear in debug
> scenarios ( a lot of similar log text, no log from the templates and
> also cannot put the line number in the log file (tigerstripe issue))
> and these problems have delayed my response.
> If the test go ok I will check out the changes to the trunk
>
> https://openoss.svn.sourceforge.net/svnroot/openoss/tip/framework/TIP_Soap_Generator/trunk/TIP_Soap_Generator
>
> Best regards
>
>
> El 01/06/2012 16:58, Craig Gallen escribió:
>> Hi,
>>
>> I agree it is defined in internal_filter.xsd but it doesn't seem to be
>> referenced properly from dep_cbe_perf_spec.xsd in the PM project. WSDL2Java
>> throws an error and when you open dep_cbe_perf_spec.xsd in eclipse it also
>> shows an error.
>>
>> I think Xose is looking into it
>>
>> Craig
>>
>> -----Original Message-----
>> From: Flauw, Marc [mailto:Mar...@hp...]
>> Sent: 01 June 2012 10:25
>> To: Craig Gallen (opennms); openoss-devel; Xose Ramon Sousa Vazquez; pierre
>> gauthier
>> Subject: RE: Problems with PM XSD generation
>>
>> Craig,
>>
>> There is one same filter in the getReosurceAlarms operation, filter
>> argument.
>> The XPathFilter is defined in the internal_filter.xsd
>>
>> Best regards
>>
>> Marc
>>
>> -----Original Message-----
>> From: Craig Gallen [mailto:gal...@go...] On Behalf Of Craig
>> Gallen (opennms)
>> Sent: Thursday, May 31, 2012 11:58 PM
>> To: openoss-devel; Flauw, Marc; Xose Ramon Sousa Vazquez; pierre gauthier
>> Subject: Problems with PM XSD generation
>>
>> Hi,
>>
>> I have been testing the TIP_PM_Col project model and have found that the
>> dep_cbe_perf_spec.xsd (attached) file is generated with errors
>>
>> in line 62 we have
>> <xsd:element name="objectInstanceFilter" type="filter:XPathQueryFilter"
>> minOccurs="0" maxOccurs="1">
>>
>> filter:XPathQueryFilter is not defined and if you open the file in eclipse
>> it reports this error as:
>>
>> 's4s-att-invalid-value: Invalid attribute value for 'type' in element
>> 'element'. Recorded reason:
>> UndeclaredPrefix: Cannot resolve 'filter:XPathQueryFilter' as a QName:
>> the prefix 'filter' is not
>> declared'.
>>
>> Is this a known problem or a new bug?
>>
>> Craig
>>
>
>
> --
>
> *Xose Ramon Sousa Vazquez* | Director OSS Technologies, Director I+D
> T/ + 34 986 410 091 (ext) 206 | M/ +34 675 550 029
> www.optaresolutions.com
> <http://www.optaresolutions.com>
> Optare Solutions
> <http://optarecoolvendor.com><http://optarecoolvendor.com>
>
--
*Xose Ramon Sousa Vazquez* | Director OSS Technologies, Director I+D
T/ + 34 986 410 091 (ext) 206 | M/ +34 675 550 029
www.optaresolutions.com
<http://www.optaresolutions.com>
Optare Solutions <http://optarecoolvendor.com><http://optarecoolvendor.com>
|