none
WCF binary message encoding & compression as SOAP request from http client RRS feed

  • Question

  • Hello,
    I have a wcf service with following custom binding.

    <customBinding>
            <binding name="BinaryCompressionBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00">
              <binaryMessageEncoding  compressionFormat="GZip"/>
              <httpTransport allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2097152" maxBufferPoolSize="524288" maxReceivedMessageSize="2097152" transferMode="Buffered" useDefaultWebProxy="true"/>
            </binding>
    </customBinding>

    And service is configured as below:

    <service name="CoreService">
            <endpoint binding="customBinding" bindingConfiguration="BinaryCompressionBinding" contract="ICoreService" address="compressed" />
          </service>

    I am looking to capture SOAP request and fire from postman. Could you please throw some light and suggest how to go about?

    Thanks
    Kalai

    Thursday, August 10, 2017 5:11 PM

All replies

  • Hi Kalai,

    >> I am looking to capture SOAP request and fire from postman. Could you please throw some light and suggest how to go about?

    Could you share us the reason you need SOAP Request? I am afraid it is impossible to send this request in PostMan.

    I have created a simple WCF Service with provided configuration, and create a corresponding client. The client send request and receive response correctly.

    I have tried to use Fiddler to capture the request, but it did not capture the request.

    I have tried using WCF Test client which could get SOAP Request, but when I used it in PostMan, it throws error “Cannot process the message because the content type 'application/soap+xml;charset=UTF-8;action="http://tempuri.org/IService1/GetData"' was not the expected type 'application/soap+msbin1+gzip'”, but there is no 'application/soap+msbin1+gzip' in postman.

    I even tried using WCF IClientMessageInspector, the request is the same as in Test Client, and it did not work either.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, August 11, 2017 5:59 AM
  • Hi Edward,

    Thank you for the note. I am looking to capture SOAP request to do monitoring from Runscope.

    Regards,

    Kalai

    Friday, August 11, 2017 8:59 PM
  • Hi Kalai,

    Have you captured the SOAP request from Runscope?

    If you have, what is the captured result?

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, August 14, 2017 2:08 AM
  • I haven't captured request. I was trying to capture request using ReadyAPI and Fiddler. Also converted request to XML using WCF-Binary-Message-Inspector (Extension available in NuGet). Tried passing XML body with different encoding for, so for no luck.

    Appreciate if you throw some light.

    thanks

    Kalai

    Monday, August 14, 2017 9:45 PM
  • Hi Kalai,

    I am not sure whether it is possible.

    You could find my first reply. I already have tried Fiddler and Message Inspector, the captured request did not work for sending.

    I would suggest you generate client code to use WCF Service instead of sending SOAP XML directly.

    Best Regards,

    Edward 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, August 15, 2017 2:21 AM
  • Hi Edward,

    Could you please explain me how to generate client code and how it can be used in runscope?

    thanks

    Kalai

    Tuesday, August 15, 2017 4:41 AM
  • Hi Kalai,

    After checking the documents from Runscope, it’s sad it did not support WSDL import.

    # Testing and Monitoring SOAP/WSDL APIs

    https://www.runscope.com/support/kb/soap-wsdl

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, August 15, 2017 7:39 AM