Forum Discussion

AlexBoiko's avatar
AlexBoiko
New Contributor
13 years ago

soapUI and CAS server

Hi there!

I have task to test web serveces (wsdl). I have added wsdl to the project in soapUI and previusly I can easy login and test them. But now we add CAS server (in order to log in to several domains with one credentials).

I have found one post: https://developer.byu.edu/wiki/display/ ... on+Service
but they didn't work (even for test example)...and this scripts give me an error

So, how can we add CAS server in soapUI? I can receive Login Ticket from CAS, but how can I receive TicketGrantingTicket (TGT) and push it to cookie?

Thank you!

Alex

1 Reply

  • AlexBoiko's avatar
    AlexBoiko
    New Contributor
    Hi!

    I have solved the issue: in oredr to receice the TGT you need to send your login details (username and passwodr) to the following link: https://your_cas_server:cas_port/cas/v1/tickets
    and set the "Post QueryString" check box.
    Add the assertion for the responge:


    import com.eviware.soapui.support.XmlHolder
    def holder = new XmlHolder(messageExchange.responseContentAsXml)
    holder.namespaces["ns"] = context.expand('${#Project#BASE_XMLNS}')
    log.info holder.getNodeValue("//html[1]/body[1]/form[1]/@action") // the path to your responce TGT
    def TGT = holder.getNodeValue("//html[1]/body[1]/form[1]/@action")[55..116] // pars the responce and write to the TGT variable your TGT
    log.info TGT