Forum Discussion
15 years ago
Another way I found out is described below.
This was needed for integrating SoapUI in a test utility (web application) for generating requests and responses based on the WSDL. This prevents the logs of the server/application to disappear from the server log file. To make it complete, I've also added a part of the WSDLMessageGenerator.
if ( wsdlgen == null ) {
// Make sure we maintain the environment
SoapUI.setSoapUICore(new ServerSoapUICore());
wsdlgen = new WSDLMessageGenerator();
}
---------
public class ServerSoapUICore extends DefaultSoapUICore {
@Override
protected void initLog() {
// We keep on using the log of the server....
log = Logger.getLogger( DefaultSoapUICore.class );
}
@Override
public Settings getSettings() {
if ( log == null ) {
initLog();
}
return super.getSettings();
}
}
---------------------
public class WSDLMessageGenerator {
private WsdlProject project;
private WsdlInterface iface;
public WSDLMessageGenerator() throws Exception {
project = new WsdlProject();
}
....
WsdlInterface[] wsdls = WsdlImporter.importWsdl(project, wsdlLocation);
iface = wsdls[0];
}
Hope it helps!
Mike.
This was needed for integrating SoapUI in a test utility (web application) for generating requests and responses based on the WSDL. This prevents the logs of the server/application to disappear from the server log file. To make it complete, I've also added a part of the WSDLMessageGenerator.
if ( wsdlgen == null ) {
// Make sure we maintain the environment
SoapUI.setSoapUICore(new ServerSoapUICore());
wsdlgen = new WSDLMessageGenerator();
}
---------
public class ServerSoapUICore extends DefaultSoapUICore {
@Override
protected void initLog() {
// We keep on using the log of the server....
log = Logger.getLogger( DefaultSoapUICore.class );
}
@Override
public Settings getSettings() {
if ( log == null ) {
initLog();
}
return super.getSettings();
}
}
---------------------
public class WSDLMessageGenerator {
private WsdlProject project;
private WsdlInterface iface;
public WSDLMessageGenerator() throws Exception {
project = new WsdlProject();
}
....
WsdlInterface[] wsdls = WsdlImporter.importWsdl(project, wsdlLocation);
iface = wsdls[0];
}
Hope it helps!
Mike.
Related Content
- 4 years ago
- 4 years ago
- 2 years ago
- 3 years ago