To create a SOAPUI project using wsdl
I want to create a SOAPUI project using wsdl.
this is my code:
File projectFile =new File("Test/sampleURI-soapui-project");
SoapUI.setSoapUICore(new StandaloneSoapUICore(true));
WsdlProject project = new WsdlProject("sampleURI");
WsdlInterface[] wsdls = WsdlImporter.importWsdl(project, "http://192.168.18.171/sample/api/v2_soap/?wsdl");
for(int j=0;j<wsdls.length;j++){
WsdlInterface wsdl = wsdls[j];
String soapVersion = wsdl.getSoapVersion().toString();
int c = wsdl.getOperationCount();
String reqContent="";
String result="";
for(int i=0;i<c;i++){
WsdlOperation op = (WsdlOperation) wsdl.getOperationAt(i);
String opName = op.getName();
reqContent = op.createRequest(true);
WsdlRequest req = op.addNewRequest("Req_"+soapVersion+"_"+opName);
}
}
I am getting the following error:
WARN [SoapUI] Missing folder [D: \ EclipsePrograms \ kepler-workspace \ Test. \ Ext] for external libraries Exception in "main" thread java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlBeans.typeSystemForClassLoang (/ Ljava / loader ClassLoader; Ljava / lang / String;) Lorg / apache / xmlbeans / SchemaTypeSystem; at com.eviware.soapui.config.SoapuiSettingsDocumentConfig. (Unknown Source) at com.eviware.soapui.config.SoapuiSettingsDocumentConfig $ Factory.parse (Unknown Source) at com.eviware.soapui.DefaultSoapUICore.initSettings (DefaultSoapUICore.java:211) at com..Seviware.apsoui SwingSoapUICore.java:118) at com.eviware.soapui.DefaultSoapUICore.init (DefaultSoapUICore.java:142) at com.eviware.soapui.StandaloneSoapUICore. (StandaloneSoapUICore.java:37) at sampleSoap.main (sampleSoap.java:20)
What jar file am I missing to get this problem ?. Any help would be appreciated.
source to share
This method typeSystemForClassLoader
is introduced after version 2.0.0 for xbean. Please use the more efficient version (2.1.0) to solve this problem. Compare javadoc from 2 versions
<dependency>
<groupId>xmlbeans</groupId>
<artifactId>xbean</artifactId>
<version>2.1.0</version>
</dependency>
source to share