Search Results

Search found 135 results on 6 pages for 'wcfservice'.

Page 5/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Consuming a HTTPS Web Service in .Net 3.5 Web Project

    - by Chris M
    I'm trying to consume a webservice that ONLY runs on HTTPS but using the "add service" method in VS or using the WSDL to generate a code file leaves me with a web service that states its http... <wsdl:service name="OGServ"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">XML Web Services element of OGServ Gateway</wsdl:documentation> <wsdl:port name="OGServSoap" binding="tns:OGServSoap"> <soap:address location="http://ogserv.domain.co.uk/ogwsrv/og.asmx" /> </wsdl:port> <wsdl:port name="OGServSoap12" binding="tns:OGServSoap12"> <soap12:address location="http://ogserv.domain.co.uk/ogwsrv/og.asmx" /> </wsdl:port> </wsdl:service> Would this be the reason that even when I change the app.config (generated by the add-service) endpoint address to https it says it was expecting HTTP? The error: EC.Tests.OGGatewayLayerTest (TestFixtureSetUp): System.ArgumentException : The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via

    Read the article

  • Consuming a WCF Service

    - by Lijo
    Hi I created a WCF service which is hosted in windows service. I created a proxy using svcutil “svcutil.exe http://localhost:8000/ServiceModelSamples/FreeServiceWorld?wsdl” It generated an output.config file and proxy class. The output.config has the following element <client> <endpoint address="http://localhost:8000/ServiceModelSamples/FreeServiceWorld" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IWeather" contract="IWeather" name="WSHttpBinding_IWeather"> <identity> <servicePrincipalName value="host/D471DTRV.ustr.com" /> </identity> </endpoint> </client> I created a website (as client) and added a new C# file (MyFile.cs) into it. I copied the contents of the proxy class into MyFile.cs. [The output.config is not copied to the web site] In the code behnid of aspx, I am using the following code WeatherClient client= new WeatherClient("WSHttpBinding_IWeather"); It throws an exception as “Could not find endpoint element with name 'WSHttpBinding_IWeather' and contract 'IWeather' in the ServiceModel client configuration section.” Could you please help me to understand the missing link here? Thanks Lijo

    Read the article

  • Sending string to wcf service using jquery ajax. why can i only send strings of numbers?

    - by Robodude
    Hi Guys, For some reason, I'm only able to pass strings containing numbers to my web service when using jquery ajax. This hasn't been an issue so far because I was always just passing IDs to my wcf service. But I'm trying to do something more complex now but I can't figure it out. In my interface: [OperationContract] [WebInvoke(ResponseFormat = WebMessageFormat.Json)] DataTableOutput GetDataTableOutput(string json); My webservice: public DataTableOutput GetDataTableOutput(string json) { DataTableOutput x = new DataTableOutput(); x.iTotalDisplayRecords = 9; x.iTotalRecords = 50; x.sColumns = "1"; x.sEcho = "1"; x.aaData = null; return x; } Javascript/Jquery: var x = "1"; $.ajax({ type: "POST", async: false, url: "Services/Service1.svc/GetDataTableOutput", contentType: "application/json; charset=utf-8", data: x, dataType: "json", success: function (msg) { }, error: function (XMLHttpRequest, textStatus, errorThrown) { //alert(XMLHttpRequest.status); //alert(XMLHttpRequest.responseText); } }); The above code WORKS perfectly. But when I change x to "t" or even to "{'test':'test'}" I get a Error 400 Bad Request error in Firebug. Thanks, John EDIT: Making some progress! data: JSON.stringify("{'test':'test'}"), Sends the string to my function! EDIT2: var jsonAOData = JSON.stringify(aoData); $.ajax({ type: "POST", async: false, url: sSource, contentType: "application/json; charset=utf-8", data: "{'Input':" + jsonAOData + "}", dataType: "json", success: function (msg) { }, error: function (XMLHttpRequest, textStatus, errorThrown) { //alert(XMLHttpRequest.status); //alert(XMLHttpRequest.responseText); } }); EDIT3: I modified the code block I put in EDIT2 up above. Swapping the " and ' did the trick! $.ajax({ type: "POST", async: false, url: sSource, contentType: "application/json; charset=utf-8", data: '{"Input":' + jsonAOData + '}', dataType: "json", success: function (msg) { }, error: function (XMLHttpRequest, textStatus, errorThrown) { //alert(XMLHttpRequest.status); //alert(XMLHttpRequest.responseText); } }); However, I have a new problem: public DataTableOutput GetDataTableOutput(DataTableInputOverview Input) { The input here is completely null. The values I passed from jsonAOData didn't get assigned to the DataTableInputOverview Input variable. :(

    Read the article

  • static wsdl for a certain end point

    - by Costa
    Hi A certain EndPoint in a web service is not likely to change a lot, also it had a problem which we worked around by putting a static wsdl to the whole web service like this <serviceMetadata httpGetEnabled="true" httpGetUrl="" externalMetadataLocation="http://IP:8250/wsdl.xml"/> Now I want the rest of end points to have a wsdl dynamically created, and one end point which require a static WSDL. I think this is impossible because there is one WSDL per WCF service.

    Read the article

  • Service behavior not being applied correctly

    - by Rubans
    I have a custom behavior for a service where I want to specify a receive timeout value, I have created a behavior and on the build service header. I use the declarative attribute to apply the behavior or as I thought. But the behavior seems to make no difference, i.e. the set timeout value is not being applied as expected. However when I have noticed the behavior is only being applied when the host is opened rather than when created. The same behavior when applied explicitly through does work. Any ideas? Behavior: [AttributeUsage(AttributeTargets.Class)] public class BuildServiceBindingBehavior : Attribute, IServiceBehavior { public BuildServiceBindingBehavior( string p_receiveTime ) { ReceiveTimeout = TimeSpan.Parse( p_receiveTime ); } #region IServiceBehavior Members public void AddBindingParameters( ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, System.Collections.ObjectModel.Collection<ServiceEndpoint> endpoints, System.ServiceModel.Channels.BindingParameterCollection bindingParameters ) { } public void ApplyDispatchBehavior( ServiceDescription serviceDescription, ServiceHostBase serviceHostBase ) { // add this behavior to each endpoint foreach ( var endPoint in serviceDescription.Endpoints ) { endPoint.Binding.ReceiveTimeout = ReceiveTimeout; } } public void Validate( ServiceDescription serviceDescription, ServiceHostBase serviceHostBase ) { } #endregion internal TimeSpan ReceiveTimeout { get; set; } } Service code: [ServiceBehavior(Name = "DotNetBuildsService", InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Single )] // Set receieve time out [BuildServiceBindingBehavior( "0:0:1" )] public class BuildService : IBuildTasksService { //implementation code }

    Read the article

  • Returning EF entities using WCF - Read only web service / public API

    - by alex
    I'm currently migrating an application from Linq-to-SQL & ASP.net Web Services (asmx) to Entity Framework and WCF. My question is, I have a bunch of POCO classes which i have xml mapping files for (for the linq to sql) I've replaced my linq to sql with an entity framework data model I've got an interface - something like IService - that has all the methods on it that i need my service to implement - for example: Product[] GetProductsByKeyword(string keyword); In the above case, Product is a POCO. I now have them as entities within my ef data model - i'm using .net 4, and could take advantage of poco support, but don't really see the need - This service is strictly read only. What's the best way of returning entities in my WCF service? I want it to support other client platforms, not just .net (so php guys could use it)

    Read the article

  • VS 2010 Error “Object reference not set to an instance of an object” when adding Service Reference f

    - by Andy
    I have a VS2010 (RTM) solution which contains: WCF Service project Console WCF client project Class project for DataContracts and members Class project for some simple classes I successfully added a service reference in the console client project and ran the client. I then did a long dev cycle repeatedly modifying the service then updating console service reference. I then changed the namespace and assembly names for the projects as well as the .cs using references and app.config. I of course missed some things as it would not build so I eventually removed the project references and the service reference, cleaned and built successfully. I then attempted to add the service reference again, it discovered it but threw the “Object reference not set to an instance of an object” when OK'ing. Fix in answer below...

    Read the article

  • C# WCF and Object Inheritence

    - by Michael Edwards
    I have the following setup of two classes: [SerializableAttribute] public class ParentData{ [DataMember] public string Title{get;set;} } [DataContract] public class ChildData : ParentData{ [DataMember] public string Abstract{get;set;} } These two classes are served through a WCF service. However I only want the service to expose the ChildData class to the end user but pull the marked up DataMember properties from the parent. E.g. The consuming client would have a stub class that looked like: public class ChildData{ public string Title{get;set;} public string Abstract{get;set;} } If I uses the parent and child classes as above the stub class only contains the Abstract property. I have looked at using the KnownType attribute on the ChildData class like so: [DataContract] [KnownType(typeOf(ParentData)] public class ChildData : ParentData{ [DataMember] public string Abstract{get;set;} } However this didn't work. I then applied the DataContract attribute to the ParentData class, however this then creates two stub classes in the client application which I don't want. Is there any way to tell the serializer that it should flatten the inheritance to that of the sub-class i.e. ChildData

    Read the article

  • Calling asynchronous methods from wcf service

    - by hima
    In my asp.net application, I am using wcf service to get all the business logic. I am using that service reference in my application to work with that. Now adding that service reference is giving another option Update service reference is giving Generate asynchronous operations. If I check the option and add the service will it generate asynchronous methods for my existing service. If so how do I use the metohd. Let me know the way for that. Thanks, Hima.

    Read the article

  • Two DomainContext or data sources with WCF RIA - Silverlight page

    - by Mayur Kotlikar
    I am writting a Silverlight Business Application with WCF RIA link. I have 2 databases on same SQL server, Public and Private. The Public database contains a table which is mostly for public access level, like "user" table which has basic user information The Private database contains a table which has "private" information, user bank transactions etc I created 2 ADO.Net entity models, one each for Private and Public database and selected the tables. I also created 2 different domain context services On on Silverlight page, I need to get information from the tables that are across 2 databases, Private and Public as described above. How do I achieve this? I am thinking of some kind of a wrapper that internally gets data from domain services. Whats the best approach?

    Read the article

  • Get Dataset returned from an ajax enabled wcf service....

    - by Pandiya Chendur
    I call an ajax enabled wcf service method , <script type="text/javascript"> function GetEmployee() { Service.GetEmployeeData('1','5',onGetDataSuccess); } function onGetDataSuccess(result) { Iteratejsondata(result) } </script> and my method is , [OperationContract] public string GetEmployeeData(int currentPage,int pageSize) { DataSet ds = GetEmployeeViewData(currentPage,pageSize); return GetJSONString(ds.Tables[0]); } My Dataset ds contains three datatable but i am using the first one for my records... Other two datatables have values how can i get them in result... function onGetDataSuccess(result) { Iteratejsondata(result) } Any suggestion...

    Read the article

  • WCF: operations with out parameters are not supported

    - by Budda
    I've created a simple WCF service inside of WebApplication project. [ServiceContract(Namespace = "http://my.domain.com/service")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class MyService { [OperationContract] public string PublishProfile(out string enrollmentId, string registrationCode) { enrollmentId = null; return "Not supported"; } built - everything is compiled successfully After that I've tried to open service in browser, I've got the following error: Operation 'PublishProfile' in contract 'MyService' specifies an 'out' or 'ref' parameter. Operations with 'out' or 'ref' parameters are not supported Can't I use 'out' parameters? What is wrong here? Thanks

    Read the article

  • How to pass int value to a ajax enabled wcf service method?

    - by Pandiya Chendur
    I am calling an ajax enabled wcf service method from my aspx page... <script type="text/javascript"> function GetEmployee() { Service.GetEmployeeData('1','5',onGetDataSuccess); } function onGetDataSuccess(result) { Iteratejsondata(result) } </script> and my method doesn't seem to get the value [OperationContract] public string GetEmployeeData(int currentPage,int pageSize) { DataSet dt = GetEmployeeViewData(currentPage,pageSize); return GetJSONString(dt.Tables[0]); } when i used a break point to see what is happening in my method currentPage has a value0x00000001 and pageSize has 0x00000005 Any suggestion what am i doing wrong....

    Read the article

  • Under what circumstances does it make sense to run a WCF client and server on the same machine?

    - by Rising Star
    In Learning WCF, by Michele Bustamante, there is a section that describes a binding called the NetNamedPipes binding. The books says that this binding can only be used for WCF services that will be called exclusively from the same machine. Under what circumstances would it make sense to use this? Ordinarily, I would write asynchronous code without using WCF... Why would Microsoft provide something for WCF that can only run on the same machine?

    Read the article

  • Configure WCF Service Behavior using database

    - by Achhar
    We use database to centralize our configuration. As part of it, I want to store the standard service behaviors configuration like expose service metatdata, service debug, service throttling for a service inside database rather than in web/app.config. I was planing to store the configuration for a behavior in database as XML. For e.g. <serviceDebug includeExceptionDetailsinFault=true / What I am struggling with is once I read this XML from database how do I create ServiceDebugBehavior instance from it and apply it to my service host? I have tried using XML Serializer but didn't had success. Any thoughts on how this could be achieved or any alternate solutions?

    Read the article

  • When should I use OperationContextScope inside of a WCF service?

    - by blinton
    I'm currently working on a WCF service that reaches out to another service to submit information in a few of its operations. The proxy for the second service is generated through the strongly typed ProxyFactory<T> class. I haven't experienced any issues but have heard I should do something like the following when making the call: using (new OperationContextScope((IContextChannel)_service)) _service.Send(message); So my question is: when is creating this new OperationContextScope appropriate, and why? Thanks!

    Read the article

  • WCF No EndPoint Listening

    - by doop
    I have a WCF Service hosted w/n IIS that has the following host header: WcfService.xxx.com. I'm able to successfully browse via IE to my service with the address subdomain.xxx.com/ServiceName.svc. I'm trying to consume the WCF Service via a ASP.NET Web application that has the following host header subdomain2.xxx.com. I've added the service reference correctly in the web.config to /WcfService.xxx.com/ServiceName.svc, but get the error(s): "The remote name could not be resolved: 'WcfService.xxx.com'" "There was no endpoint listening at http://WcfService.xxx.com/ServiceName.svc that could accept the message. This is often caused by an incorrect address or SOAP action" Any direction/help would be appreciated.

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >