Compiling Developer Generated C# .net Client Code in MS Visual Studio NET

A co-worker and I are tasked with integrating a custom C#.net application into an existing webMethods application running on IS v6.1. I’ve used the webMethods Developer to generate third party C#.net client code to externally execute a webmethods Flow service but the Developer generates a Make file for use in command line compilation. My co-worker needs to be able to compile this code within the Microsoft Visual Studio .NET environment.

The problem is we cannot figure out how to reference the webMethods client.jar file from within MS VS .NET so he can use the webMethods specific methods referenced in the Developer generated client code.

We have looked at a tool called jbImp but it looks like we would have to explode and decompile the client.jar file to get the source code before jbImp will convert it into something MS VS .NET would accept.

Can anyone offer a solution on how to reference the webMethods client.jar file from within a MS VS .NET C# file so we can use the webMethods specific methods referenced in the Developer generated client code?

Thank you.

Hello,

Yemi Bedu

Thank you.

I passed the information on to my co-worker and he is receiving the following:

jbimp /t:library /out:webmethods.dll client.jar /usestubrefs

Microsoft ® Java-language bytecode to MSIL converter version 1.1.4322.0
for Microsoft ® .NET Framework version 1.1.4322
Copyright © Microsoft Corp 2000-2002. All rights reserved.

JbImp error: Internal Conversion Error : ‘parsing-unknown-tag’
JbImp error: Internal Conversion Error : ‘JbImp fatal error: Conversion failed’

He has tried changing the order of the arguments and removing /usestubrefs.

It doesn’t make any difference.

Any suggestions would be greatly appreciated. Thank you in advance.

From the “CReademe.txt” file generated in the same folder as your generated C# client and make file:

These dll files are located in your IntegrationServer\lib file. There is no need to convert WM jar files to DLL’s.

The <svcname>.mak file contains the following line:

If you do not have the webMethods Microsoft Package for DotNet installed you will need to change this line to read something like this:

Since you want to compile the C# client from Visual Studio .Net, you will need to include the DLL’s from the \IntegrationServer\lib folder.

Mark

Hello,

Yemi Bedu

I’m pretty sure that the WmDotNet solution was delivered around the same time as IS 6.01, but I’m thinking the ability to generate a C# client was introduced with Developer 6.1. The release notes of Developer and the webMethods Microsoft .Net package would answer this definitively.

Mark

In order to use the “Building a C# Client” functionality in WM6.1, do you need to own the wm .NET package?

We do not own the WM .NET package but it seems we should be able to use this functionality.

Thanks,

Mike Morella
Marathon Oil Company

In Developer, use Tools-Generate Code-For Calling This Service From a Client and then choose C# for .Net as the language.

Mark

Mark,

We have generated the C# code which in turn created a CReadme.txt file. The CReadme.txt states the following notes about 4 dlls but we can’t seem to find the dlls. Where can we find these dlls? Are they supplied by webMethods? If so where how can we obtain the dlls?

To compile and run the generated C# client you need access to several
libraries which constitute the C# client API. These include:

bcore.dll
idata.dll
clientapi.dll
wmpUtils.dll

Thanks,

Mike Morella

I believe those DLL’s get installed in the Developer/DotNet folder when the webMethods Microsoft Package is installed using webMethods Installer. Unfortunately, that means that you need to have a license as best as I can tell.

Mark

Mark,

Thanks for the information.

Mike Morella