Contributions
Groovy Code to attach a xml file to the request
Hi all I have a directory of xml files that I need to attach as attachments to a request and submit one at a time. following is the last thing I have tried def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) def holder2 = groovyUtils.getXmlHolder( "documentSubmissionInbound#Request" ) // Get Request body // get xml files new File("C://HieGateway_soap//data" ).eachFile{file -> if(file.name.endsWith(".xml" )){ // clear existing attachments for( a in holder2.attachments ) { holder2.removeAttachment( a ) } holder2.attachFile(file.name,true) // errors here holder2.contentType = "application/octet-stream" holder2.setPart( file ) } } I will have over 200 of these files so I really dont want to manually add each one at a time Can u give me advice on what i have wrong if and how this can be done ect Thanks in advance for your help11 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.6KViews0likes1CommentLocation of Log files
Our security group has 'locked down' c:\Program Files (& variants) across the enterprise to prevent inadvertent changes to operational software. This prevents soapUI from writing to its various log files (Access Denied). Options, to date, include over-riding their security for the smartbear directory tree, or installing soapUI in a non-conventional location. Could the location of log files be parameter driven, to support the option of placing them in another directory (Program Data, Temp ...)12 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.2KViews0likes1CommentRe: Security Tests -- UI Settings
Attached a bmp that may explain what Im trying to ask Altough we use the WS-Security to create the token . and the aut tag to send the validation Im trying to ask how to format the raw data sent in the request and response in the Security testing feature? the raw data in the request is sent as one line string in the request generated in my regular soapui testcase/teststeps the raw data in the request in the Security testing feature (viewer) in not on one line.(it pretty prints it ) the token falls so the only response I get returned in the Security testing feature is a invalid token validation the request data being sent is formatted differntly between the regular soapui testcase/teststeps and the Security testing feature regular soapui testcase/teststeps = token is one continues string Security testing feature = token is one line per tag I have pretty print turned off in global settings and test level settings @ it works in the regular soapui testcase/teststeps but fails on the Security testing feature because of formatting differnts I cannot seem to find away to format the request and response in the Security testing feature If I have missed this feature please let me know Thanks for all your help12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes0CommentsRe: Security Tests -- UI Settings
The soap header that we use requires pretty print to be turned off the security test seem to default to pretty print true (wraps) even though I have the global ui settings set to false and the project setting set to false the orginal soapui request sends just fine but the request in the secutiry test fail. because the header is wrapping <saml:Assertion ID="Assertion-uuid94df2b88-013b-1826-bb02-c652e21c25bc" IssueInstant="2012-12-13T15:25:51Z" Version="2.0" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing"> <saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://intermountainhealthcare.org/</saml:Issuer> <ds:Signature Id="uuid94df2b89-013b-1939-9f05-c652e21c25bc" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo>..................................... in orginal request is all on one line I cannot seem to find away to format what the raw data is sent like in the security message let me know if this dosnt make sense12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes0CommentsSecurity Tests -- UI Settings
HI All I cannot find away to change the Ui settings for the Security Tests by that I mean things like the following pretty print for request and responses returned wrap content for raw messages ect It seems like it ignores setting from the orginal request and response Please let me know if Im missing setting somewher ect... Thanks In Advance for your help12 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.3KViews0likes5Comments- 12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1KViews0likes0Comments
Re: Build the request using the response of another method
well, with the datasink I got the whole list of nodes are concatenated in xml format and stored in a string, trying to place the string in to the request ( is that possible ?). If not what is alternative ? can't use property transfer cause I am not sure how many nodes will be present in the response of the get method. If I am missing something in property transfer, please let me know... Thanks for the help.... SmartBear Support wrote: Hi, could you use a property-transfer? Are you replacing a single node in the target xml ? regards, /Ole SmartBear Software12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.2KViews0likes0CommentsRe: Build the request using the response of another method
Ole, Thank You for the fast reply. I have aggregated the xml in to property using Datasink as mentioned. But can you also please let me know how to add the property in to the request replacing the text that is already present. Sorry if it is dumb question. I have tried groovyUtils, xmlHolder. DomNode but was it added the value as CDATA. Thanks, Raj SmartBear Support wrote: Hi! hmm.. couldn't you transfer the entire block of items from the response to the request using a property-transfer (using XQuery to change anything on the way...) Alternatively - set up a property-datasink that you target with your datasource loop, and then insert that aggregated property value into the request (see http://soapui.org/Functional-Testing/sa ... cks-of-xml) regards! /Ole SmartBear Software12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.2KViews0likes0CommentsCode Templates
The Ctrl-Space sequence for using these appears too no longer work in soapUI Pro 4.5.1. In 4.0.0 I can enter 'grutCtrl-Space ' in a Groovy script and get the expansion. In 4.5.1 this expansion doesn't seem to work. Am I missing something?12 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.7KViews0likes3CommentsBuild the request using the response of another method
Hi, We have few methods in a service like add, append, delete. But the default created request has only one Item. so while testing the append, I would like to delete few of existing items and then append few of items. For this I would like to build the request dynamically with the items. Wanting to keep this as simple as possible, I would like to have suggestions on that. Below is the sample request for the append, have highlighted the structure which has to be dynamically added for multiple items (cListItem has cardinality 0...*). Before running the append, I run get and get the list of items for UserA to add the items to UserB. Currently I am adding by one item after another in the datasource loop, datasource is xml response of the get. But would like to add all the items at one time instead of loop, so need help with that. Any help is appreciated. <soapenv:Body> <com:appendCListItems> <FromUserID>${#TestCase#UserA}</FromUserID> <ToUserID>${#TestCase#UserB}</ToUserID> <OrderType>${#TestCase#orderType}</OrderType> <CListItem> <cListItemId>${DataSource 2#clid}</cListItemId> <status>true</status> </CListItem> </com:appendCListItems> </soapenv:Body> Thanks, Raj12 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.4KViews0likes6Comments