Forum Discussion

4 Replies

  • vbrabant's avatar
    vbrabant
    Occasional Contributor
    In fact, you have that possibility, but not at project level, but at interface level.
    Right click at your interface level, and select "Show Interface Viewer"
    Select the Service Endpoints

    You can then associate to each endpoints url a username, password, and even Outgoing WSS and Ingoing WSS if you are using WS-Security

    Then, by just selecting the right endpoint url when you execute a request, the associated username & password will be used.


    It's really great.
  • DaveOMac's avatar
    DaveOMac
    New Contributor
    Sadly vbrabant the username, password, Outgoing WSS and Ingoing WSS won't work for this particular project as they use a proprietary Authorization header which we currently have to add to each request. Would be nice to specify it at a higher level and have it inserted into each request.


    thanks,
    Dave
  • Finan's avatar
    Finan
    Frequent Contributor
    It is possible.

    Add the properties to your projectlevel (example: name: "sample", value: "user")
    In the field that requires the sample value, add : ${#Project#sample}
    (Example: on the wsdl definition open the endpoints tab and enter the syntax for the required fields)
    This can be done for username, pass, etc.
  • DaveOMac's avatar
    DaveOMac
    New Contributor

    It is possible.

    Add the properties to your projectlevel (example: name: "sample", value: "user")
    In the field that requires the sample value, add : ${#Project#sample}
    (Example: on the wsdl definition open the endpoints tab and enter the syntax for the required fields)
    This can be done for username, pass, etc.


    Hi Finan,

    I've followed your instructions and I think I'm probably doing something wrong. This is what I did:

    - Edited the project -> Added a property with Name:'authHeader', Value:'Authorization: Basic <XXXX>' where <XXXX> is the data we need sent in the HTTP request header called 'Authorization'

    - Edited the WSDL (one level down from project) -> Gone to 'Service Endpoints' tab -> Added '${#Project#authHeader}' into the 'Username' cell for the endpoint.

    I've tried running a request after this and the Authorization header is not sent. Am I doing something wrong is is your method for something other than HTTP request headers?

    Thanks,
    Dave