Forum Discussion

Vallish_Shankar's avatar
Vallish_Shankar
Occasional Contributor
17 years ago

Settings in Java API

Hi:

I am trying to set the WSDL settings using the SOAPUI Java API to populate sample requests with example data and I have the following so far. Do I need to pass the settingz object to something else to pick up the changes?

project = new WsdlProject(projectFilePath);
ifaces = project.importWsdl(wsdlFileName, true);
SettingsImpl settings = new SettingsImpl();
settings.setBoolean(WsdlSettings.XML_GENERATION_TYPE_EXAMPLE_VALUE, true);
op = (WsdlOperation) ifaces[0].getOperationByName(operationName);
String data = op.createRequest(true);

The data string has the request xml, but does not have example values in them. what else should I be doing?

Thanks in advance!

1 Reply

  • Hi Vallish,


    What you're looking for is fairly advanced and goes far beyond User Guide. You may try using SampleXmlUtil.createSample(SchemaType type) to achieve what you're after.

    Good luck!


    Cheers!
    /Nenad Nikolic a.k.a. Shonzilla