Forum Discussion

kamahade's avatar
kamahade
Regular Contributor
15 years ago

BUG: groovy.lang.MissingMethodException

Version : soapUI Pro 3.6.2-SNAPSHOT
OS : Windows XP
Error message : groovy.lang.MissingMethodException error.

Reproduce steps:

1) Run this code sample :

import com.eviware.soapui.impl.wsdl.teststeps.*
import com.eviware.soapui.support.types.StringToStringMap ;

def tc = testRunner.testCase.testSuite.getTestCaseByName("ReAEn_TC.042 MediaAssetService createMediaAsset TestCase")
def ts = tc.getTestStepByName("ReAEn_TC.042 MediaAssetService createMediaAsset TestStep1")
def ts2 =tc.getTestStepByName("r1")

def headers = new StringToStringMap()
headers.putIfMissing("Authorization","Basic VEVTVF9JJkFfU3VwZXJVc2VyOmZhYnJpYzEwMQ==")

log.info ts2.getHttpRequest().getRequestHeaders()

ts2.getHttpRequest().setRequestHeaders(headers)

log.info ts2.getHttpRequest().getRequestHeaders()


Other information : same code running fine in 3.5.1 Version.

I found that it is implemented in HttpTestRequestStep class but NOT in REST and WSDL testrequeststep classes.

3 Replies

  • Hi!

    thanks for this; the problem is that the signature for this method changed in 3.6; I've added a "proxy-method" for the old signature (taking a StringToStringMap) that should make this work better. Coming in the next nightly build!

    regards,

    /Ole
    eviware.com
  • kamahade's avatar
    kamahade
    Regular Contributor
    Please could you let me know that changed method signature,so that I can use right method directly?
  • Hi!

    sure.. the new method takes a StringToStringsMap instead, since you can now set multiple values for the same header.

    regards!

    /Ole
    eviware.com