Forum Discussion

Roelof's avatar
Roelof
New Contributor
16 years ago

Integration and API

hi everyone,

i am currently in the process of integration soapui into an application. i would appreciate it if anyone can point me in the right direction. what i need help with is:
1. specifying an http connect timeout
2. specifying an http request timeout.
3. programmatically add WSS signature/encryption/username entries
4. set values for input parameters. from browsing the forum i gather that this is done using normal java string functions? that is fine, but what about only adding values for certain optional parameters?

the documentation is not clear on the re-use of an WsdlRequest object. should one create an object for each request and then dispose afterwards? or can it be re-used? if so, are those objects re-entrant?

regards,
roelof.
  • Hi Roelof,


    HTTP request timeout you could set by using a HttpMethod instance and invoking HttpClientSupport.applyHttpSettings() on this instance and Settings instance that's modified to suit your timeout. HTTP connect timeout cannot be specified currently. We might add it in future versions.

    WSS signature/encryption/username can be manipulated by manipulating WSS configuration via DefaultWssContainer instance returned by WsdlProject.getWssContainer() method.


    Input parameters can be set for REST requests using setPropertyValue() method. If you want to set values inside a SOAP request, you need to modify XML document using lower-level methods.

    I hope this helps.


    Cheers!
    /Nenad Nikolic a.k.a. Shonzilla
  • Roelof's avatar
    Roelof
    New Contributor
    hi,

    thank you for the response.

    one other minor nit-pick:
    the wss entries want to persist their configuration. is there a way to disable that? the only way
    i could come up with is to derive a sub-class from each entry i want to make use of and then
    override the saveConfig method to do nothing.

    also our use is not going to be UI, but in a back-end. i am concerned that some of the UI code may cause issues down the line....any other suggestion?

    regards
    roelof.
  • Roelof's avatar
    Roelof
    New Contributor
    hi,

    one other thing. i noticed that HttpClientSupport contains only one httpClient instance. does that mean that one would not be able to submit multiple request simultaneously using different connections? or would the apache http client allow multiple connections? would that number of connection be configurable in some way?

    roelof.
  • Hi Roelof,


    Once you retrieve an HttpClient instance using HttpClientSupport.getHttpClient() method you're in the territory of Apache HttpClient. I suggest trying out one of their examples (e.g. Threaded request execution).

    Apart from soapUI source code and user guide, Apache HttpClient source code and documentation are also available so you might want to explore them to find answers to other specific questions you may have.


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