rameshhari / wsdl2objc

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

I have a request to the server, but It is wrong when the results of running the console #132

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I have a request to the server, but It is wrong when the results of running the 
console 

What is the expected output?
Return a NSString

What do you see instead?
   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"

What version of the product are you using? On what operating system?
   WSDL2ObjC-0.7-pre1  +  Mac OS Leopard 10.5
   Xcode 3.12

Please provide any additional information below.

Original issue reported on code.google.com by lingxin...@gmail.com on 28 Feb 2011 at 7:50

GoogleCodeExporter commented 9 years ago
Did you use SOAP 1.2 ?
Looks like you're sending SOAP 1.1 to a SOAP 1.2 server.

Original comment by hasse...@gmail.com on 28 Feb 2011 at 8:25

GoogleCodeExporter commented 9 years ago
    LocalTimeSoap12Binding *binding=[[LocalTimeSvc LocalTimeSoap12Binding] initWithAddress:@"http://www.ripedevelopment.com/webservices/LocalTime.asmx"];
    binding.logXMLInOut=YES;

    LocalTimeSvc_LocalTimeByZipCode *request=[[LocalTimeSvc_LocalTimeByZipCode alloc] init];
    request.ZipCode=@"29687";

    LocalTimeSoap12BindingResponse *resp=[binding LocalTimeByZipCodeUsingParameters:request];
    for(id mine in resp.bodyParts)
    {
        if([mine isKindOfClass:[LocalTimeSvc_LocalTimeByZipCodeResponse class]])
        {
            NSLog(@"%s",[mine LocalTimeByZipCodeResult]);
        }
    }

Original comment by lingxin...@gmail.com on 1 Mar 2011 at 2:03

GoogleCodeExporter commented 9 years ago
How to set the default soap1.2

Original comment by lingxin...@gmail.com on 1 Mar 2011 at 3:04

GoogleCodeExporter commented 9 years ago
Well if you're using the Soap12 methods (which you are), the request should 
send "application/soap+xml" and expect to receive the same. I'd need to see 
what you're sending to the server.

Original comment by hasse...@gmail.com on 1 Mar 2011 at 5:42

GoogleCodeExporter commented 9 years ago
Thank you very much.
The issue have been solved.

Original comment by lingxin...@gmail.com on 4 Mar 2011 at 2:28

GoogleCodeExporter commented 9 years ago

Original comment by hasse...@gmail.com on 4 Mar 2011 at 6:32