RickStrahl / wwDotnetBridge

.NET Interop for Visual FoxPro made easy
http://west-wind.com/wwDotnetBridge.aspx
MIT License
74 stars 35 forks source link

QUESTION: C# DLL calling a wsdl service #8

Closed LuciferSam86 closed 7 years ago

LuciferSam86 commented 7 years ago

Hello, I wrote a DLL which returns values from a wsdl service. The problem: This DLL is called with wwdotnetbridge in an ERP which is not mine, but I can only do customizations, and since I cannot modify its "application.exe.config" with the proper configuration for the endpoint, how can I do that?

Should I do write a console application which returns the xml and read from my DLL? Do you have better ideas?

Thank you

LuciferSam86 commented 7 years ago

Problem solved with this: https://stackoverflow.com/questions/7688798/net-deploying-a-wcf-client-without-an-app-config

Closing

RickStrahl commented 7 years ago

Yup. With FoxPro you generally will want to do this because it's a pain to control the .config file in general (vfp.exe.config and yourapp.config) - that config will eventually get to be a mess on a development machine.

I generally approach WCF by creating a .NET wrapper assembly that has a factory method that configures the service and passes back the configured service client to FoxPro (ie. CreateCustomerServiceClient()). It takes a bit of code to configure the WCF endpoint (digging through the crazy hierarchy), but once that's done it's done and lets you distribute without any configuration requirements.

LuciferSam86 commented 7 years ago

Thank you for the tip, and thank you for this awesome open source project! 👍