기존 웹 서비스에 연결해야합니다.웹 참조가 작동하지만 서비스 참조가 비누 버전에 대해 불만을 제기 함
Visual Studio에서 서비스 참조 추가를 수행 한 다음 서버에 WSDL 파일의 URL을 입력하십시오. 내 서비스가 나타나고 그에 대한 코드를 작성합니다.
내의 app.config는 다음과 같습니다System.ServiceModel.CommunicationException: The envelope version of the incoming message (Soap12 (http://www.w3.org/2003/05/soap-envelope)) does not match that of the encoder (Soap11 (http://schemas.xmlsoap.org/soap/envelope/)). Make sure the binding is configured with the same version as the expected messages.
: 그러나
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="LoginServiceSoap" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://server/Service.asmx" binding="basicHttpBinding"
bindingConfiguration="LoginServiceSoap" contract="Stuff.Login.LoginServiceSoap"
name="LoginServiceSoap" />
</client>
</system.serviceModel>
, 나는 '는를 추가하는 경우, 서비스 벌금와 통신 할 수 있어요 내가 코드를 실행할 때이 오류를 얻을 수 웹 참조 '. 그러나 WebReferences 대신 Service References를 사용하도록되어 있습니다. 나는 내가 위의 설정에서 잘못된 것이 있다고 가정하고있다.
또는 연결하려는 서비스 유형 때문에 웹 참조를 사용해야합니까?
"바인딩이 예상되는 메시지와 동일한 버전으로 구성되어 있는지 확인하십시오." –
존 손더스 (John Saunders), 밀도가 높아서 미안하지만 당신이 요구하는 것을 어떻게하는지 확신하지 못합니까? – sheamus
웹 참조를 사용하여 지금 끝났습니다. – sheamus