Forum Discussion

srinaths's avatar
srinaths
New Contributor
8 years ago

getting :Missing credentials error

below is the java code to fetch response,  but getting :Missing credentials error ,Could you please advise

 

Note also set ${Authoritzation} in Header

WsdlProject project = new WsdlProject("C:/Users/Desktop/soft/ssoapui-project.xml");
testSuite = project.getTestSuiteList();
caseList=testSuite.get(0).getTestCaseList();


for (TestCase testCase :caseList) {

System.out.println("TestCases........." + testCase.getName());
testCase.setPropertyValue("username","rr");


StringToObjectMap properties = new StringToObjectMap();
properties.put("Authorization","Basic QUFBQldFUzQ0TkVBQ1dwaVlYSjBiMnhrYVFBQ");
List<TestStep> testSteps = testCase.getTestStepList();



WsdlTestCaseRunner wsdlTestCaseRunner = new WsdlTestCaseRunner((WsdlTestCase) testCase, properties);
WsdlTestRunContext wsdlTestRunContext = wsdlTestCaseRunner.createContext(properties);
wsdlTestCaseRunner.run();

  • nmrao's avatar
    nmrao
    Champion Level 3

    Are you able to successfully test the request /  test case from within SoapUI ? This is important before you execute the project by other means.

      • nmrao's avatar
        nmrao
        Champion Level 3
        If that is working from soapui with out any change, then must work without any error using java too. Not sure why the credentials set explicitly in the code? Are not those part of the soapui project?