Forum Discussion

christiandoorma's avatar
christiandoorma
New Contributor
8 years ago

Bug in ReadyAPI 1.9.0? : Cant set WSS in Authentication tab from Groovy script.

Hi all,

 

I am setting a WsdlProject up from scratch from within a Groovy script.

I create a project,

add Wsdl files, and create requests.

add certificates and creates incoming and outgoing Wss profiles.

For all requests, sets Basic authentication profile, and finally:

Sets incoming and ougoing wss profiles for every request.

 

The last bullet point is not doing what is should though. After doing all these above steps above, when I go to a request, press the Auth tab, only the Ougoing Wss profile is chosen, and not the incoming. It looks like the attachment photo "First Picture".

 

Here is when it gets strange.

 

Now, after I have pressed the Auth tab on the request as described above, I run the same script that iterates over all requests, and sets the incoming and outhoing Wss profile again. Now both the outgoing AND the incoming wss profile is set as I wanted it to (See "Second Picture"), but only on the request I just opened before.

 

Here is my script for setting the wss profiles:

public static void setRequestsWss(WsdlProject project) {
        for (interf in project.getInterfaceList()) {
            for (oper in interf.getOperationList()) {
                for (request in oper.getRequestList()) {
                    if (request instanceof WsdlRequest) {
                        request.setIncomingWss(project.getPropertyValue(PropertyConstants.PROPERTY_INCOMING_WSS))
                        request.setOutgoingWss(project.getPropertyValue(PropertyConstants.PROPERTY_OUTGOING_WSS))
                    }
                }
            }
        }
    }

 

In Conclusion:

It seems that the ReadyAPI is too tight coupled with the UI, and it really is against my intentions of being fully free of any UI related tasks, if I have to open every request I have in the GUI, before being able to do anything.

 

Does anyone have ideas on how to solve this? Thanks in advance.

- Christian

    • christiandoorma's avatar
      christiandoorma
      New Contributor

      Hi, and thanks for your reply.

       

      I just installed the latest maintenance build, and the behavior is exactly the same. I still need to open the Auth tab on the WsdlRequest in the UI before I can set the WSS automatic with my groovy script.