Problems hosting a .NET service using a service link created using SvcUtil.exe: wrapper mode XmlSerializer errors

Sorry for the headline, but this is the best I can do now ...

My problem is this:

  • Here http://www.opcfoundation.org/webservices/XMLDA/1.0/ I use VS2010 to create a link to the service. I create it without any problems.

  • I want to implement a service interface that creates my service. Therefore, I implement the Service interface.

  • I am creating an svc file:

    <% @ServiceHost Language = "C #" Debug = "true" Service = "Full class name (class that implements the service interface)"%>

OK, I got the following:

The XmlSerializer System.Xml.Serialization.XmlAttributeAttribute attribute is not valid in LocaleID. Only XmlElement, XmlArray, XmlArrayItem, XmlAnyAttribute and XmlAnyElement attributes are supported when IsWrapped is true.

Let me point out the following: Do not ask me about the Web.config file whether it has service model configuration parameters or not, it’s not, the same problem persists.

What a problem ???

I was wondering how to solve this, I would like to note that in the past someone used wsdl.exe to create an asp.net service link that uses WebService and WebMethod as service attributes, this approach does not lead to this error. But I would like to use WCF ...

Thankyou

+4
source share
2 answers

This link will help you, it has a direct explanation of the problem and possible ways out.

+1
source

I had the same problem with the OPC DA specification. I switched to the old .NET web services (web link instead of service link). .NET Web Services accepts the standard WSDL specification for OPC foundation.

These are the steps I took to create such a proxy:

This is not an ideal solution, but it hits, creating its own shell.

0
source

All Articles