Contributions
Get Type, Min/Max Occurs from a certain field
Hi, I want to know if it's possible to get the type and min/max occurs from a certain parameter from a wsdl? For example, I have following message: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cis="urn:ws.solvedirect.com/webservices/cisco"> <soapenv:Header/> <soapenv:Body> <cis:createCall> <cis:username>?</cis:username> <cis:password>?</cis:password> <cis:CreateCallData> <cis:Calls> <cis:CustCallID>?</cis:CustCallID> <cis:Description>?</cis:Description> <!--Optional:--> <cis:SysSpecField1>?</cis:SysSpecField1> <!--Optional:--> <cis:SysSpecField2>?</cis:SysSpecField2> <!--Optional:--> <cis:SysSpecField3>?</cis:SysSpecField3> <!--Optional:--> <cis:SysSpecField4>?</cis:SysSpecField4> <cis:CustomerReasonCategory1>?</cis:CustomerReasonCategory1> <cis:CustomerReasonCategory2>?</cis:CustomerReasonCategory2> <cis:CustomerReasonCategory3>?</cis:CustomerReasonCategory3> <cis:Caller> <!--Optional:--> <cis:LastName>?</cis:LastName> <!--Optional:--> <cis:FirstName>?</cis:FirstName> <!--Optional:--> <cis:PIN>?</cis:PIN> <!--Optional:--> <cis:Sign>?</cis:Sign> <!--Optional:--> <cis:Tel>?</cis:Tel> <!--Optional:--> <cis:EMail>?</cis:EMail> <!--Optional:--> <cis:Room>?</cis:Room> <!--Optional:--> <cis:Department>?</cis:Department> </cis:Caller> <!--Optional:--> <cis:CHD> <cis:LastName>?</cis:LastName> <!--Optional:--> <cis:FirstName>?</cis:FirstName> <cis:PIN>?</cis:PIN> <cis:Sign>?</cis:Sign> <cis:Tel>?</cis:Tel> <cis:EMail>?</cis:EMail> <!--Optional:--> <cis:Room>?</cis:Room> <!--Optional:--> <cis:Department>?</cis:Department> </cis:CHD> <!--Optional:--> <cis:CCP> <!--Optional:--> <cis:LastName>?</cis:LastName> <!--Optional:--> <cis:FirstName>?</cis:FirstName> <!--Optional:--> <cis:PIN>?</cis:PIN> <!--Optional:--> <cis:Sign>?</cis:Sign> <!--Optional:--> <cis:Tel>?</cis:Tel> <!--Optional:--> <cis:EMail>?</cis:EMail> <!--Optional:--> <cis:Room>?</cis:Room> <!--Optional:--> <cis:Department>?</cis:Department> </cis:CCP> <cis:MainComp> <cis:SerNrProv>?</cis:SerNrProv> <cis:InvNr>?</cis:InvNr> <cis:Description>?</cis:Description> <!--Optional:--> <cis:Location>?</cis:Location> <!--Optional:--> <cis:Manufacturer>?</cis:Manufacturer> <!--Optional:--> <cis:Type>?</cis:Type> <!--Optional:--> <cis:Model>?</cis:Model> <!--Optional:--> <cis:Name>?</cis:Name> <!--Optional:--> <cis:Room>?</cis:Room> <!--Optional:--> <cis:OpSys>?</cis:OpSys> </cis:MainComp> </cis:Calls> <cis:Contracts> <cis:ShortName>?</cis:ShortName> </cis:Contracts> <cis:ContractElements> <cis:ShortName>?</cis:ShortName> </cis:ContractElements> <cis:CallStates> <cis:ShortName>?</cis:ShortName> </cis:CallStates> <cis:Priorities> <cis:ShortName>?</cis:ShortName> </cis:Priorities> <cis:Severities> <cis:ShortName>?</cis:ShortName> </cis:Severities> <!--Zero or more repetitions:--> <cis:Attachments> <!--Optional:--> <cis:FileName>?</cis:FileName> <!--Optional:--> <cis:DataBase64>?</cis:DataBase64> </cis:Attachments> </cis:CreateCallData> </cis:createCall> </soapenv:Body> </soapenv:Envelope> Now I want fo know which type is firstname in caller? How often does it occur? Is it possible to get this information with SOAP UI? With WsdlInterface? Best regards, Peter9 years agoPlace ReadyAPI QuestionsReadyAPI Questions681Views0likes0CommentsProblems adding SOAP UI in my grails application
Hi, I want to use SOAP UI in my grails application, but I'm not able to set the right buildconfig.groovy settings. My settings are (got it from forum): repositories { inherits true // Whether to inherit repository definitions from plugins grailsPlugins() grailsHome() mavenLocal() grailsCentral() mavenCentral() // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories //mavenRepo "http://repository.codehaus.org" //mavenRepo "http://download.java.net/maven/2/" //mavenRepo "http://repository.jboss.com/maven2/" mavenRepo "http://www.soapui.org/repository/maven2/" mavenRepo "http://repo.reficio.org/maven/" mavenRepo "http://download.java.net/maven/2/" } dependencies { // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g. // runtime 'mysql:mysql-connector-java:5.1.29' // runtime 'org.postgresql:postgresql:9.3-1101-jdbc41' test "org.grails:grails-datastore-test-support:1.0-grails-2.4" runtime 'eviware:soapui:4.5.1' runtime 'eviware:soapui-xmlbeans:4.5.1' runtime 'eviware:wsdl-xmlbeans:1.1' runtime 'eviware:wadl-xmlbeans:1.1' runtime 'eviware:soap-xmlbeans:1.2' runtime 'eviware:ext-xmlbeans:1.2' runtime 'eviware:j2ee-xmlbeans:1.3' runtime 'eviware:policy-xmlbeans:1.5' runtime 'org.apache.commons:commons-cli:1.0' } plugins { // plugins for the build system only build ":tomcat:7.0.55" // plugins for the compile step compile ":scaffolding:2.1.2" compile ':cache:1.1.7' compile ":asset-pipeline:1.9.6" // plugins needed at runtime but not for compilation runtime ":hibernate4:4.3.5.5" // or ":hibernate:3.6.10.17" runtime ":database-migration:1.4.0" runtime ":jquery:1.11.1" // Uncomment these to enable additional asset-pipeline capabilities //compile ":sass-asset-pipeline:1.9.0" //compile ":less-asset-pipeline:1.10.0" //compile ":coffee-asset-pipeline:1.8.0" //compile ":handlebars-asset-pipeline:1.3.0.3" } I get following errors on building application: |Loading Grails 2.4.3 |Configuring classpath |Downloading: eviware/soapui/4.5.1/soapui-4.5.1.pom |Downloading: eviware/soapui-xmlbeans/4.5.1/soapui-xmlbeans-4.5.1.pom |Downloading: eviware/wsdl-xmlbeans/1.1/wsdl-xmlbeans-1.1.pom |Downloading: eviware/wadl-xmlbeans/1.1/wadl-xmlbeans-1.1.pom |Downloading: eviware/soap-xmlbeans/1.2/soap-xmlbeans-1.2.pom |Downloading: eviware/ext-xmlbeans/1.2/ext-xmlbeans-1.2.pom |Downloading: eviware/policy-xmlbeans/1.5/policy-xmlbeans-1.5.pom Error | Resolve error obtaining dependencies: Failed to read artifact descriptor for eviware:soapui:jar:4.5.1 (Use --stacktrace to see the full trace) What am I missing? Best regards, PeterSolved9 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.1KViews0likes1CommentRe: How to get parameter of SOAP operation
Hi, thanks for your answers, this goes in the right direction. I write a programm where the user gives a url to a wsdl, gets the parameter he has to set und makes the request. All dynamic at runtime. I have another question. I want to make a call to a webservice and get the result. But I am not able to pass some arguments. How should I archive this? WsdlOperation op = iface.getOperationAt(1); String soapVersion = iface.getSoapVersion().toString(); String opName = op.getName(); System.out.println("OPERATION:"+opName); WsdlRequest req = op.getRequestAt(0); System.out.println("REQUEST :"+req.getName()); System.out.println("The request content is ="+req.getRequestContent()); System.out.println("The action is ="+req.getAction()); req.setEndpoint("http://www.webservicex.com/globalweather.asmx?WSDL"); String result=""; WsdlSubmitContext wsdlSubmitContext = new WsdlSubmitContext(req); wsdlSubmitContext.setProperty("CountryName", "Germany"); wsdlSubmitContext.setProperty("CityName", "Berlin"); wsdlSubmitContext.put("CountryName", "Germany"); wsdlSubmitContext.put("CityName", "Berlin"); WsdlSubmit<?> submit = (WsdlSubmit<?>) req.submit(wsdlSubmitContext, false); Response response = submit.getResponse(); result = response.getContentAsString(); System.out.println("The result ="+result); It seems the parameters are ignored. How can I add parameters to a call? Best regards13KViews1like4CommentsHow to get parameter of SOAP operation
HI, I want to read the methods of a webservice and show the user the methods and parameters in java. This is my code so far: WsdlProject project = new WsdlProject(); WsdlInterface iface = WsdlInterfaceFactory.importWsdl(project,"http://www.webservicex.com/globalweather.asmx?WSDL", true)[0]; Iterator<com.eviware.soapui.model.iface.Operation> i = iface.getOperationList().iterator(); WsdlOperation op; while (i.hasNext()) { op = (WsdlOperation) i.next(); System.out.println("Operation: " + op.getName()); } Is it possible the get the parameters for an operation? Best regards, PeterSolved13KViews0likes7Comments