0

(SOAPAction: "") なしで以下の応答を返すことができる Web サービス メソッドがあります。

方法

public string SyncData(Stream xml)
{

}

web.config

<service behaviorConfiguration="" name="PRO.API">
    <endpoint address="" behaviorConfiguration="web" binding="customBinding"
     bindingConfiguration="RawReceiveCapable" contract="PRO.IAPI" />
</service>

カスタムバインディング

<customBinding>    
<binding name="RawReceiveCapable">
<webMessageEncoding webContentTypeMapperType="PRO.RawContentTypeMapper, PRO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<httpTransport manualAddressing="true" maxReceivedMessageSize="524288000" transferMode="Streamed" />
</binding>
</customBinding>

public class RawContentTypeMapper : WebContentTypeMapper
{
    public override WebContentFormat GetMessageFormatForContentType(string contentType)
    {

        if (contentType.Contains("text/xml")
            || contentType.Contains("application/xml")
            || contentType.Contains("text/html"))
        {

            return WebContentFormat.Raw;

        }

        else
        {

            return WebContentFormat.Default;

        }
    }
}

SOAPAction での必要な応答: ""

Content-Type: text/xml;charset=utf-8 Content-Length: 346 SOAPAction : ""

<soapenv:Envelope" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<syncOrderRelationResponse xmlns="http://www.csapi.org/schema/parlayx/data/sync/v1_0/local">
<result>0</result>
<resultDescription>success</resultDescription>
</syncOrderRelationResponse>
</soapenv:Body>
</soapenv:Envelope>

SOAPAction で応答を取得するにはどうすればよいですか?

「Sample SOAP response」については、このリンクを参照して ください http://support.sas.com/documentation/cdl/en/wbsvcdg/62759/HTML/default/viewer.htm#n1wblekhip1yrln1fv2s5b6a2d9f.htm

4

1 に答える 1