Building MDWS

Building MDWS

First, you'll need a few tools:

  • Microsoft.NET 4
  • Visual Studio 2010 (see this link [insert link] for information about using open source alternatives)
  • WiX 3.5 (required only to build the MSI for installing MDWS - you'll need to exclude the mdws-setup project from the solution if you don't install WiX. The installed can be found here: http://wix.codeplex.com/releases/view/60102)
  • WSE 3.0 (this can no longer be downloaded from Microsoft. [Insert link] for download location)
  • Git tool of your choice. The below how-to uses the command line interface
  • TestDriven.NET - free for open source project developers (that's you!)
  • Sqlite - find the correct installer for your environment: http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
  • Oracle ODAC - download 32 bit if you're on a 32 bit machine, 64 bit if you're on a 64 bit development machine: http://download.oracle.com/otn/other/ole-oo4o/ODAC112030_x64.zip (sorry about this one... there are some serious issues with the dotnet Oracle provider which necessitated the use of Oracle's libraries)
  • Visual Studio 2010 Web Deployment Project Add-In http://www.microsoft.com/en-us/download/details.aspx?id=24509

MDWS consists of two projects under two separate repositories: MDO and MDWS. MDWS is a relatively thin layer that exposes MDO as web services. MDO does all the "heavy lifting" - it knows how to talk to VistA and other data sources - and exposes data via MDOs (Medical Domain Objects - the MDO object library) on the API.

 

1. Create a directory for the files wherever you prefer on your development machine - I call mine "MDWS". 

2. Clone the MDWS and MDO repositories. Do this from the top level MDWS folder (or whatever you named the container folder in step 1). I use the git command line tool with these commands:

$ git clone --recursive https://github.com/OSEHRA/mdo.git

$ git clone https://github.com/OSEHRA/mdws.git

Your top level MDWS folder should now look like this:

And your MDO folder like:

3. MDO can be opened indepedently - it has it's own .sln file. However, this how-to will focus on opening the project as a whole since MDWS currently depends on MDO. This tutorial assumes you're using Visual Studio 2010. There are other efforts to use open source development tools [insert links] but the concepts should be the same. Navigate inside the MDWS folder and double click the mdws.sln file. 

4. Some users have reported the following error when first opening the project. It's no big deal - just right-click in Solution Explorer and choose "Reload Project" and the WiX project will be loaded in (if you installed WiX as indicated in the tools list above)

5. Before we build, we need to place the dependencies in the correct location. Unzip the libs.zip file in to "MDWS/MDO/mdo-test/resources/" directory so that your directory structure looks like:

6. Now, we can right-click the mdo-test (this will build MDO too) project in Solution Explorer and choose Build. If that completes successfully, you can build the MDWS project, then mdws-test, then the MDWS web deplpoyment project (mdws.csproj_deploy) and then finally the installer (mdws-setup). Building them one at a time in this order helps each project to find the necessary dependencies.

7. Everything works! If you want to really get crazy, you can run the mdo-test and mdws-test unit test suites:

 

 

 

Now get coding!

 

Updates:

* Some users have reported Visual Studio is unable to find the installed Oracle and/or SQLite components. I believe this is due simply to changes in released versions. You can simply right click the offending reference in Solution Explorer > References, remove and re-add. If anyone knows how to convince VS not to care about the version (more accurately - I think it's the public key in the build files causing this "issue"), I'd love to hear about it!

 

like0

Comments

Building MDWS

Lawrence Landis's picture

On Mon, Aug 20, 2012 at 1:51 PM, joelmewton <joel.mewton@va.gov> wrote:

> MDWS consists of two projects under two separate repositories. It's a
> teensy bit confusing but these instructions should help you with obtaining
> and organizing the code and building MDWS from source.
>
1. Create a directory for the files wherever you prefer on your development
> machine - I call mine "MDWS".
>
> [image: Image preview]
>
> 2. Clone the MDWS and MDO repositories. Do this from the top level MDWS
> folder (or whatever you named the container folder in step 1) or you'll
> need to move the folders up a directory. I use the git command line tool:
>
> [image: Image preview]
>
> 3.
>
> Images
>
> [image: image/png icon]1a.png<http://www.osehra.org/sites/default/files/1a.png>
>
> [image: image/png icon]2a.png<http://www.osehra.org/sites/default/files/2a.png>
> --
> Full post: http://www.osehra.org/wiki/building-mdws
> Manage my subscriptions:
> http://www.osehra.org/og_mailinglist/subscriptions
> Stop emails for this post:
> http://www.osehra.org/og_mailinglist/unsubscribe/943
>

Dear Joel,

The images "didn't work so pretty good" for my email... but
http://www.osehra.org/wiki/building-mdws
did fine. I won't have the ability to do this with any Microsoft stuff...
Didn't
someone say that they mostly had things working under Mono on Llnux?

Cheers,
--ldl

--
---
NOTE: If it is important CALL ME - I may miss email,
which I do NOT normally check on weekends nor on
a regular basis during any other day.
---
LD Landis - N0YRQ - de la tierra del encanto
3960 Schooner Loop, Las Cruces, NM 88012
651-340-4007 N32 21'48.28" W106 46'5.80"

like0

Open Source compilation of MDWS

Christopher Edwards's picture

LD:

the directions for comiling MDWS using Mono is here:  http://wiki.osehra.org/display/MDWS/Compiling%2C+Installing%2C+and+Using+MDWS+on+OSEHRA+VM

Joel is correct that they currently aren't finished yet (just got it working on Friday).  These should be finished up soon.

like0

Building MDWS

Joel Mewton's picture

Hi LD,

Yes, Chris Edwards has something working here:

https://github.com/ChristopherEdwards/MDWS/tree/MonoSupport

The instructions on OSEHRA for building MDWS aren't yet complete (as of
6ish EST 8/20) - I will finish them up soon. Probably before the MDWS
deep dive tomorrow at 1 PM EST.

Thanks

From: LD 'Gus' Landis [mailto:ldlandis@gmail.com]
Sent: Monday, August 20, 2012 5:44 PM
To: Mewton, Joel
Cc: MDWS
Subject: Re: [mdws] Building MDWS

On Mon, Aug 20, 2012 at 1:51 PM, joelmewton <joel.mewton@va.gov> wrote:

MDWS consists of two projects under two separate repositories. It's a
teensy bit confusing but these instructions should help you with
obtaining and organizing the code and building MDWS from source.

1. Create a directory for the files wherever you prefer on your
development machine - I call mine "MDWS".

2. Clone the MDWS and MDO repositories. Do this from the top
level MDWS folder (or whatever you named the container folder in step 1)
or you'll need to move the folders up a directory. I use the git command
line tool:

3.

Images

1a.png <http://www.osehra.org/sites/default/files/1a.png>

2a.png <http://www.osehra.org/sites/default/files/2a.png>

--
Full post: http://www.osehra.org/wiki/building-mdws
Manage my subscriptions:
http://www.osehra.org/og_mailinglist/subscriptions
Stop emails for this post:
http://www.osehra.org/og_mailinglist/unsubscribe/943

Dear Joel,

The images "didn't work so pretty good" for my email... but

http://www.osehra.org/wiki/building-mdws

did fine. I won't have the ability to do this with any Microsoft
stuff... Didn't

someone say that they mostly had things working under Mono on Llnux?

Cheers,

--ldl

--
---
NOTE: If it is important CALL ME - I may miss email,
which I do NOT normally check on weekends nor on
a regular basis during any other day.
---
LD Landis - N0YRQ - de la tierra del encanto
3960 Schooner Loop, Las Cruces, NM 88012
651-340-4007 N32 21'48.28" W106 46'5.80"

like0

Build Libraries?

Jerry Goodnough's picture

Does anyonew know where to find the build dependacies for this project ?

The reference https://github.com/monkeyglasses/mdws-lib.git gives a 404 error.

Likewise has anyone got this to build with VS2012 - It seems the Visual Studio 2010 Web Deployment Project is no longer supported.

 

Thanks,

 

Jerry

like0

Building MDWS

Joel Mewton's picture

Hi Jerry,

First off – your last name is awesome.

Next up – looks like we let the build instructions slip out of sync with the new repository structure. Very sorry about that. I’ve just updated the following page with the correct information:

http://www.osehra.org/wiki/building-mdws

Please let me know if you have any other issues with building the project.

I’ve not run MDWS on VS2012. I’m still using VS2010. We didn’t have any issues upgrading the project from 2005 > 2008 and then again from 2008 > 2010. I wouldn’t anticipate there would be many issues running the upgrade tool to convert 2012. Please report back with your findings!

Buen suerte!

From: Apache [mailto:apache@groups.osehra.org] On Behalf Of Jerry Goodnough
Sent: Friday, November 30, 2012 7:05 PM
To: MDWS
Subject: Re: [mdws] Building MDWS

Does anyonew know where to find the build dependacies for this project ?

The reference https://github.com/monkeyglasses/mdws-lib.git gives a 404 error.

Likewise has anyone got this to build with VS2012 - It seems the Visual Studio 2010 Web Deployment Project is no longer supported.

Thanks,

Jerry

--
Full post: http://www.osehra.org/wiki/building-mdws
Manage my subscriptions: http://www.osehra.org/og_mailinglist/subscriptions
Stop emails for this post: http://www.osehra.org/og_mailinglist/unsubscribe/943

like0

Building MDWS

Van Curtis's picture

I haven't had a chance to build w/ 2012 but will be converting soon. If there are issues w/ the web deployment project, you should be able to build without it and use the deployment strategy of your choice that is supported in 2012.

van.

From: Apache [mailto:apache@groups.osehra.org] On Behalf Of Mewton, Joel
Sent: Saturday, December 01, 2012 11:57 AM
To: mdws@groups.osehra.org
Subject: RE: [mdws] Building MDWS

Hi Jerry,

First off – your last name is awesome.

Next up – looks like we let the build instructions slip out of sync with the new repository structure. Very sorry about that. I’ve just updated the following page with the correct information:

http://www.osehra.org/wiki/building-mdws

Please let me know if you have any other issues with building the project.

I’ve not run MDWS on VS2012. I’m still using VS2010. We didn’t have any issues upgrading the project from 2005 > 2008 and then again from 2008 > 2010. I wouldn’t anticipate there would be many issues running the upgrade tool to convert 2012. Please report back with your findings!

Buen suerte!

From: Apache [mailto:apache@groups.osehra.org] On Behalf Of Jerry Goodnough
Sent: Friday, November 30, 2012 7:05 PM
To: MDWS
Subject: Re: [mdws] Building MDWS

Does anyonew know where to find the build dependacies for this project ?

The reference https://github.com/monkeyglasses/mdws-lib.git gives a 404 error.

Likewise has anyone got this to build with VS2012 - It seems the Visual Studio 2010 Web Deployment Project is no longer supported.

Thanks,

Jerry

--
Full post: http://www.osehra.org/wiki/building-mdws
Manage my subscriptions: http://www.osehra.org/og_mailinglist/subscriptions
Stop emails for this post: http://www.osehra.org/og_mailinglist/unsubscribe/943

like0

Build Architecture & GAC Questions

Jerry Goodnough's picture

In attempting to compile the project I'm getting Conflicts between a MSIL build and the Oracle Aseembly. I'm I correct the target for the projects should be set to x64 to resolve this issue.

On another front is it expected that Oracle and SQLLite assemblies will be in the GAC or that they are manually set by the builder?

 

Thanks,

 

Jery

like0

Building MDWS

Joel Mewton's picture

MDWS expects that both Oracle and SQLite will be installed in the GAC. When building MDWS, VS should compile in the “Mixed Platforms” configuration. But, there really is no penalty for specifying x64 explicitly.

To the original point – I’m not crazy about this solution. I would very much prefer to package the Oracle and SQLite DLLs with the rest of the project dependencies (nunit, spring.net, etc.). However, I quickly found myself in DLL hell when moving among machines and when trying to deploy MDWS to servers. The only “solution” was to install SQLite and Oracle on my development machines and on my production servers. In short – I know it’s a pain point installing there dependencies. Sorry! I wish I had a better solution. I’m hoping I can get away from using Oracle’s .NET providers completely in the near future. That doesn’t solve the problem I just highlighted but it does at least lessen the startup burden for a MDWS developer.

From: Apache [mailto:apache@groups.osehra.org] On Behalf Of Jerry Goodnough
Sent: Tuesday, December 04, 2012 8:57 PM
To: MDWS
Subject: Re: [mdws] Building MDWS

In attempting to compile the project I'm getting Conflicts between a MSIL build and the Oracle Aseembly. I'm I correct the target for the projects should be set to x64 to resolve this issue.

On another front is it expected that Oracle and SQLLite assemblies will be in the GAC or that they are manually set by the builder?

Thanks,

Jery

--
Full post: http://www.osehra.org/wiki/building-mdws
Manage my subscriptions: http://www.osehra.org/og_mailinglist/subscriptions
Stop emails for this post: http://www.osehra.org/og_mailinglist/unsubscribe/943

like0

VS2010 - GAC resolution and Instruction Updates

Jerry Goodnough's picture

Trying yet another clean build with VS 2010 – I saw the updates to the Building MDWS page.

I just tried a clean build. I have installed all the dependencies list although there is an error in the instructions given the new update

 

The following prerequisite reference is invalid and should be pulled – the new recursive get reference seems to pull what is needed.

 

Library dependencies [https://github.com/monkeyglasses/mdws-lib.git]

 

In looking at the instructions – Step 5 is no longer needed.

 

In addition I used to gacutil.exe and installed 64 bit version OracleDataAcess.dll  (11.2.0.3 x64) and SqlLite to GAC.  It appears the 4.5 SDK is what is installed.

 

Now with a straight attempt to Build results in

 

Warning               1              Could not resolve this reference. Could not locate the assembly "Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. mdo-test

 

Error                                      The type or namespace name 'Oracle' could not be found (are you missing a using directive or an assembly reference?)    C:\Users\Jerry Goodnough\Documents\mdws\mdo\mdo\src\mdo\dao\oracle\mhv\sm\AddresseeDao.cs      23           7              mdo

 

Any suggestions rather than forcing a direct reference to solve this?

like0

I just updated the

Joel Mewton's picture

I just updated the instauctions wrt your comments. I removed the section for MDWS deps (sorry I missed that one last update!) and added some information about the missing build info at the bottom in the "updates" section.

 

Thanks for trying this out and reporting back to make the instructions better!

like0

Building MDWS

Van Curtis's picture

If anybody would like to tackle the issue, we'd be glad to hear from them!

From: Apache [mailto:apache@groups.osehra.org] On Behalf Of Mewton, Joel
Sent: Wednesday, December 05, 2012 5:35 AM
To: mdws@groups.osehra.org
Subject: RE: [mdws] Building MDWS

MDWS expects that both Oracle and SQLite will be installed in the GAC. When building MDWS, VS should compile in the “Mixed Platforms” configuration. But, there really is no penalty for specifying x64 explicitly.

To the original point – I’m not crazy about this solution. I would very much prefer to package the Oracle and SQLite DLLs with the rest of the project dependencies (nunit, spring.net, etc.). However, I quickly found myself in DLL hell when moving among machines and when trying to deploy MDWS to servers. The only “solution” was to install SQLite and Oracle on my development machines and on my production servers. In short – I know it’s a pain point installing there dependencies. Sorry! I wish I had a better solution. I’m hoping I can get away from using Oracle’s .NET providers completely in the near future. That doesn’t solve the problem I just highlighted but it does at least lessen the startup burden for a MDWS developer.

From: Apache [mailto:apache@groups.osehra.org] On Behalf Of Jerry Goodnough
Sent: Tuesday, December 04, 2012 8:57 PM
To: MDWS
Subject: Re: [mdws] Building MDWS

In attempting to compile the project I'm getting Conflicts between a MSIL build and the Oracle Aseembly. I'm I correct the target for the projects should be set to x64 to resolve this issue.

On another front is it expected that Oracle and SQLLite assemblies will be in the GAC or that they are manually set by the builder?

Thanks,

Jery

--
Full post: http://www.osehra.org/wiki/building-mdws
Manage my subscriptions: http://www.osehra.org/og_mailinglist/subscriptions
Stop emails for this post: http://www.osehra.org/og_mailinglist/unsubscribe/943

like0

Oracle without ODAC

Christopher Edwards's picture

I found this stackoverflow question about not installing ODAC (except on one machine to collect the DLLs):

http://stackoverflow.com/questions/3935808/how-can-i-deploy-a-net-application-that-uses-odac-without-installing-the-whole

also

http://stackoverflow.com/questions/70602/what-is-the-minimum-client-footprint-required-to-connect-c-sharp-to-an-oracle-da

I haven't played with it, as I don't have oracle near me at the moment.

like0

Building MDWS

Joel Mewton's picture

Interesting – don’t know that I’ve seen that discussion before. I did try and bundle the DLLs in the past but don’t think it was the exact ones referenced here. I’ll give it a whirl. Thanks, Chris!

From: Apache [mailto:apache@groups.osehra.org] On Behalf Of Christopher.Edwards
Sent: Friday, December 28, 2012 8:47 AM
To: MDWS
Subject: Re: [mdws] Building MDWS

I found this stackoverflow question about not installing ODAC (except on one machine to collect the DLLs):

http://stackoverflow.com/questions/3935808/how-can-i-deploy-a-net-applic... <http://stackoverflow.com/questions/3935808/how-can-i-deploy-a-net-applic...

also

http://stackoverflow.com/questions/70602/what-is-the-minimum-client-foot... <http://stackoverflow.com/questions/70602/what-is-the-minimum-client-foot...

I haven't played with it, as I don't have oracle near me at the moment.

--
Full post: http://www.osehra.org/wiki/building-mdws
Manage my subscriptions: http://www.osehra.org/og_mailinglist/subscriptions
Stop emails for this post: http://www.osehra.org/og_mailinglist/unsubscribe/943

like0

Binary Kit?

Jerry Goodnough's picture

While I've been trying to work my way through build MDWS from scratch I seem to be running into a number of roadblock in the WDP and Packaging for a 64bit machine and I was wondering if there is a binary kit available anywhere?

Thanks,

Jerry

like0

Building MDWS

Joel Mewton's picture

Good grief! You’re still unable to build the project? I’d be happy to schedule a netmeeting or something with you, if you like? Probably will be quicker/easier than the email back and forth and we can just share the final solution when we figure it out. Just let me know your availability. Thanks

From: Apache [mailto:apache@groups.osehra.org] On Behalf Of Jerry Goodnough
Sent: Monday, December 10, 2012 4:33 PM
To: MDWS
Subject: Re: [mdws] Building MDWS

While I've been trying to work my way through build MDWS from scratch I seem to be running into a number of roadblock in the WDP and Packaging for a 64bit machine and I was wondering if there is a binary kit available anywhere?

Thanks,

Jerry

--
Full post: http://www.osehra.org/wiki/building-mdws
Manage my subscriptions: http://www.osehra.org/og_mailinglist/subscriptions
Stop emails for this post: http://www.osehra.org/og_mailinglist/unsubscribe/943

like0

I know...

Jerry Goodnough's picture

Thanks Joel,

Yeah it mostly looks like either setup or packaging... Free anytime tomorrow after 10:00 PST... You can email me direct at jgoodnough@cognitivemedicine.com and we can arange a time.

Jerry

like0

Missing files

mohamed khaled's picture

I can not download the dependencies need in step  5 links doesn't work with me ..5. Before we build, we need to place the dependencies in the correct location. Unzip the libs.zip file in to "MDWS/MDO/mdo-test/resources/" directory so that your directory structure looks like:

like0