我有一个客户想要使用WSA Addressing Header。
<wsse:usernameToken>
<wsse:username>DocumentExchangeDEVUnitTest</wsse:username>
<wsse:Password wsse:Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">abc123</wsse:Password>
</wsse:usernameToken>
我已经创建了服务器服务。我很困惑如何使可以接受上述请求的服务(WSA寻址)
由于我正在进行文件传输,因此我在Web配置中使用了MTOM和wshttpbinding
<wsHttpBinding>
<binding name="WsBinding" messageEncoding="Mtom" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" transactionFlow="false" textEncoding="utf-8" >
<security mode="Transport" >
<transport clientCredentialType="None"/>
</security>
<readerQuotas maxArrayLength="2147483647" maxbytesPerRead="2147483647" maxDepth="2147473647" maxNametableCharCount="2147483647" maxStringContentLength="2147483647"/>
</binding>
</wsHttpBinding>
以下是服务
[WebInvoke(Method = "POST",UriTemplate = "UploadDoc")]
[WebMethod(Description = "Save documents to System")]
public void UploadDocGen(RemoteFileInfo remoteFileInfo)
{
string username = "";
-----
}