Unable to send a 48681 bytes message to secure wcf service from java

前端 未结 5 2033
野性不改
野性不改 2021-02-09 16:07

I have to call a secure WCF service from java using mutual authentication. Everything works fine except I\'m unable to send messages which are greater than 48680 bytes in size.

相关标签:
5条回答
  • 2021-02-09 16:44

    Have your tried to look at the actual packets being sent - eg. with tcpdump/Wireshark ( http://www.wireshark.org/ ) ?

    I once had problems only on certain platforms reaching a service that was behind a very picky SSL offload engine.

    0 讨论(0)
  • 2021-02-09 16:44

    Finally, I resolved the issue. The problem was the following:

    1. cryptographic service provider of the given .net client supports tls renegotiation
    2. cryptographic provider of the java-client does not support tls renegotiation
    3. on the side of service there was no ClientCertNegotiation option set, so java client was not able to renegotiate.
    4. .net service was not responding to java-client that was waiting for the data, because this service expected a client-certificate, but the client was not able to provide it, as renegotiation is not supported.
    0 讨论(0)
  • 2021-02-09 16:52

    You asked, what could be the problem, here some suggestion:

    • the size of your request. That is basically you assumption, if I understand it right.
    • the structure of your request.
    • a server side policy, like request have to be smaller than 48681 bytes. In a comment you tell us that you are using an external server, not under your control
    • a server side bug. Remember the not under your control part and read it as buggy.
    • a race condition.

    I would suggest to try a wider range of request. Do not only vary the size.

    0 讨论(0)
  • 2021-02-09 16:58

    This could be a SOAP version mismatch. The default version for basichttpbinding is SOAP 1.1. If the java client is using SOAP 1.2 you will get an error.

    We have often seen that the error you get when the SOAP version does not match, has nothing to do with the real erros.

    0 讨论(0)
  • 2021-02-09 17:06

    Have you tried sending in request from SOAPUI tool and checking if it behaves the same way. Also worth looking at the below link that discusses something about WCF Services and Java client.

    Java Client and WCF Service

    0 讨论(0)
提交回复
热议问题