A nice feature in XSD is the IDREF restriction, e.g.:
<xs:restriction base="xs:IDREF">
<xs:pattern value="[0-9a-zA-Z\-]+"/>
</xs:restriction>
I used this restriction with great benefit in a Java JAXWS-project.
An object serialized in a SOAP XML datamodel can hold a reference (pointer) to another object in the same SOAP message.
I w...
Suppose I want to create a (stateless) WCF service with three methods exposed on an endpoint: performSqlOperationA(), performSqlOperationB(), and performSqlOperationC(). Each method inserts data into a SQL database.
The way I've seen things done at my office, each method would begin with code to initialize a SqlConnection object. Each...
Hi,
I have Silverlight 4.0 client calling WCF data service, in the service I have write allow to all (I know that is not very wise, but I want to test it first):
public static void InitializeService(DataServiceConfiguration config)
{
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
...
When using System.Diagnostics TraceSource for logging/tracing, is there a difference between using TraceSource.TraceTransfer and TraceSource.TraceEvent(TraceEventType.Transfer, ... ?
In our environment, we will be developing a number of services that will communicate via WCF. We are also evaluating what platform we should use for loggi...
Hi All,
I need a bit of WCF help. This project uses message contracts. The transport seems to work ok. I have this code for a response type.
namespace tpoke.Contracts
{
[MessageContract(IsWrapped = true)]
public class AuthenticationResponseMC
{
[MessageBodyMember(Name = "authentication-token")]
public Guid Authenticatio...
Get the error message "There was no endpoint listening at http://subdomain.domain.com, This is often caused by an incorrect address or SOAP action. See InnerException"
Any suggestions?
...
I'm essentially writing a broker service.
The requirement is that I write an API that acts as an intermediary broker between our in-house developed services and a 3rd party provided API. The intention being that my API abstract the actual communication with the 3rd party API from our internal systems. The architect on the project chose...
How would I accomplish what Salesforce.com does for logging in with WCF? I would like to have an authentication service that returns a token on a correct login. Then, each set of service calls would pass the token back. I don't want to pass the token on each method call.
What is throwing me is how the session header is part of the bindi...
I have service hosted in IIS5.0 and configured such way :
**
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<behaviors>
<endpointBehaviors>
<behavior name="GalleriesBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service name="Galleries">
<endpoin...
In our production environment, our WCF services are serialized with the XMLSerializer. To do so our service interfaces have the [XMLSerializerFormat] attribute. Now, we need to change to DataContractSerializer but we must stay compatible with our existing clients. Therefore, we have to expose each service with both serializers.
We have ...
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 th...
I'm looking for at using ServiceStack for the services part of a web application instead of rolling my own. Anyone have any experience using it? Any C#/.Net alternatives I should consider?
...
how can i call service from a ssl enabled website to a WCF service with basicHTTPBinding.
i am getting the error
The requested service, 'http://10.5.1.111/HRMSService/VehicleMaintenance/VehicleMaintenance.svc/test' could not be activated. See the server's diagnostic trace logs for more information.
Description: An unhandled exception...
UPDATE 10/19/2010
I know I asked this question a while ago, but the workarounds shown in these answers are hardly satisfactory, and this is still a common problem for many. WCF just isn't flexible. I started my own open source C# library for creating REST services without WCF. Check restcake.net or rest.codeplex.com for info on said l...
I have created an OData/WCF service using Visual Studio 2010 on Windows XP SP3 with all current patches installed.
When I click on "view in browser", the service opens and I see the 3 tables from my EF model. However, when I add a table name ("Commands" in this case) to the end of the query string, rather than seeing the data from the...
Dear ladies and sirs.
I would like to formulate a contrived scenario, which nevertheless has firm actual basis. Imagine a collection type COuter, which is a wrapper around an instance of another collection type CInner. Both implement IList (never mind the T).
Furthermore, a COuter instance is buried inside some object graph, the root o...
I want to add some authentication to my odata service. Depending on the user calling i want to: filter rows and/or remove columns.
I read in scott hanselmans fine blogpost on odata ( http://www.hanselman.com/blog/CreatingAnODataAPIForStackOverflowIncludingXMLAndJSONIn30Minutes.aspx )that it is possible to intercept the incoming queries...
I want to add some authentication to my odata service. The authorization token i want to include in the url as param so that the url can be used in excel
How would one be able to receive and parse any addition param supplied in the url before the odata service does it's thing?
(i'm using entitie framework and wcf dataservices)
...
Ok, I know I am missing something here. I have the following operation contract:
public double DivideByZero(int x, int y)
{
if (y == 0)
{
throw new FaultException<ArgumentException>
(new ArgumentException("Just some dummy exception")
,new FaultReason("some very bogus reason"), new...
Hi.
I'm a newbie to WCF, trying to perform relatively simple task.
I'm trying to return list of objects read from the database but cannot overcome some really annoying exceptions.
The question is very simple? What's wrong with the picture?
[ServiceContract]
public interface IDBService
{
[OperationContract]
string Ping(st...