.NET Java SOAP service change to WCF soap service - asp.net

I currently have soap web services in java. Due to some architectural changes we need to move the services to WCF.
If the signatures are the same, can the string URI be changed and the .NET proxy will continue to work without any changes to the code?

If the contract (WSDL) remains absolutely the same then you only need to change address to the new server hosting the service - that is the theory. Now you need to build the WCF service which will really have the same contract. That can be hard task. I would start with generating interfaces from existing WSDL describing Java service (use svcutil for that).

Related

How do I configure an ASP.net web application to invoke a WCF service host factory for named pipe calls?

I am hosting a WCF service in an ASP.net application. The service has two endpoints, an HTTP endpoint and a named pipe endpoint. I'm trying to consume the service from within the same web application using the named pipe endpoint.
The problem is that the service host factory isn't invoked until something tries to access the HTTP endpoint, so if the web application tries to call the service using the named pipe endpoint the call fails.
How do I configure the web application (or IIS) to invoke the service host factory for named pipe calls?
Update: My original premise was wrong. I took Petar's advice and installed AppFabric. This allowed me to see that the named pipe endpoint did in fact exist and that the service host factory had been invoked during an earlier build. I was able to test this by performing a clean build and setting a break point in the factory class.
Windows Server AppFabric could be your solution as it offers ability to manage service instance differently then with IIS and WAS. You can see here the screen where you can configure your services to auto start.
Beside this feature there are some other useful aspects of AppFabric you can read from the links above.

How to set SOAP protocol for a ASP.NET web service?

I m newbie to ASP.NET web services.
I have written my web service, web method. I want the output of my web service to be in SOAP rather than the default HTTP POST protocol.
How do i do that?
I need the output to be SOAP as i need to deserialize the xml file, in my web application where i will be consuming the web service.
Please help.
Follow these steps
1.In the Web Service Details window, select an operation for that Web service.
2.On the Diagram menu, choose Properties.
3.In the Properties window, set the appropriate SOAP properties under the Implementation heading.
http://msdn.microsoft.com/en-us/magazine/cc164007.aspx

Calling WCF service from host

I am hosting a WCF service library in an ASP.net web application, which also needs to consume it. What is the best way to do so? Should I create a client proxy and invoke the service that way or is there a way of directly calling it? (the library is a project reference after all, and I guess doing so would be faster)
Since your WCF service library is a project reference for your web application, you could just instantiate the service directly without creating a client proxy. This approach would indeed be faster since you wouldn't be going through the serialization and deserialization that WCF does. However, you may wish to create a client proxy and access the service that way. This approach would be useful if there's any chance you may at some point host the service outside of your web application. If you were to end up moving the service, you would just need to update the endpoint address in your web application's web.config file.

Secure WCF service on Azure

We have a WCF service running in Azure and have client application (WPF) consuming the servcie. Can anybody point me in the right direction on how I can secure the WCF service so that only my client application can access the public methods or applications allowed can access the public methods
there are lots of possibilities depending on binding you are using, an approach could be to use Message Security with X509 certification in WSHtttpBinding
you can read about it's example here
Disable Mex (Api information)
Use HTTPS to prevent man in middle attacks
these are general ideas based on your environment and constraints it can be different.

Constrain the consumption of a web service to certain apps

Is there a way I can configure my asp.net web service to work with only some applications? In other words, I am saying "only these applications have access to this web service and can therefore use it. Others can't".
When other applications tries to discover the service, it shouldn't even show up, or at least it should conceal it web methods.
PS: I am wondering if this scenario is even applicable to the whole concept/domain of web services? Plus, I am asp.net 2.0 oriented, but you can give me answers based on higher framework versions, but be specific...Thanx in advance.
I'd look at WCF (after all ASMX web services are now regarded as legacy)- there is a whole load of options regarding security configuration. Patterns and Practises have Security Guidance here. It sounds like you are most interested in authorization, so read about Access Control Mechanisms.
Also to make the service non discoverable in WCF you just don't expose a MEX endpoint. That doesn't stop clients connecting, but makes it hard for people to work out how to call the service. That said you can also secure the MEX endpoints so that is another option.
Can you put some authorization or login method to initialize usage of webservice?
We control usage of services by explicitly logging into the webservice or provide some authorization token.

Resources