How to use Castle IWcfClientFactory - castle

how to use IWcfClientFactory from castle wcf facility can any please post an example

Related

How to Replace Web Service Binding - Tuscany SCA with Spring from scratch

I have had some experience of developing web services (standalone) which are called via angularjs single page apps. But, I now have a Java EE task which involves the following:
1. Removing a Tuscany SCA web service binding from some business components e.g. Customer, Accounts. The components are exposed as web services
2. Replacing the Tuscany Binding with a Spring Injection web service binding.
NOTE: The decision to replace Tuscany SCA with Spring is already made.
But, as a developer with experience of developing web service without any knowledge of the binding frameworks. I need some understanding of what these frameworks are, how I can wire this framework to my web service from scratch.
I don't just want to copy and paste and do try and error on a commercial project.
I am afraid, there was no KT, hence I am learning this the hard way!
Please, can someone help me in understanding this underlying framework or binding.
What are this binding or binding frameworks?
Why do we need them?
How is Tuscany SCA different from Spring?
Any help good, practical, code sample, online references etc will be appreciated.
Thanks.
You are not clear with concept of SOA, SCA and Tuscany.
First understand which type of webservice is written in your project whether RESTFul or SOAP. And then understand how SCA + Tuscany service is written for for RESTFul/SOAP service and then try to remove Tuscany from it.
Reference docs:
http://tuscany.apache.org/documentation-2x/sca-java-bindingrest.html
http://www.springsource.org/spring-integration

How to call and use Rest full services in codegnighter

Actually I am working on codegnighter and I want to use Restful xml service at place of database in my project but I don't know is there any default methods or functions of codegnighter to get the xml or restful service response.
Please help me
thanks.
Phil Sturgeon's REST_Controller is a good place to start.

Is there a way to access the CXF message exchange from a JAX-RS REST Resource within CXF?

Currently we have a a RESTful API using CXF 2.4.2. In one of my resource methods, I would like to process some query parameters and store the result in the CXF message exchange for an output interceptor to use later on.
I've tried injecting the WebServiceContext as mentioned here, but it does not seem to work, probably because it is part of the JAX-WS specification, and we are using JAX-RS.
Any help would be greatly appreciated!
The easiest, if using CXF, is to just do:
PhaseInterceptorChain.getCurrentMessage()
That will work in JAXWS and JAXRS services.
Injecting org.apache.cxf.jaxrs.ext.MessageContext should do too but the code Dan suggests will lead to a simpler code in case of combining JAXWS & JAXRS

If you are starting a new MVC3 project which adaption will you choose DependencyResolver or ControllerFactory with Castle Windsor?

I am new to the ioc containers and confused how to integrate a container to mvc3...
There is a sample that uses ControllerFactory...
https://github.com/kkozmic/ToBeSeen/blob/master/src/ToBeSeen/Plumbing/WindsorControllerFactory.cs
There is a blog post that says
"The MVC 3.0 IDependencyResolver interface is broken. Don’t use it with Windsor."
http://mikehadlow.blogspot.com/2011/02/mvc-30-idependencyresolver-interface-is.html
and from this link I think I also need to implement IControllerActivator...
Castle Windsor Dependency Resolver for MVC 3
In pluralsight's mvc3 dependency resolution videos scot allen says using activators is necessary if your ioc container is not enough for it...
this also makes me think about using windsor with DependencyResolver.
I'm using ControllerFactory since a while with no problem at all.
There's a very usefull tutorial on windsor wiki
In case you need your action been resolved by an IoC I suggest you
http://weblogs.asp.net/psteele/archive/2009/11/04/using-windsor-to-inject-dependencies-into-asp-net-mvc-actionfilters.aspx
Due to missing release operation, IDependencyResolver is not enough: stay away from it.

Auto Generating SOAP WS Proxy in VS2008

It seems that there are two methods for auto generating web service proxies in VS2008 from a wsdl.
wsdl.exe
Adding a web reference/service reference from the interface
I've been using wsdl.exe because I like having access to the class - and when I add a reference, I haven't been able to find the generated proxy code. Is there a benefit of just adding a reference that I may be overlooking?
Adding a service reference is the way to go. As pointed out to me on another thread, it is prudent that I strongly encourage you to avoid using wsdl.exe unless you have a very good reason to be using it. For your reference, the VS option Add Web Reference is a wrapper over wsdl.exe and creates proxies for .NET 1.1 or 2.0 clients. Add Service Reference is a wrapper over svcutil.exe and is used to create .NET 3.0+ clients.

Resources