how to make MuleSoft webconsumer connector fields get dynamic values - wsdl

Invalid wsdl location.
The property key is not being read.
Steps that I've done so far
1. create dev.properties file
2. inside dev. properties file
Web Service configuration
ccms.web.location=http://[host_name]:[port]/CreateSegmentDEV/CreateSegmentServiceimpl?WSDL
I put the ${ccms.web.location} in wsdl location
Got error ${ccms.web.location} should be a valid URL or in a file classpath. Please see screenshot that I will upload.
I expected that no error but there is error, invalid wsdl location.
The property key is not being read.

Did you configure the configuration properties in the global elements and specifiy the property file (dev)?

Related

Informatica Cloud (IICS) filename using wildcard

In Data Integration module, I have created a mapping to load data from Csv file to Oracle table. I want to give a file pattern as the file name will have date in it. When I try to provide file pattern in the Source object, it is throwing the below error.
If someone can assist on letting me know how to load file with a file pattern, it will be very helpful.
Please let me know if you need any further details.
Try using a File Listener as the source for this mapping. In File Listener settings you can provide the pattern - and in turn, File Listener will trigger the mapping with the file found.

Get config value from file, or environment variable if file doesn't exist

I'm trying to get a setting from a configuration file (preferably something simple like .ini or JSON, not XML). If the file or setting does not exist, I want to be able to fall back to retrieving an environment variable.
I'd prefer to use an existing library for working with JSON/INI and not parsing the file myself. However, most libraries I've found won't work if a file doesn't exist.
How would I access a configuration value from a file that may or may not exist in F#?
You can use File.Exists to test whether or not the file exists:
open System.IO
let getConfig file =
if File.Exists file
then "config from file"
else "config from somewhere else"
OpenExeConfiguration (despite it's name) can open an arbitrary config file.
There's also the ASP.NET vNext Configuration stuff, outlined in this article which is quite flexible - no idea how separable (or relevant to your actual use case) it is [aside from the fact that you could conditionally include the config file into the config manager depending on whether it exists a la Mark's answer].
In addition to type providers, FSharp.Data provides some basic parsers, including JSON. This allows you to do a runtime check using File.Exists and then parse using your preferred utility.
I took the following approach in FAKE:
if File.Exists "local.json" then
let localVarProps = JsonValue.Parse(File.ReadAllText"local.json").Properties
for key, jsonValue in localVarProps do
setEnvironVar key (jsonValue.AsString())

Ejb jar for Jboss PER environment

I am trying to read the attributes from a properties file into a field in ejb-jar.xml via ANT.
I have one properties file PER environment which contains an IP address which must be written into ejb-jar.xml when ANT is building the ear.
How would I accomplish that ?
please refer https://ant.apache.org/manual/Tasks/replace.html
check this : if you have someDirectory/cofiguration.properties in which you have IP configuration as per your environments and in that property file ipAddress.key is the key and want to replace with the value of it.
ejbIPAddress will be replaced by ipAddress.key value of someDirectory/cofiguration.properties

Howto access registry in WSO2 ESB

Howto reference WSDL files from the registry when defining a new proxy service? I am using WSO2 ESB.
Q1: Can I use the localEntry element to define the WSDL in my proxy service? For example:
localEntry key="my_wsdl" src="file:/wsdl/MyServiceSOAP.wsdl"
Provided that I have previously used Management Console > Add Collection > create "wsdl", and Add Resource > MyServiceSOAP.wsdl.
I have a problem with the "src" value, both
"/wsdl/MyServiceSOAP.wsdl"
and
"wsdl/MyServiceSOAP.wsdl"
do not work. I follow the documentation but they do not show howto upload WSDLs into the registry.
Q2: What if MyServiceSOAP.wsdl imports MyService.wsdl? I need to use Add Resource for MyService.wsdl as well but do I need to do anything else to make the Proxy compile?
I think you are referring to the registry here. The Registry space in each product contains three major partitions.
Local
Configuration
Governance
The configuration registry contains product specific configuration that can be shared across multiple instances of the same product (a cluster of ESB nodes for example). So you can create the WSDL collection inside the Config registry and refer to it like..
"conf:/wsdl/MyServiceSOAP.wsdl"
By uploading the resources to Registry, you can pick them easily when creating the proxy service too.
I think you can refer to resources as "file:/wsdl/MyServiceSOAP.wsdl" only when they are inside a directory named 'wsdl' in the local file system.
BTW, about the error messages.. If you look at ESB server logs you'll see the following error when you try to update the proxy referring to a non existing file.
Caused by: java.io.FileNotFoundException: ./wsdl/MyServiceSOAP.wsdl (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at java.io.FileInputStream.<init>(FileInputStream.java:79)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
at org.apache.synapse.config.SynapseConfigUtils.getObject(SynapseConfigUtils.java:197)
... 46 more
I found a simple solution for it from a blog:
In my Scenario I had a wsdl, that imported another wsdl that imported a xsd. The actual structures were in the second wsdl.
Import line in the original wsdl:
<wsdl:import namespace="http://www.somedomain.com/interface/v1_0" location="service_interface_1_0.wsdl"/>
Import line in the second wsdl:
<xsd:import namespace="http://www.somedomain.com/data/v1_0" schemaLocation="data_types_1_0.xsd"/>
Required xml on the proxy:
<publishWSDL key="file_required_service_1_0.wsdl">
<resource location="service_interface_1_0.wsdl"
key="file_service_interface_1_0.wsdl"/>
<resource location="data_types_1_0.xsd"
key="file_data_types_1_0.xsd"/>
Where I have local entries for "file_required_service_1_0.wsdl" etc named local entries that contain the original wsdl and xsd files.

Custom Action in Deployment Project - prompt user for values, and then extract them from custom actions?

I am building a Windows Service which will be deployed on four servers. My user wants to have the service read a configuration file from a common location, and load it OnStart.
I want the installation to prompt the user for the file path and file name to the configuration file when the service is installed, and then save that data in My.Settings.
I have figured out how to set the EDITA1 and EDITA2 variables in the Deployment project's UI, so that the user will be prompted for path and file name, but I don't know how to get those values out and into the settings of the service.
Help, please.
-Jennifer
Did you try passing it to the custom action using CustomActionData Property in the Custom Action property window. syntax is /param=[EDITA1]
Context.Parameters will contain a dictionary with 1 entry key being "param" (in my example above that's the key I gave it).
I'm having a problem with passing in parameters which contain spaces. the guidelines say:
For custom actions that are installation components (ProjectInstaller
classes), the CustomActionData property takes a format of /name=value.
Multiple values must be separated by a single space: /name1=value1
/name2=value2.
If the value has a space in it, it must be surrounded by
quotes: /name="a value".
Windows Installer properties can be passed using the bracketed syntax:
/name=[PROPERTYNAME].
For Windows Installer properties such as [TARGETDIR]
that return a directory, in addition to the brackets you must include quotes
and a trailing backslash: /name="[TARGETDIR]\".
When I try the "[EDITA1]\" for the file path I need.. I get the 'FileNotFound' error for "C..\Microsoft..." while my path didn't have Microsoft

Resources