简体   繁体   中英

HTTP unsupported Media type issue

i use WCF with ios application, and when request for some method, IIS returns me 415 error, Not Supported Media Type. Proxy class are generated through wsdl2objc, the same call from windows application works fine

The problem is probably in your WCF service configuration, specifically the binding you're using. I suppose you have configured it to use either custom binding or WSHttpBinding , but in either way the service expects application/soap+msbin1 mime type, but the requests made by the generated classes from wsdl2objc are with text/xml . I'm not quite sure how to fix it, but start by configuring your service for the standard BasicHttpBinding and give it a try. Also revert all changes you've made on the generated code from wsdl2objc.
Btw WSHttpBinding uses SOAP 1.2 and I'm not sure if wsdl2objc can work with it (i have tested it only with BasicHttpBinding ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM