Sun Metro WebServices with Spring - sun

I am using sun metro webservice stack with spring. every thing is working fine but i am unable customize namespace of the my service. my service always setting namespace as {http://www.springframework.org/schema/beans}. how do i customize my namespace for my service?

after my research i know i missing namespace for my service. so it takes default spring bean name space. so we need to add namespace to service as show in example.

Related

Using the WCF Service Application Template, where is the "service" info

I am using VS2010 and .NET 4.0. When I create a WCF Service Application, I can easily get my service up and running. However, I am unable to find the services information such as binding configuration and address etc. Where does the template store this information so that I can modify. I know I can add my own bindings and address in the config but I want to know what is the default binding WCF template is using and modify accordingly.
I apologize for the simple (dumb) question, but in 3.5 it was in the config upon using the template
This is not something being done by the template. The application is simply using the default WCF configuration settings. See here for futher info.

WCF service hosted in a managed Windows service connect using a WCF service application

Thank you in advance for any advice. I have a Windows service that is hosting a WCF service through net.tcp and this is working great. I have also created a WCF service application. I am trying to add the net.tcp service reference to the service application. Then I add it to the GAC that goes ok but if I try to RegAsm the WCF service application to allow it to be called from Server.CreateObject I get the error:
Warning: Type library exporter encountered a type that derives from a
generic class and is not marked as
[ClassInterface(ClassInterfaceType.None)]. Class interfaces cannot be
exposed for such types. Consider marking the type with
[ClassInterface(ClassInterfaceType.None)] and exposing an explicit
interface as the default interface to COM using the
ComDefaultInterface attribute.
It does not work. I have tried to call it through a class library but this does not work either as the end point is not set correctly.
Any advice?
Ok Fixed this. Was a Permissions Error the iusr account did not have access to the web.config file from the WCF Service Application. So It works now. Now another problem has arised. I need to be able to call the WCF Service Application from asp classic but it does not use a web.config.

Problem with WCF custom behavior used in the silverlight client

To pass the culture information from client to WCF service, I have created a custom behavior using the custom inspector. The inspector class implements IDispatchMessageInspector and the IClientMessageInspector.
My client is the silverlight application. And now I'm facing the problem with the IDispatchMessageInspector since it's not available in the System.ServiceModel.Dispatcher.dll is not available to add as an assembly reference to Silverlight 4 project.
Can someone help me out ? How to handle the custom behavior to send message from SILVERLIGHT to wcf. ?
The IClientMessageInspector needs to be implemented and used at the client (silverlight in this case) side whereas IDispatchMessageInspector needs to be used at the service side.
Following posts are really helpful:
Automatic Culture Flowing with WCF by using Custom Behaviour
Automate passing valuable information in WCF headers
Processing custom WCF header values at server-side

How do I get the generated proxy class of a WCF service to implement INotifyPropertyChanged

Is it possible to have the proxy classes that are generated when setting a service reference implement INotifyPropertyChanged?
In this case it's a silverlight app referencing a WCF service?
Update:
The SlSvcUtil.exe commandline utility is part of the silverlight SDK installed {Program Files}\Microsoft SDKs\Silverlight\v4.0\Tools will generate the classes with an INotifyPropertyChanged implementation.
I'll leave this question up, as I live in hope that someone will say this is possible from Visual Studio without haing to launch an external tool.
Proxy classes do not implement that interface, only DataContracts do. If you open .svcmap file generated by adding service reference in XML viewer you can change EnableDataBinding element to true and update service reference from VS. I thought that true is default value and you have to manually changed it if you don't want to use INotifyPropertyChanged. What is so specific in your service?

WCF Service reference from Silverlight Class Library

I have a Silverlight application communicating with the server side through WCF services. Initially I had everything in the main Silverlight application, but now I wanted to factor our some classes to a separate Silverlight Class Library project. This however gave me some odd issues...
I wanted to factor the classes that does the WCF communication out to a separate project. So I:
Created a new project; Silverlight class library
Moved the classes from my Silverlight application to my Silverlight class library
Removed the Service reference in the application as I no longer call it from the app.
Added a Service reference from the class library project.
Now - compiling is fine and I get intellisense for the service stuff in the Class Library, so it seems to be fine. I also updated the service and got the updates in the Class Library.
But when running the application it fails when doing a service call giving the following error:
InvalidOperationException was unhandled by user code
Could not find default endpoint element that references contract 'MyServiceReference.IMyService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
Seems like it can't find the service, but why? I assume there should be no problem to have service references from a Silverlight Class Library as it allows me to add one?
IT can't find any service configuration - where do you have the config for the WCF service? By default, the client app (the EXE) will have a app.config that contains the service endpoints to connect to.
Also by default, class libraries (DLL's) don't have their own configuration but rely on their hosting app to provide the configuration for them.
So all in all - you're probably missing the config for the client endpoint. Most likely, it has been created as an app.config in the class library project, but that's not being used, really - you'll have to move the <system.serviceModel> section up to the main app's config (I'm not fluent in Silverlight, but you'll know where to put it).
Marc