I am very basic in VB6 so sorry if I am asking an obvious question!
We have an old VB6 application and currently we need to do some re-enhancements in it. I want to somehow connect it to a WCF webservice to send and get files (WCF will take care of loading and storing them in DB).
Based on my researches, it is possible based on This article and some others, Now I am wondering if is it required to have .NetFramework installed on systems to do this?
You can use RESTFUL WCF Service and set the UriTemplate attribute for the method(OperationContract).
Full article for creating REST service
The article you have linked suggests that the VB6 code should call a .Net wrapper for the WCF service.
If you do that, then yes, certainly you will require the .Net framework to be installed on the machine that runs the VB6, because that machine will also have to run the .Net wrapper.
Related
I'd like to create a document in SharePoint 2013 using a call to a WCF (or any other web service) from my console application.
I've been told that WCF access is deprecated in SP13 and will be removed in future versions. Instead, CSOM is to be used (whatever that is).
My question is about the recommended approach. Is it smart to build a solution based on WCF connection (which I know very well how to do) or should I start reading up on the other approach?
CSOM stands for Client-side Object Model. It comes in three flavors; .NET. JavaScript, and Silverlight. Using CSOM abstracts some of the plumbing that you have to do when using WCF directly but ultimately, CSOM talks to a WCF service called client.svc.
If you know WCF already, you can make RESTful calls using OData to that service from your app.
Here's more info about the different API's, http://msdn.microsoft.com/en-us/library/jj164060.aspx.
Here's more info about REST access: http://msdn.microsoft.com/en-us/library/jj164022.aspx.
I have a VB6 application that I want to communicate with a WCF Windows Service that I have written which imports Security Certificates. The only function in the service takes two string arguments. I have been having a lot of difficulty getting the two programs to communicate however.
In VB.NET, it is easy, just make a reference to the service as you would a web service. In VB6, however, it is not so simple it seems. Searching only seems to pull up examples of how to WRITE a Windows service in VB6.
Anyone know how this is done?
The easyest way I have found to access a WCF service from VB6 is to create a .Net ComObject wrapper for the service client. Then in VB6 all your are doing is a create object and calling some methods on the object. All the WCF work takes place in the .Net com object.
I am new to both Silverlight and WF (both 4.0 version), i was wondering if we can integrate WF4.0 with Silverlight 4.0 in such a way that, when we click on some button in sliverlight UI the workflow should be executed and the output from the final activity of the workflow is displayed in the Silverlight screen. If it can be done then please provide me with some link or any tutorial where i can learn about this and start implementing.
Thanks in advance.
In WF 4.0 you can have workflows started (or progressed) by WCF endpoints. Therefore, if you can call the WCF endpoint from your Silverlight application you should be able to do this quite easily. Lots of information on Microsoft's WF Developer Centre.
Assuming you are using Visual Studio 2010, you can get up and running with a very simple Silverlight -> WF example very quickly...
Create a new project (and new solution) from the 'WCF Workflow Service Application' template. The project will be named DeclarativeServiceLibraryX. This should give you a very simple WorkflowService definition using SequentialService that simply receives the request from a client (with a single integer argument) and sends a response (with the same value). This project is created as a web project so includes a Web.config.
Create a new Silverlight 4 application. You will be asked if you want to host the Silverlight app in the existing web project (created in step #1). Probably a good idea to say yes.
In the Silverlight application, select 'Add Service Reference...', then 'Discover/ Services in Solution'. Service1.xamlx will appear as an option, select it and click Ok.
VS will then generate a WCF service reference client. You could then add a TextBox & Button to capture some data, create the client and send the service call across the wire to the WCF Workflow Service. This Workflow Service could then be modified as necessary (or use these steps to add a WCF Workflow Service to your own web project).
One area that might be challenging is modifying the WCF service bindings to be compatible with Silverlight; perhaps create a Silverlight-compatible WCF service in your server-side project first, then create a WF WCF endpoint and look at the generated code & config to see how to put things together.
The MSDN Endpoint blog is also a useful resource for learning more about WF and WCF (especially with the new style lightweight REST-style 'WCF Web HTTP' bindings, which might be more suitable for consumption by a Silverlight client.
I am assuming that you don't want to host the workflow inside the Silverlight app itself, as WF is a full .Net framework component rather than being Silverlight compatible. I'm sure you could write your own lightweight workflow framework that runs inside Silverlight, but given workflow is generally a multi-user, server-side concern this probably wouldn't be very useful concern.
I found an example with WPF here for these samples. Hope they will help you a bit or at least give a general look at this topic.
Workflow Foundation is not included in the Silverlight 4.0 runtime and thus cannot be used within a Silverlight app. So Silx answer do not relate at all to Silverlight. And James Websters answer is the only solution to make use of WF from Silverlight.
You cant use WF with silverlight.... the only way is , You can call WCF service to access WF as explained by James Webster.
One of our C# ASP.Net projects has some dependencies on the Microsoft WSE 3.0 library, in order to consume a WSE3.0 web service. However, we're migrating the project to Windows Server 2008, which does not support WSE3.0.
So I need to refactor the code to remove the dependency to WSE 3.0 but still maintain its functionality. The code is simply adding a username security token to the SOAP context and then invoking the web service. I'm not sure where to start though. I suspect I switch to WCF, and if so, is there any tutorial available online to help?
I'd start by creating a simple application, maybe a Console application, to be a test consumer of the existing web service. Create client proxy classes for this application by using "Add Service Reference", and pointing it to the existing WSE service. That should take care of most of the problems.
Once the simple console application works, you can do the same for your ASP.NET project.
Needless to say, it's way past time to update that WSE service to WCF, which is supported, and which will continue to be supported for a long time to come.
This article is a pretty good rundown of the differences between WSE 3.0 & WCF and migration recommendations. I'd start by getting the migrated service to run under the basicHttpBinding configuration (without user name/password authentication).
Once the service is running as expected and look at this article to see how to get the migrated service configured for user name/password authentication. The article is written for Silverlight use but there should be enough in it to get you going.
I would like to add an interceptor layer to my WCF service to send the Device ID to authenticate the device.
I am very very new to WCF Interceptors. Before I take all the time to figure them out, I would like to know if they even work with the Compact Framework.
So, do WCF Interceptors work with the Compact Framework and if so are there any special considerations I need to keep in mind as I research them. (Any C# examples of how to do this would be AWESOME!)
I am using Visual Studio 2008 SP1.
I haven't used WCF myself, but a quick glance at this article shows me you need the IChannelFactory and/or IChannelListener classes which are supported on .NET CF 3.5.
The article also has a downloadable sample app, which you probably can modify to run on .NET CF.
So I can't give you any considerations or gotchas, but it looks to me you won't be on a dead end road here.
Interceptors cannot be created on WCF for Compact Framework (NETCF). The IClientMessageInspector and similar constructs needed for interceptors are not present in NETCF.
You can add custom soap headers though. You just have to add them to each WCF Service Call.