WCF Retrieving Metadata Issue

  • Thread starter Thread starter Junoti
  • Start date Start date
J

Junoti

Hello,

I've done some research prior to posting this, but I can't seem to
resolve an issue when I try to add a Service Reference to my
application. I can successfully add a reference for the "GoalService",
but nothing I try allows me to add one for the ComboService. Is there
something I'm missing? Here is my config file:

<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="metadataSupport">
<serviceMetadata />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="metadataSupport"
name="ComboService">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8080/ComboService"/>
</baseAddresses>
</host>
<endpoint address=""
binding="netTcpBinding"
contract="IComboService" />
<endpoint address="mex"
binding="mexTcpBinding"
contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="metadataSupport"
name="GoalService">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8080/GoalService"/>
</baseAddresses>
</host>
<endpoint address=""
binding="netTcpBinding"
contract="IGoalService" />
<endpoint address="mex"
binding="mexTcpBinding"
contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
 
I use the Svcutil.exe - ServiceModel Metadata Utility Tool against my
metadata files to build up a code file.
On the other hand why so complex rather have a simple file that will
be easier to go through like the MS Example http://msdn2.microsoft.com/en-us/library/ms735109.aspx


<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ISampleService"
closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32"
maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName"
algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8080/SampleService"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ISampleService"
contract="ISampleService"
name="BasicHttpBinding_ISampleService" />
</client>
</system.serviceModel>
</configuration>


for more in formation goto http://www.auratius.co.za

Regards

auratius
 
Thanks for the feedback. I started off with a file generated using
svcutil.exe, and then modified it by hand. However, I found the issue
that is not related to the config file. My object had a property that
was not marked with the datamember contract, so I'm assuming it was
not being serialized properly. Once I found this, I was able to add a
service reference successfully. Thanks again for the help.
 
Back
Top