This project is read-only.

<ServiceContract> and <DataMember> not added to code.

Sep 15, 2009 at 3:42 PM

I noticed when creating the svc and the interface class there are several problems.  One, the interface does not have the <ServiceContract> and <DataMember> directives and also the underline vb for the svc is not reference and named correctly.  For instance a Test.svc does not have a file create with the name test.svc.vb, but instead has a test.vb file created.   I would appreciate any help.

Sep 17, 2009 at 2:26 PM

Hi Michael,

Thanks for the feedback. I have done some testing and have not found been able to reproduce the problem with the service interface missing the ServiceContract attribute. If you have a WSDL that reproduces this behaviour I would be happy to take a look.

In regards to the DataMember attribute, WSCF.blue uses the XmlSerializer along with the MessageContract attribute on the type that will become the message. This attribute allows us to control what will be in the message body and what will be in the message header. Members that are to be part of the message body should have a MessageBodyMember attribute. Please let me know if this is not the case for you.

Finally, the .svc file that is generated should point to the service implementation type that the WCF infrastructure will be creating a ServiceHost instance for. The service implementation type can exist in any file that is compiled and correctly referenced in the .svc file. Is the naming convention for the files causing a problem for you?

Regards,

Alex.

Sep 17, 2009 at 3:20 PM

Hi Alex,

Thank you very much for your response.  Please see the attached project zip file (rename .txt to .zip extension) and the web service generation settings.  I see the memberbodyattribute and the operationcontractattribute now so that is ok.  The one thing I’m still having problems with is that the svc file.  I thought that the svc file should already be attached with the code behind code.  Also, I still cannot enable the wsdl end point because I get the error below.  I appreciate any help you can provide.

From: alexmeyergleaves [mailto:notifications@codeplex.com]
Sent: Thursday, September 17, 2009 8:27 AM
To: Garcia, Michael
Subject: Re: <ServiceContract> and <DataMember> not added to code. [WSCFblue:68990]

From: alexmeyergleaves

Hi Michael,

Thanks for the feedback. I have done some testing and have not found been able to reproduce the problem with the service interface missing the ServiceContract attribute. If you have a WSDL that reproduces this behaviour I would be happy to take a look.

In regards to the DataMember attribute, WSCF.blue uses the XmlSerializer along with the MessageContract attribute on the type that will become the message. This attribute allows us to control what will be in the message body and what will be in the message header. Members that are to be part of the message body should have a MessageBodyMember attribute. Please let me know if this is not the case for you.

Finally, the .svc file that is generated should point to the service implementation type that the WCF infrastructure will be creating a ServiceHost instance for. The service implementation type can exist in any file that is compiled and correctly referenced in the .svc file. Is the naming convention for the files causing a problem for you?

Regards,

Alex.

Read the full discussion online.

To add a post to this discussion, reply to this email (WSCFblue@discussions.codeplex.com)

To start a new discussion for this project, email WSCFblue@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com