1

I want to put the parameters of web service consumer in a properties file. I know how to use properties file in mule. ${myWSDLlocation} in the configuration dialogue box does not do anything. I looked into this link, but could not solve it. web service consumer flow

Any help will be appreciated. Thanks.

Community
  • 1
  • 1
matuda
  • 195
  • 2
  • 16

2 Answers2

0

Got the solution.. This is what I did:

  1. Dragged and dropped ws-consumer in flow
  2. Configured it using the UI
  3. Added properties file and defined key-value pairs in it - the usual way
  4. Then edited the <ws:consumer-config> tag using ${keyNameHere}
Mr Lister
  • 45,515
  • 15
  • 108
  • 150
matuda
  • 195
  • 2
  • 16
0

First be sure you have property placeholders defined. Below is the syntax where a config.properties file has been defined to be used and it is placed in src/main/resources directory of your project.

Now in you properties file you can define the stuffs like below

implementation.url=http://abc-cdc.com

This URL can be accessed from web service consumer application using below.

ws:consumer-config doc:name="Web Service Consumer" name="Web_Service_Consumer" connectorConfig="HTTPS_Request_Configuration" wsdlLocation="ServiceWSDL/Manager.wsdl" serviceAddress="![p['implementation.url']]" port="ManagerSOAPPort" service="ManagerService"

In above example I am using only serviceAddress from config.properties file. Please let me know how it goes.