Forum Discussion

deepakadlakha's avatar
deepakadlakha
New Contributor
12 years ago

[R] How do I retrieve "Operation Properties" through SOAPUI

When i add any wsdl in SOAPUI, i see box on left hand side, which displayes me "operation Properties" and shows like soapAction, operation...etc...How do I retrieve this "Operation Properties" through SOAPUI API.

In my app, i use SOAPUI API, to generate sample call, but now i need to access these properties, Can i get these propertieis through API somehow ?..Thanks

3 Replies

  • PaulDonny's avatar
    PaulDonny
    Regular Contributor
    This was a fun one. I am presuming you have full access to your Operation, so what you need to do is as follows:

    Get the config of the operation
    operation.getConfig()


    Edit the variables as desired (I am doing sendsAttachment)

    operation.getConfig().setSendsAttachments(true);


    And from the API for OperationConfig
    void setAction(String action)
    Sets the "action" attribute
    void setAnonymous(AnonymousTypeConfig.Enum anonymous)
    Sets the "anonymous" attribute
    void setBindingOperationName(String bindingOperationName)
    Sets the "bindingOperationName" attribute
    void setCallArray(int i, WsdlRequestConfig call)
    Sets ith "call" element
    void setCallArray(WsdlRequestConfig[] callArray)
    Sets array of all "call" element
    void setInputName(String inputName)
    Sets the "inputName" attribute
    void setIsOneWay(boolean isOneWay)
    Sets the "isOneWay" attribute
    void setOutputName(String outputName)
    Sets the "outputName" attribute
    void setReceivesAttachments(boolean receivesAttachments)
    Sets the "receivesAttachments" attribute
    void setRequestParts(PartsConfig requestParts)
    Sets the "requestParts" element
    void setResponseParts(PartsConfig responseParts)
    Sets the "responseParts" element
    void setSendsAttachments(boolean sendsAttachments)
    Sets the "sendsAttachments" attribute
    void setStyle(OperationStylesConfig.Enum style)
    Sets the "style" attribute
    void setType(OperationTypesConfig.Enum type)
    Sets the "type" attribute


    And obviously they have a get portion to them as well.
  • Thank you guys. This will help. Will do more research on OperationConfig API method.