Script Library - StringBuffer not reconised
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008
03:53 AM
05-21-2008
03:53 AM
Script Library - StringBuffer not reconised
Hi,
I'm having some issues with using a StringBuffer in my script library, when call the following in a method (soapUIXmlUtils is custom jar package we have developed),
SoapUIXmlUtils soapUIXmlUtils = new SoapUIXmlUtils(getCurrentResponse(messageExchange))
soapUIXmlUtils.excelDocumentAndSheetNames(filePath, datasheet)
def errors = new StringBuffer()
succeed = soapUIXmlUtils.validateResponseAgainstFile(parentNode, errors, rangeStart, rangeEnd)
I get this exception -
Wed May 21 11:51:21 BST 2008:INFO:groovy.lang.MissingMethodException: No signature of method: com.tmcn.xmlutilities.SoapUIXmlUtils.validateResponseAgainstFile() is applicable for argument types: (java.lang.String, java.lang.StringBuffer, java.lang.String, java.lang.String) values: {"//ref:ReferenceDataResponse/ref:DataItem", , "1", "2"}
I can call the exact same code from a script assertion and groovy step and I do not get the exception.
Anyone got any ideas? This one has me completely scratching my head 😞
Cheers
Cormac
I'm having some issues with using a StringBuffer in my script library, when call the following in a method (soapUIXmlUtils is custom jar package we have developed),
SoapUIXmlUtils soapUIXmlUtils = new SoapUIXmlUtils(getCurrentResponse(messageExchange))
soapUIXmlUtils.excelDocumentAndSheetNames(filePath, datasheet)
def errors = new StringBuffer()
succeed = soapUIXmlUtils.validateResponseAgainstFile(parentNode, errors, rangeStart, rangeEnd)
I get this exception -
Wed May 21 11:51:21 BST 2008:INFO:groovy.lang.MissingMethodException: No signature of method: com.tmcn.xmlutilities.SoapUIXmlUtils.validateResponseAgainstFile() is applicable for argument types: (java.lang.String, java.lang.StringBuffer, java.lang.String, java.lang.String) values: {"//ref:ReferenceDataResponse/ref:DataItem", , "1", "2"}
I can call the exact same code from a script assertion and groovy step and I do not get the exception.
Anyone got any ideas? This one has me completely scratching my head 😞
Cheers
Cormac
5 REPLIES 5
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008
05:22 AM
05-21-2008
05:22 AM
Hi Cormac,
strange indeed. Can you show the declaration/signature of the validateResponseAgainstFile method? Have you tried
soapUIXmlUtils.validateResponseAgainstFile(parentNode, errors.toString(), rangeStart.t, rangeEnd)
?
regards!
/Ole
eviware.com
strange indeed. Can you show the declaration/signature of the validateResponseAgainstFile method? Have you tried
soapUIXmlUtils.validateResponseAgainstFile(parentNode, errors.toString(), rangeStart.t, rangeEnd)
?
regards!
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008
05:39 AM
05-21-2008
05:39 AM
Hi Ole,
Here is the method declaration,
public def validateChildren(MessageExchange messageExchange, def currentTestName, def filePath, String datasheet, def parentNode, def rangeStart, def rangeEnd)
it returns a boolean.
I tried using errors.toString() and even declaring a new string buffer as part of the validateResponseAgainstFile method. None of them worked.
cheers
Cormac
Here is the method declaration,
public def validateChildren(MessageExchange messageExchange, def currentTestName, def filePath, String datasheet, def parentNode, def rangeStart, def rangeEnd)
it returns a boolean.
I tried using errors.toString() and even declaring a new string buffer as part of the validateResponseAgainstFile method. None of them worked.
cheers
Cormac
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008
05:44 AM
05-21-2008
05:44 AM
Hi Cormac,
that seems to be the definition for validateChildren, not validateResponseAgainstFile!?
regards!
/Ole
eviware.com
that seems to be the definition for validateChildren, not validateResponseAgainstFile!?
regards!
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008
05:53 AM
05-21-2008
05:53 AM
Oops, sorry here is the right one.
public boolean validateResponseAgainstFile(String xpath,
StringBuffer errors, int fileStartRow, int fileEndRow)
throws Exception {
Cormac
public boolean validateResponseAgainstFile(String xpath,
StringBuffer errors, int fileStartRow, int fileEndRow)
throws Exception {
Cormac
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008
06:17 AM
05-21-2008
06:17 AM
Hi Cormac,
it seems to me that the fileStartRow and fileEndRow are passed as strings instead of ints, how are you creating these? Maybe you could cast them to int with
soapUIXmlUtils.validateResponseAgainstFile(parentNode, errors,
Integer.parseInt(rangeStart), Integer.parseInt(rangeEnd))
?
regards,
/Ole
eviware.com
it seems to me that the fileStartRow and fileEndRow are passed as strings instead of ints, how are you creating these? Maybe you could cast them to int with
soapUIXmlUtils.validateResponseAgainstFile(parentNode, errors,
Integer.parseInt(rangeStart), Integer.parseInt(rangeEnd))
?
regards,
/Ole
eviware.com
