Issue adding service reference for wcf
Warning 1 Custom tool warning: Cannot import wsdl:binding
Detail: The given key was not present in the dictionary.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://wrapper.dao.ccarwebservice.ids.com']/wsdl:binding[@name='CCaRWebServiceHttpBinding'] C:\Users\me\Documents\Visual Studio 2008 \Projects\CcarsWcfTest\CcarsWcfTest\Service References\ServiceReference1\Reference.svcmap 1 1 CcarsWcfTest
what can I do to resolve this issue?
I've tried running the service utility from the command prompt and adding a service reference to my project. I've also gone into the advanced setting in the Add Service Reference dialog and deselected 'Reuse types in all referenced assemblies'.
EDIT
Here is the part of the wsdl I think it's referring to..
<wsdl:binding name="CCaRWebServiceHttpBinding" type="ns:CCaRWebServicePortType">
<http:binding verb="POST"/>
<wsdl:operation name="fnGetccarprogramsummaryarray">
<http:operation location="CCaRWebService/fnGetccarprogramsummaryarray"/>
<wsdl:input>
<mime:content type="text/xml" part="fnGetccarprogramsummaryarray"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="fnGetccarprogramsummaryarray"/>
</wsdl:outpu开发者_高级运维t>
</wsdl:operation>
<wsdl:operation name="fnGetccarprogramsummary">
<http:operation location="CCaRWebService/fnGetccarprogramsummary"/>
<wsdl:input>
<mime:content type="text/xml" part="fnGetccarprogramsummary"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="fnGetccarprogramsummary"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
public partial class fnGetccarprogramsummaryarrayRequest
{
public fnGetccarprogramsummaryarrayRequest()
{
}
}
the others are like this...
public partial class fnGetccarprogramsummaryRequest
{
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://wrapper.com", Order=0)]
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string programAcronym;
public fnGetccarprogramsummaryRequest()
{
}
public fnGetccarprogramsummaryRequest(string programAcronym)
{
this.programAcronym = programAcronym;
}
}
Where did the WSDL come from? How was it generated?
It could be the the definition of the input and return types are missing.
- fnGetccarprogramsummaryarray
- fnGetccarprogramsummary.
It could be that it is trying to look for the definition in an array of types and not finding it.
EDIT
I think that I found it you have a POST binding and the tool only supports a SOAP binding
http://social.msdn.microsoft.com/Forums/en/wcf/thread/859a2c87-02db-469d-ab65-c558ff091e61
The key that is not present is then the SOAP binding.
After searching.. the only solution I've come across is to ignore this error.
"It is internal implementation detail of svcutil.
The error is probably since the wsdl contains a POST binding and the utlity only works on SOAP bindings. But if there is another SOAP binding in the wsdl it works."
精彩评论