Question

Reader needs access to web service connection

  • 3 November 2015
  • 6 replies
  • 1 view

Badge
Hi,

 

 

I have added my web service to FME:

 

FME Workbench -> Tools -> FME Options -> Web Service Connections -> Web Services...

 

I have also declared two parameters for the web services (username+password)

 

 

Furthermore, my reader uses the GUI type NAMED_CONNECTION [1], so users can set their username and password for my web service. My question is: How can my reader access these values/parameters?

 

 

During the open method, my reader parses the mapping file, but it only includes the chosen "Connection Name" and not the password or username.

 

 

The values/parameters are stored in FME, I verified that using again:

 

FME Workbench -> Tools -> FME Options -> Web Service Connections

 

 

I thought, maybe FME provides some kind of service returning the values/parameters identified by the connection name and web service. Does such a service exist? Or is there another way to access the values/parameters from a given connection name?

 

 

My reader is written in C++

 

 

Thank you very much!

 

ben

 

 

[1] http://docs.safe.com/fme/html/FME_GuiType/doc_page...

 


6 replies

Badge +9
Are your username/password parameters already set as published parameters?

 

I think that is the method to get user interaction on parameters.
Badge
I do not think so. How can I set them as published parameter?

 

 

Thanks!

 

Badge
I do not think so. How can I set them as published parameter?

 

 

Thanks!

 

See:

https://knowledge.safe.com/articles/1287/published-parameter-examples.html for examples

Badge
@jonathan_hrw

 

Thanks for answering. For my reader it would be much better if I can publish the parameters only using the reader`s metafile (without further transformers etc). Is this also possible?

 

Userlevel 2
Badge +17
Hi,

 

 

Probably this is the answer.

 

"- If your format has specialized connection parameters, then they should be grouped in a NAMEDGROUP called FME_CONNECTION_GROUP. If the format is used in a context where only connection information is needed (ex. SQLExecutor, Joiner) then only parameters in that group will be shown." -- Metafile Documentation

 

 

Takashi
Badge
Hi,

 

 

Probably this is the answer.

 

"- If your format has specialized connection parameters, then they should be grouped in a NAMEDGROUP called FME_CONNECTION_GROUP. If the format is used in a context where only connection information is needed (ex. SQLExecutor, Joiner) then only parameters in that group will be shown." -- Metafile Documentation

 

 

Takashi

Thanks for sharing this. But I already grouped the parameters and called them FME_CONNECTION_GROUP. Unfortunately, I can see no difference. Using my reader, I can parse the NAMED_CONNECTION field but I only receive the connection name, not the corresponding username+password. Also none other keyword allows me to parse username+password, at least I do not know which one I must use.

Reply