ContributionsMost RecentMost LikesSolutionsRead WSDL from jar-file Hello, is it possible to read WSDL from a jar file within SoapUI / ReadyAPI? If so, how should this be set (java / groove example would be appreciated). Thanks in advance for your answer. Regards, Raymond Wiertz The Netherlands SolvedRe: add the "Outgoing WSS" information to the request from Java I found the problem. We generate the soapui project entirely from java and add the keystore and the "Outgoing WSS configurations" from java. To be able to use this configuration when making the test steps (from the java code) I first have to save the project and then read it in again. After re-reading it is possible to add the "Outgoing WSS" to the request from the java code. Why is the keystore and the "Outgoing WSS configuration" not immediately available after adding to the project (from java)? Another point, you must of course first add the "WSA-Headers" before you can properly add the "Outgoing WSS" to your request. In the example code above I had not done this yet. Current method add WsaHeaders and OutgoingWSS to a teststep. private static void addOutgoingWSSToRequest(WsdlTestRequestStep testStep){ WsdlRequest request = testStep.getHttpRequest(); DefaultWssContainer wss = request.getOperation().getInterface().getProject().getWssContainer(); List<OutgoingWss> outgoingWssList = wss.getOutgoingWssList(); OutgoingWss outgoing = outgoingWssList.get(0); AddWsaHeadersToRequestAction addWsaHeadersToRequestAction = new AddWsaHeadersToRequestAction(request); addWsaHeadersToRequestAction.actionPerformed(null); ApplyOutgoingWSSToRequestAction outgoingWSSToRequestAction = new ApplyOutgoingWSSToRequestAction(request, outgoing); outgoingWSSToRequestAction.actionPerformed(null); } Thank you for picking up the issue, but the problem is currently fixed. Kind regards Raymond Wiertz The Netherlands add the "Outgoing WSS" information to the request from Java Hello, Who can help me (maybe someone from SmarbearOlga_T To add the "Outgoing WSS" to the request I use the followingJava Code below, this is the same code that is used in the GUI to add the "Outgoing WSS" to the request. The GUI use the java class "XmlSourceEditorViewFactory.java" WsdlRequest request = ((WsdlTestRequestStep) testStep).getHttpRequest(); DefaultWssContainer wss = request.getOperation().getInterface().getProject().getWssContainer(); List<OutgoingWss> outgoingWssList = wss.getOutgoingWssList(); OutgoingWss outgoing = outgoingWssList.get(1); ApplyOutgoingWSSToRequestAction outgoingWSSToRequestAction = new ApplyOutgoingWSSToRequestAction(request, outgoing); outgoingWSSToRequestAction.actionPerformed(null); However, when I use this code, the entire "Outgoing WSS" is not added completely while the GUI does it well. Who can help me with this so that the complete "Outgoing WSS" is added to the request. I need this so that I can then adjust the request to test the Server Side Security. request renerated by the code above: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v02="http://bkwi.nl/SuwiML/Diensten/BRPDossierPersoonVraag/v0200"> <soapenv:Header> <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/> </soapenv:Header> <soapenv:Body> <.............> </soapenv:Body> </soapenv:Envelope> Code generated by the GUI: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v02="http://bkwi.nl/SuwiML/Diensten/BRPDossierPersoonVraag/v0200"> <soapenv:Header wsu:Id="id-2EF4DD84152C46856D156804444351038" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="X509-2EF4DD84152C46856D156804444350935">MIIEIDCCAwgCAQMwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCTkwxEDAOBgNVBAgTB1V0cmVjaHQxEzARBgNVBAoTClNlbGZTaWduZWQxFDASBgNVBAsTC0RvY2tlckltYWdlMQswCQYDVQQDEwJDQTAeFw0xOTA1MDkxNDQ2MDFaFw0yMDA1MDgxNDQ2MDFaMFUxDj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aWR35ewj31b7D+A7Ytt2WCxIHyNBhUwHqSUs+4y8ZEAv9xTWNSeGUVTj3h1PfNglDYDdMniWO7QKHKV1eyXTdP2eIHbTUZJzIctFI9YyDZ7+7IyjK4cp7QYQiUMSSydcTyLM54WPzh/3FDkzqAgw==</wsse:BinarySecurityToken> <ds:Signature Id="SIG-2EF4DD84152C46856D156804444351240" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> <ds:Reference URI="#id-2EF4DD84152C46856D156804444351038"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> <InclusiveNamespaces PrefixList="v02" xmlns="http://www.w3.org/2001/10/xml-exc-c14n#"/> </ds:Transform> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> <ds:DigestValue>956wykD/ikVCoYBcLOFxytretvcKX4xOxMqrdj50OgE=</ds:DigestValue> </ds:Reference> <ds:Reference URI="#id-2EF4DD84152C46856D156804444351039"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> <InclusiveNamespaces PrefixList="v02" xmlns="http://www.w3.org/2001/10/xml-exc-c14n#"/> </ds:Transform> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> <ds:DigestValue>6M1IMxBgRwMBVXECe8+9URFG3BgM644tZnp3Ror9tpA=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue>sCANEIB/nmh8CvYSLU1RqsyHlHSnruS+TYD6x0X0+TqzHvSycWEkxzX/Aim9c7Ld7Yo1R74sv7nXw091b/KQwO+8P+QL64wzIWj7JlxktIFlTJ3CndKKqKFvmOMJ5yBrB48KSrs+f4R+/55OjuHiwuG6sKUFdQmksPj7HEdXrzflX3tD7cRMEWG9oYOpIw6aiVujIcFKWzMRX9e81J4DNntCjxyqGyhoDFPr/bxryzcDA6c9cvLv0YKl5n9W/C0xmEAq4AJRVZ4oJiop1beIq1zGhvCBp7j5v3YQ3O6VG7Ustw2aIjKC2cS3UazpiONN41Y1CXduOVqhoF1nwHO64pzwpbPGmC/it5g5Yr8OOJc/vcNT13ZjpaUU2RhxHLkVDi3k9jO3xxtV/bZKUyEJCmFJ2LwxVW8ntSpfQz9Z5D6sb41TIuCIdKqTUwt4g/5N1YegypOOM4ZxmYVpSbX2LADtNQKj+C5I6odtxuddBoU5dhOL4cKerLD+xctiB1Zh/Ksi/5RzZvHMDPyglOjrKifLXgZ+e1nzSJCY3tR5oBKMgHfsk3VGh/Ev/W2akCsPEVfIGir0zEyaIj0tVm+Me2SDnfDyLDEftccWf6X/FQq9ZB8rxi0FqVdSB7o2GGyQ2oYryeOatliLyI4VnthYV2h22NGhkfgng+tU1NYn2gM=</ds:SignatureValue> <ds:KeyInfo Id="KI-2EF4DD84152C46856D156804444350936"> <wsse:SecurityTokenReference wsu:Id="STR-2EF4DD84152C46856D156804444350937"> <wsse:Reference URI="#X509-2EF4DD84152C46856D156804444350935" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/> </wsse:SecurityTokenReference> </ds:KeyInfo> </ds:Signature> <wsu:Timestamp wsu:Id="TS-2EF4DD84152C46856D156804444349434"> <wsu:Created>2019-09-09T15:54:03.494Z</wsu:Created> <wsu:Expires>2019-09-09T17:00:43.494Z</wsu:Expires> </wsu:Timestamp> </wsse:Security> </soapenv:Header> <soapenv:Body wsu:Id="id-2EF4DD84152C46856D156804444351039" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <.........> </soapenv:Body> </soapenv:Envelope> SolvedRe: How to add WS-A Headers to teststep from java code Olga_T My questions are probably too difficult for the community. We are in the process of automatically generating all our tests from Java. We are confronted with a few technical challenges in which we think we can use support from Smartbear. In the past Ole Matzura used to post the technical solutions, is he still working at Smartbear. For the question that I asked in this post, I have found the solution by scouring the open source code of SoapUI. I use the following code: WsdlRequest request = ((WsdlTestRequestStep) testStep).getHttpRequest(); AddWsaHeadersToRequestAction wsaToRequest = new AddWsaHeadersToRequestAction(request); wsaToRequest.actionPerformed(null); Re: Unable to set the values of a Signature (WS-Security) I found out howto do it. I use the following code herefore. DefaultWssContainer wssContainer = wsdlOperation.getProject().getWssContainer(); OutgoingWss outgoingWss = wssContainer.addOutgoingWss("Happy-flow"); outgoingWss.setMustUnderstand(true); OutgoingWssConfig outgoingWssConfig = outgoingWss.getConfig(); WSSEntryConfig wssEntryConfig = outgoingWssConfig.addNewEntry(); wssEntryConfig.setType("Signature"); wssEntryConfig.addNewConfiguration(); //https://github.com/oysteing/soapui/tree/master/src/java/com/eviware/soapui/impl/wsdl/support/wss/entries //https://github.com/oysteing/soapui/blob/master/src/java/com/eviware/soapui/impl/wsdl/support/wss/entries/AddSignatureEntry.java XmlObjectConfigurationBuilder builder = new XmlObjectConfigurationBuilder(); builder.add( "crypto", "alice.p12" ); builder.add( "keyIdentifierType", 0 ); builder.add( "signatureAlgorithm", XMLSignature.ALGO_ID_MAC_HMAC_SHA384 ); builder.add( "signatureCanonicalization", WSConstants.C14N_OMIT_COMMENTS ); builder.add( "useSingleCert", false ); /* ADDED: digest algorithm to use */ builder.add( "digestAlgorithm", MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA256 ); wssEntryConfig.getConfiguration().set(builder.finish()); Only now i need to know howto add parts to. Unable to set the values of a Signature (WS-Security) I am looking how i can change the values of "Signature" I use the follow code to create an outgoing WSS and add a entry "Signature" But i can't fill in the values that belongs to "Signature" DefaultWssContainer wssContainer = wsdlOperation.getProject().getWssContainer(); OutgoingWss outgoingWss = wssContainer.addOutgoingWss("Happy-flow"); outgoingWss.setMustUnderstand(true); OutgoingWssConfig outgoingWssConfig = outgoingWss.getConfig(); WSSEntryConfig wssEntryConfig = outgoingWssConfig.addNewEntry(); wssEntryConfig.setType("Signature"); Can anybody help me please, somebody from SmartbearOlga_T Regards Raymond SolvedRe: Adding a keystore/groovy script to single request through Java Hellocasp8 First you need to add a keystore to your project, you can do this with the following code: DefaultWssContainer wssContainer = wsdlOperation.getProject().getWssContainer(); wssContainer.addCrypto([KEYSTORE_PATH] + [certificateName],[password], CryptoType.KEYSTORE); With this way you can add multiple certificates to your keystore. After this you can select for every teststep a different keystore. I use the following code therefore: public static void addCertificateToTeststep(WsdlTestRequestStep testStep, String certificateName){ testStep.getTestRequest().setSslKeystore(certificateName); } regards, CrazyFrog :) How to add WS-A Headers to teststep from java code Hello, In SoapUI you can add WS-A headers by clicking with your right mouse on the request (xml-screen). How can I do this from Java code? SolvedReadyApi Maven Project fault running code WsdlProjectPro project = new WsdlProjectPro(); Hello, i try to open a SoapUI project in java with maven dependencys, when i do this and run the code i get the follow error: Exception in thread "main" java.lang.NoClassDefFoundError: javafx/scene/control/DialogPane at com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem.<init>(AbstractWsdlModelItem.java:61) I need the pro version because i want to work with a composit project. Please can you help me to fix this problem, i have the pom and java files added to this post note: I use Java 11. When i switch to Java jdk1.8.0_191 then i got the error message : Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.collect.Sets.newConcurrentHashSet()Ljava/util/Set; Kind regards, Raymond Wiertz The Netherlands Solved<BUG> ReadyAPI 2.4 freeze when save response I use ReadyAPI 2.4.0 on a Mac. Steps to reproduce - save a response to a specified folder (right mouse on the response and select save) - rename the folder where the response is saved (use the finder/explorer) - do another request and then try to save this response to another folder ReadyAPI will now Freeze. Kind Regards, R. Wiertz The Netherlands