SoapFault exception: [HTTP] Unsupported Media Type when accessing Java web-service from PHP

前端 未结 2 1368
甜味超标
甜味超标 2021-01-05 04:50

I\'m trying to connect to a Java web-service using the Zend_Soap_Client from the Zend Framework v1.9.0:



        
2条回答
  •  孤街浪徒
    2021-01-05 05:25

    According to this listing, the exception indicates that the server hosting the web-service is not happy with your requests encoding:

    Indicates that the peer HTTP server does not support the Content-type used to encode the request message. The message exchange is regarded as having completed unsuccessfully.

    So you should check with the web-service provider concerning the content-type/encoding they expect.

    A possible solution if you are using SOAP_1_2is to change to SOAP_1_1 since that will alter the requests made.

提交回复
热议问题