Search Results

Search found 4626 results on 186 pages for 'wcf serialization'.

Page 60/186 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • What is the difference between building a WSDL in Eclipse and using WCF?

    - by myermian
    I'm somewhat familiar with WCF in that I can build Web Services in VS.Net ... I understand some of the concepts... But, the other day I cam across this option in Eclipse (I also use Java to code) to create a WSDL. Playing around with it it looks great since it has a GUI method of building itself. I guess I just wanna know what the difference is. 1) Are they different technologies like WSDL vs WCF? Or, is it that WCF uses WSDLs? 2) I read that WSDLs are a top-down approach... so what about WCF, is that top-down or is that bottom-up? 3) Will this WSDL in Eclipse actually be able to generate CSharp code for my server and client efficiently, or will it require a lot of fixing?

    Read the article

  • WCF reuse types in referenced assemblies does not reuse the ServiceContract Interface

    - by Matt
    I have three seperate projects: -MyUserControl (Needs a reference to a service implementing IMyService) -MyService (Implements IMyService) -MySharedInterfaces (IMyUserControl and IMyService) -MyWebApp The user control needs to be dynamically loaded at runtime. This implements IMyUserControl and has a property of type IMyService which will be set at runtime. The trouble is even with the option to reuse types the WebApp isn't reusing the IMyServiceType, it always generates it again from the Service Reference. This wouldn't be an issue if I could cast it to MySharedInterfaces.IMyService (which I can't understand, since it should be exactly the same). The user control is expecting something of type IMyService, is there anyway to either cast the WebServiceReference.IMyService back to MySharedInterface.IMyServiceReference or force the WebServiceReference to reuse the MySharedInterface.IMyServiceReference? Thanks

    Read the article

  • I have a question about URI templates in WCF Services

    - by Debby
    I have a web service with following operation contract and my service is hosted at http://localhost:9002/Service.svc/ [OperationContract] [WebGet(UriTemplate = "/Files/{Filepath}")] Stream DownloadFile(string Filepath); This web service would let users download file, if the proper filepath is provided (assuming, I somehow find out that proper filepath). Now, I can access this service from a browser by typing, http://localhost:9002/Service.svc/Files/(Filepath} If {filepath} is some simple string, its not a problem, but I want to send the location of the file. Lets us say users want to download file C:\Test.mp3 on the server. But how can I pass C:\Test.mp3 as {Filepath}? I get an error when I type http://localhost:9002/Service.svc/Files/C:\Test.mp3 in the browser. I am new to web services and find that this community is the quickest way to get answers to my questions.

    Read the article

  • Posting an image and textual based data to a wcf service

    - by James Hay
    I have a requirement to write a web service that allows me to post an image to a server along with some additional information about that image. I'm completely new to developing web services (normally client side dev) so I'm a little stumped as to what I need to look into and try. How do you post binary data and plain text into a servic? What RequestFormat should I use? It looks like my options are xml or json. Can I use either of these? Bit of a waffly question but I just need some direction rather than a solution as I can't seem to find much online.

    Read the article

  • Using WCF in .NET how can I make it auto generate SOAP docs like ASMX did?

    - by Hades
    I'm currently writing a web service using WCF in VB.NET. Previous web services I wrote used ASMX but I wanted to learn WCF and so far it's going well. I actually prefer the way WCF does things. One thing I miss however is the way that ASMX used to generate example SOAP requests and responses. It was like getting documentation for free. Is there anyway to auto generate SOAP documentation for WCF? If not, is there any way to generate it in a .NET page using the WSDL?

    Read the article

  • Wcf inhereted models

    - by jack london
    [DataContract] Base { [DataMember] public int Id {get;set;} } [DataContract] A : Base { [DataMember] public string Value {get;set;} } [ServiceContract] interface IService { [OperationContract] void SetValue (Base base); } is there a way to use the service like the following style: new Service ().SetValue (new A ());

    Read the article

  • WCF DataContract class with methods

    - by jmlaplante
    This is more of a philosophical/best-practice sort of question rather than a technical problem. Are there any strong arguments against writing a DataContract class with methods that are to be used server-side only? Or what about additional properties that are not decorated with the DataMember attribute? For example: [DataContract] public class LogEntry { [DataMember] public string Message { get; set; } [DataMember] public string Severity { get; set; } public string SomeOtherProperty { get; set; } ... public void WriteToDatabase() { ... } } Not doing it seems like an awful lot of extra work that I would prefer to avoid, although using extension methods could make it easier. But, as a good developer, I am wondering if it is bad practice to do so.

    Read the article

  • WCF RIA Services v1.0 Timeouts

    - by Dan Wray
    I have a RIA service methods which return quite a large amount of (binary) data to my silverlight application. The methods themselves (database access etc) complete quickly, but since I upgraded to v1.0 from the RC2 I've been experiencing timeouts, even when I limit the data returned to the smallest objects. Debug shows the method returning, then 20-30 seconds later the silverlight "method complete" event will fire. There is not enough data to cause that much lag. Could anyone suggest why this might be? I've been unable to find any breaking changes documentation specific to the RC2 = 1.0 upgrade. Trying to eliminate any other possible causes also, but this is literally a case of worked before the install, doesn't work now! (also upgraded silverlight 4 tools for vs).

    Read the article

  • jquery live and callbacks via wcf services

    - by vondip
    Hi all, I am writing a web app with asp.net, c# and jquery. Most of the time I'm writing dynamic html to the browser and using different web services to get the content needed. My call to the service: function WriteProducts(currentIndex, selectedCategoryId, callback) { var d = new Date(); MyAppServices.GetProducts(selectedCategoryId, currentIndex, 8, d.getTime().toString(), callback, function func() { alert('failure'); }); } The request usually gets translated to this (using firebug I monitored it): http://localhost:8080/MyApp/MyAppServices.svc/GetProducts?categoryId=0&fromIndex=0&toIndex=8&randomNumber=%221271800014441%22 The problem starts when part of the html controls dynamically rendered need to respond to click events. This is when I start using jquery's live method: $('.filter').live('click', function(event) { WriteProducts(0, selectedCategoryId, PopulateDivs); }); Now from some reason, the request passed to the server becomes this: http://localhost:8080/MyApp/MyAppServices.svc/GetProducts?categoryId=**%2217%22**&fromIndex=0&toIndex=8&randomNumber=%221271799783355%22 where did these %22 come from? If I take them out, the request passes successfully. I have no idea who inserted these %22, but they are causing havoc here! Guys, do you perhaps have a clue?

    Read the article

  • wcf class implementing multiple service contracts

    - by Archie
    Hello, I have a class TestService which implements two service contracts called IService1 and IService2. But I'm facing a difficulty in implementation. My Code looks as follows: Uri baseAddress = new Uri("http://localhost:8000/ServiceModel/Service"); Uri baseAddress1 = new Uri("http://localhost:8080/ServiceModel/Service1"); ServiceHost selfHost = new ServiceHost(typeof(TestService)); selfHost.AddServiceEndpoint(typeof(IService1), new WSHttpBinding(), baseAddress); selfHost.AddServiceEndpoint(typeof(IService2), new WSHttpBinding(), baseAddress1); ServiceMetadataBehavior smb = new ServiceMetadataBehavior(); smb.HttpGetEnabled = true; selfHost.Description.Behaviors.Add(smb); selfHost.Open(); Console.WriteLine("The service is ready."); Console.WriteLine("Press <ENTER> to terminate service."); Console.WriteLine(); Console.ReadLine(); selfHost.Close(); I'm getting a run time error as: The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address. What shall i do about it? Do I realy need two separate endpoints? Thanks.

    Read the article

  • Robust Large File Transfer with WCF

    - by Sharov
    I want to transfer big files (1GB) over unreliable transport channels. When connection is interrupted, I don't want start file transfering from the begining. I can partially store it in a temp table and store last readed position, so when connection is reestablished I can request continue uploading of file from this position. Is there any best-practice for such kind of things. I'm currently use chunking channel.

    Read the article

  • Inject WCF proxy with credentials using StructureMap

    - by Steve Horn
    I have a service proxy generated by svcutil which generated an interface(IStudentContract) and a concrete type implementing (StudentContractClient). I'd like to have instances of StudentContractClient injected into my classes via StructureMap. My proxy also needs to have credentials supplied as seen in this passing unit test: <Test()> _ Public Sub Then_the_web_service_call_should_not_throw_an_exception() Dim studentServiceProxy As New StudentContractClient Dim credential As New NetworkCredential credential.Domain = ConfigurationManager.AppSettings("something") credential.UserName = ConfigurationManager.AppSettings("something") credential.Password = ConfigurationManager.AppSettings("something") studentServiceProxy.ClientCredentials.Windows.ClientCredential = credential Dim result = studentServiceProxy.GetCurrentTeachersByStudentSepid(26899) result.Count.ShouldEqual(4) End Sub My question is what would the structuremap configuration look like to have instances of IStudentContract injected with the credentials supplied? Thanks for any help!

    Read the article

  • amount of data returned by wcf 3.0 service contract method causes error

    - by ferrell carr
    CommuncationException was unhandled The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. here is my svc.map file <?xml version="1.0" encoding="utf-8"?> <ServiceReference> <ProxyGenerationParameters ServiceReferenceUri="http://d3w9501/SimpleWCF/SimpleWCF.svc" Name="svc" NotifyPropertyChange="False" UseObservableCollection="False"> </ProxyGenerationParameters> <EndPoints> <EndPoint Address="http://d3w9501.americas.hpqcorp.net/SimpleWCF/SimpleWCF.svc" BindingConfiguration="BasicHttpBinding_ISimpleWCF" Contract="TestSimpleWCF.svc.ISimpleWCF" > </EndPoint> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_ISimpleWCF" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" > <security mode="None" /> </binding> </basicHttpBinding> </bindings> </EndPoints> </ServiceReference>

    Read the article

  • Obtaining the server IP address in WCF?

    - by chris
    How can I obtain the server IP address that was used to connect to a service? The server has multiple IP addresses and I need to know which one the client is connected to. So far I only found that OperationContext.Current.EndpointDispatcher.EndpointAddress and OperationContext.Current.Channel.LocalAddress contain the address from .config (e.g. localhost) OperationContext.Current.IncomingMessageProperties.Via contains the Url that the client used to connect to the server (but this might just be a name from the clients hosts file). EDIT - Sorry, I wasn't being clear enough: The server needs to know which of its IP addresses were used by the client. E.g. the server has the addresses 10.0.0.1 and 10.0.0.2. when processing the request the server service needs to know if 10.0.0.1 or 10.0.0.2 was used by the client to connect to it.

    Read the article

  • How can I make a single WCF method ConcurrencyMode.Multiple when service is ConcurencyMode.Single

    - by Michael Hedgpeth
    I have a service which is defined as ConcurrencyMode.Single: [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Single, UseSynchronizationContext = false, InstanceContextMode = InstanceContextMode.PerSession, IncludeExceptionDetailInFaults = true)] public class MyService : IMyService This service provides a method to tell the client what it's currently working on: [OperationContract] string GetCurrentTaskDescription(); Is there a way to make this particular method allowable while another long-running task is running where all other methods still follow the single-threaded concurrency model?

    Read the article

  • WCF Web Services - Multiple Hop impersonation on the same server

    - by Lerxst
    Hi Folks I have 3 web services, all located on the same server. My Client calls Service A, which impersonates the client to call Service B, and all is well. Now, I want to impersonate the caller of service B (which is my username) to call Service C. When I use the same technique as before (AllowedImpersonationLevel = Impersonate, user.Impersonate()), The user doesnt get passed to service C. Instead, Service C sees the user as the user I am running it under in IIS. Is there anything special I need to do to get this working? Is this a delegation issue? (I thought it would not be delegation because they are all on the same server) Thanks SO!

    Read the article

  • WCF client using basic HTTP authentication

    - by AZ
    I'm trying to connect to a service that uses basic HTTP authentication. I've configured my binding like this <bindings> <basicHttpBinding> <binding name ="binding"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Basic"/> </security> </binding> </basicHttpBinding> </bindings> and i'm setting the credentials like this: client.ClientCredentials.UserName.UserName = Settings.UserName; client.ClientCredentials.UserName.Password = Settings.Password; Sill when i make a request i get a "The HTTP request is unauthorized with client authentication scheme 'Basic'" fault back. What am i doing wrong? (i don't have control over the service so all solutions must relate to the client configuration)

    Read the article

  • WCF + Add a Binding Extension via Code

    - by FlySwat
    I'm trying to figure out a way to add a binding extension to an endpoint via code, instead of through configuration files. Ideally I want it to simply be an attribute I place on the service method. So far it seems like the only thing that isn't exposed publicly is the binding extensions.

    Read the article

  • wcf possible to override the dipose of proxy

    - by pdiddy
    I'd like to override the Dispose method of generated proxy (ClientBase) because of the fact that disposing of a proxy calls Close and can throw an exception when the channel is faulted. The only way I came up was to create a partial class to my generatedproxy, make it inherit from IDisposable. : public partial class MyServiceProxy : IDisposable { #region IDisposable Members public void Dispose() { if (State != System.ServiceModel.CommunicationState.Faulted) Close(); else Abort(); } #endregion } I did some test and my Dipose method is indeed called. Do you see any issue with this strategy? Also, I don't like the fact that I'll have to create this partial class for every generated proxy. It be nice if I was able to make my proxy inherit from a base class...

    Read the article

  • WCF Endpoint rounting

    - by Dmitriy Sosunov
    Hi, Guys, how to route inbound message between different endpoints. I need to expose the single endpoint that could accept different credentials. I guess, solve this by intercept the incoming message and based on message header then do forward message to appropriate endpoint. Thanks.

    Read the article

  • Weird exception in WCF server

    - by sevavladimirov
    Strange exception occurred, when I tried to call the action in my proxy class exception message: The message could not be processed because the action 'http://testservice//reports/IReportService//Report' is invalid or unrecognized.

    Read the article

  • WCF Web/ServiceHost - Singletons and initialisation

    - by Kyle
    I have some Service class which is defined as InstanceContextMode.Single, and is well known in the hosting application. (The host creates an instance, and passes that to the WebServiceHost) Hosting app:WebServiceHost host = null; SomeService serviceInstance = new SomeService("text", "more text"); host = new WebServiceHost(serviceInstance, baseUri); Problem: When I go to use the variables initialised when the service is created (ie, when a call is made to the service), they are either null or empty... Am I wrong in assuming that as the instance being initialised in the hosting application is used for each request to the WebServiceHost? Any pointers here would be great.

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >