sanshelly / wsdl2objc

Automatically exported from code.google.com/p/wsdl2objc
MIT License
0 stars 0 forks source link

Error: Unexpected response MIME type to SOAP call:multipart/related #98

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

I sent the request to my server. It succeded answered. But I have no answer on 
my client.

What is the expected output?
Responce as a structure with complex type attribute
What do you see instead?

Error Domain=ReplicationServiceSoap12BindingResponseHTTP Code=1 
UserInfo=0x4d4a740 
"Unexpected response MIME type to SOAP call:multipart/related"

What version of the product are you using? On what operating system?
WSDL2OBJC 0.6, MAC OS Snow Leopard.

Please provide any additional information below.

Original issue reported on code.google.com by keviab...@gmail.com on 2 Jun 2010 at 4:46

GoogleCodeExporter commented 8 years ago
I have noticed this behavior as well, but did not paid too much attention so 
far.
I think it appears when there is no body in the response from the server, but 
only a HTTP header (e.g. with status code 200 in it).

Original comment by pmilosev on 2 Jul 2010 at 5:12

GoogleCodeExporter commented 8 years ago
The server I am trying to talk to sends its response as a "multipart/related" 
message. The cod generated by wsdl2objc aborts and reports the above error. 

The content of the HTTP response looks like this in my case:
{{{
--uuid:f1d7db1f-e3de-4b47-81f3-9ea10c280586
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>

<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:loginResp
onse 
xmlns:ns1="http://shared.bimserver.org/"></ns1:loginResponse></soap:Body></soap:
Envelope>
--uuid:f1d7db1f-e3de-4b47-81f3-9ea10c280586--
}}}

NSURLConnection doesn't seem to be able to unwrap this automatically.

Original comment by aut...@gmail.com on 13 Jul 2010 at 11:56

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
My environment is:
   WSDL2ObjC-0.7-pre1  +  Mac OS Leopard 10.5
   Xcode 3.12

WebService address:
   http://www.ripedevelopment.com/webservices/LocalTime.asmx

The results run the console:
   2011-02-28 10:22:48.379 SayHello[512:207] OutputHeaders:
{
    "Content-Length" = 481;
    "Content-Type" = "application/soap+xml; charset=utf-8";
    Host = "www.ripedevelopment.com";
    Soapaction = "http://www.ripedev.com/LocalTimeByZipCode";
    "User-Agent" = wsdl2objc;
}
2011-02-28 10:22:48.380 SayHello[512:207] OutputBody:
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:LocalTimeSvc="http://www.ripedev.com/" xsl:version="1.0">
  <soap:Body>
    <LocalTimeSvc:LocalTimeByZipCode>
      <LocalTimeSvc:ZipCode>29687</LocalTimeSvc:ZipCode>
    </LocalTimeSvc:LocalTimeByZipCode>
  </soap:Body>
</soap:Envelope>
2011-02-28 10:22:51.654 SayHello[512:207] ResponseStatus: 200
2011-02-28 10:22:51.655 SayHello[512:207] ResponseHeaders:
{
    "Cache-Control" = private;
    Connection = "Keep-Alive";
    "Content-Encoding" = gzip;
    "Content-Length" = 234;
    "Content-Type" = "text/xml; charset=utf-8";
    Date = "Mon, 28 Feb 2011 02:22:44 GMT";
    Expires = "Mon, 28 Feb 2011 02:23:15 GMT";
    "Keep-Alive" = "timeout=5, max=100";
    Server = "Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5 mod_mono/2.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.28 mod_perl/2.0.4 Perl/v5.8.8";
    Vary = "Accept-Encoding,User-Agent";
    "X-Aspnet-Version" = "2.0.50727";
}
2011-02-28 10:22:51.655 SayHello[512:207] ResponseError:
Error Domain=LocalTimeSoapBindingResponseHTTP Code=1 UserInfo=0x3a1de70 
"Unexpected response MIME type to SOAP call:text/xml"

Original comment by lingxin...@gmail.com on 28 Feb 2011 at 7:36

GoogleCodeExporter commented 8 years ago
I am having the same problem any solution possible apart from manually treating 
the soap message. 

Original comment by helene.s...@gmail.com on 23 Jan 2014 at 9:47