2012-09-13 4 views
1

WCF/Service Reference를 통해 웹 서비스 클라이언트 빌드에 적합한 구성을 제시하기 위해 현재 고심하고 있습니다. 바인딩을 생성하고 프로그래밍 방식으로 끝점을 구성 할 수 있었지만 이상적으로는이 설정을 WCF 구성 파일로 옮기고 싶습니다.이러한 프로그램 라인에 필요한 동일한 WCF 구성

Dim mtom As MtomMessageEncodingBindingElement = 
     New MtomMessageEncodingBindingElement(MessageVersion.Soap12, Encoding.UTF8) 

    Dim https As HttpsTransportBindingElement = New HttpsTransportBindingElement() 

    Dim binding As CustomBinding = New CustomBinding() 
    binding.Elements.Add(mtom) 
    binding.Elements.Add(https) 

    client.Endpoint.Binding = binding 

내가 알고 : 그러나 나는 (I ...을 MTOM 및 HTTPS 부분에 대한 더 자세한 설정을 떠난) 그 다음 설정을 일치합니다 거기에 바인딩 고객을 정의하는 방법을 잘 모르겠습니다 customBinding 요소가 필요하고 클라이언트 섹션의 요소를 참조해야하지만 위의 코드 에서처럼 사용자 지정 바인딩이 작동하지 않는 것 같습니다. 어떤 도움을 주셔서 감사합니다.

감사합니다.

답변

0

config의 동일한 사용자 정의 바인딩이 아래에 나와 있습니다.

<customBinding> 
    <binding name="SO_12399887"> 
    <mtomMessageEncoding messageVersion="Soap12" writeEncoding="utf-8" /> 
    <httpsTransport /> 
    </binding> 
</customBinding> 
+0

많은 감사, Carlos! – spse