Updating business services in OSB JDeveloper 12c - wsdl

I have a scenario where the web service that the business service is based on has been updated. I'm looking for the correct approach to updating the business service in the OSB project to reflect the change. Can I download the WSDL and replace the contents of the existing WSDL file and XSD if necessary?

I would propose the following:
Replace the old WSDL and schemas with the new ones.
Go to your business service and select the new WSDL
Validate your project to see if the changes in the WSDL/XSD didn't break any XPaths, XQueries, namespaces,...
If everything validaties, test your changes

Related

TFSFieldMapping Access is Denied

Hi I'm am trying to follow Microsoft's guidance to download the TFSFieldMapping file in order that I can make changes (https://learn.microsoft.com/en-us/azure/devops/reference/xml/upload-or-download-the-microsoft-project-mapping-file?view=tfs-2018)
Unfortunately I keep getting the error "Access is denied" when I try to connect to my collection and project
CD C:\Program Files\Common Files\microsoft shared\Team Foundation Server\16.0>TFSFieldMapping.exe download /collection:https://dev.azure.com/(My Company) /teamproject:(My Project)/mappingfile:"C:\Users\danie\Downloads\Test1234.xml"
"Access is denied"
That documentation appears to be for TFS (on-premise). Based on the URL, it looks like you are utilizing Azure DevOps Services. It seems to be a deprecated function, probably because of the way the field templates have been overhauled for work item forms.
Agree with Matt. TFSFieldMapping is only supports TFS 2018 and previous versions. Because their process is Hosted XML Process. Starting from Azure Devops Server 2019 and azure devops service, they use the inherited process. So they doesn't support the TFSFieldMapping.
From the URL in the TFSFieldMapping command, it seems that you are using the Azure Devops Service.
To change the Project field, you can create an inherited process and let the project use it. Then you can perform custom operations (e.g. Custom field) on the inherited process.
You could custom the field in Organization Settings -> Process.
Here is a doc about the detailed steps.
You could also use Rest API to Get and Update the field.
Get Work item field:
GET https://dev.azure.com/{organization}/{project}/_apis/wit/fields?api-version=5.1
Update Work item field:
PATCH https://dev.azure.com/{organization}/{project}/_apis/wit/fields/{fieldNameOrRefName}?api-version=4.1
Note: Corresponding to the inheritance process, you need to inherit first and then customize

Change TFS email template

Can I change the email template used by this TFS 2017 feature?
There's a folder under the TFS installation that hosts the templates for the eventing services alerts. You need to modify the xsl file corresponding to your event (in this case WorkItemChangedEvent.xsl) to change the formatting.
You can find this templates under Drive:\%programfiles%\Microsoft Team Foundation Server 15.0\Application Tier\TFSJobAgent\Transforms\1033 and after you modify it, you need to restart the application pool or the website because the templates are cached when the site starts.
P.S. Be sure to backup the original template and the changed one, because in future service packs or hotfixes Microsoft can replace this template and you'll loose your changes.
More info you can find here.

Spring Cloud Data Flow + SqlServer + Tables creation

SCDF project creates tables/sequences on the fly while starting the application. but our database is in shared environment, it doesn't have any create table permission. Is it possible to create tables/indices/sequences well before that are needed for Spring Cloud Data Flow project to run ?. if you have any SQL scripts, please provide me the link ?..
The SCDF and Skipper rely on Flyway for database schema migration between the releases. It is a strict requirement, so, unfortunately, there's no way around it right now.
You could work around this situation by letting Flyway create all the required schemas automatically in either dev/staging like environments and then manually you could export the schema/data using the approved database tooling to the other environments that have restricted access.
Once when the tables/data exists, Flyway wouldn't interfere or reattempt to create the schemas when SCDF bootstraps. I hope this helps.

How to access service configuration?

I write a service using the .NET class ServiceBase. My service needs to be configured for proper operation. What is the usual way to add configuration information? I found that most services has some parameter is the registry.
e.g. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Winsock\Parameters
Is the registry the best place to add five or six values? How do I retrieve this information? I assume that the service name might change and I want to avoid hard coded registry names in the code.
What about .exe.config files? Are these preferable for .NET based services?
Just add a normal app.config (Application Configuration item) to your project - it'll be renamed to YourService.exe.config in the build process, and it's the default and preferred way of configuring a .NET application (console app or Windows Service or whatever)
What about .exe.config files? Are these preferable for .NET based services?
Yes, they are. This way your service is self hosted - it contains everything that's necessary for its operation.
But if you wanted to manipulate the registry you could use the Registry class.

ASP.NET MVC and multiple environments

How does ASP.NET MVC, if at all, deal with or provide ways to create your application using multiple environments? For example:
Development environment (local machine, probably run via the built-in web server and talking to a local database)
Testing (runs against a preloaded databse with example data, although this part could be skipped and mocks could be used)
Production database on a real server with real data
Ruby on Rails has the concept of environments and "automagically" can deduce if you're in development or production, so you can specify your connection information (connection string) in a config file and the framework dynamically pulls the appropriate one. Is there a similar way of doing things with .NET MVC? If not then how are professional developers using .NET MVC handling different environments?
The only way I can think of is to manually add an "environment" global method (or use an enum, or something like that, maybe this is a use for something like the State pattern?) and store the different connection strings in the web.config file, and then create a base class which all data access classes derive from which provides a way to obtain the connection string for the current environment; this would then have to be set to production when the time comes to put the application live.
Is there another way? Most of the .NET MVC videos and articles I've seen don't even bother with separate environments but only use a development database and don't indicate how you do it in production.
I'd say this is really a question of your company's internal processes. Since every company is a little bit different it's hard to have a "right" generic way to support dev/test/alpha/production and/or other environments.
One way: Create a setup program that supplies the correct connection string based on the environment chosen during the setup process.
Another way: System Admin edits web.config file to supply correct connection string during install.
Yet ANother Way: Connection strings are stored in the system registry.
Even Another Odd Way: You have all your connection strings for all environments in web.config, then a setting in appSettings the tells you which one to use.
Depending on the client, I've done all of these. There are more but these are the more popular.
(One client wanted to store the connecting string in the data base itself. Really.)
You can use alias for your database. You just point these aliases to different servers in the different environments. Stored in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\Connect if i remember right. Then you use the alias in the connectionstring.
In response to Jason's response:
We use Enterprise Library Environments to configure the different environment paramters and via msbuild invoke the Merge Configuration Tool that generates the different configs for each environment. The deploy process picks the right config file depending on which environment to install.
I was able to solve a similar situation following these steps:
In your Visual Studio, access Build > Configuration Manager
Click in "new"
Choose a name for your configuration, and then copy settings from an existing config. After the configuration creation, it will be available for you to target as build configuration
Create a Web.{env-name-you-chose}.config in your application folder, along with the original Web.config file.
Open your .csproj file with Visual Studio or any text editor
Search for a section that looks like the following and add the highlighted lines, with the config file name you gave previously:
Open your Visual Studio, reload projects if it's required, and now you are able to choose your configuration via CLI or manual publish using Visual Studio.
There is a Publishing Wizard (in Visual Studio) wich let's you change parts of web.config for release build automaticaly. Wich happens to be the feature you are asking about. No magic thou.
What we have done is during our automated build process (Hudson), we alter values in web.config depending on which environment the build is for. Unfortunately there isn't a magical way to do this.
For deployment, which I assume that is what the op was asking about, one creates multiple configurations and in the publish, picks a different configuration. These are called transforms and they operate on the web.config. One would have at least three publish profiles, one for dev, test and prod. One can change more than just the connection string in this way. One can turn on custom errors, turn off debugging and change values of configuration variables. I highly recommend it.
I have a similar question. I have a log table reader. I want it to read log tables in the development, test and production databases. The major difficulty lies in my user account doesn't have permission to look at test and production. It's some silly security thing. The user that I'm impersonating in the application does have permission. I'm struggling trying to tell MVC to build the test and production models using the impersonated user.

Resources