• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Web services core problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Web services core problem


  • Subject: Web services core problem
  • From: Vaibhao <email@hidden>
  • Date: Fri, 19 Nov 2010 12:48:41 +0530


Hi

I m using Web Services Core framework to access a https based SOAP- Web service .But I am getting a error as
"/FaultCode" = -65794;
"/FaultExtra" = {
domain = -1;
error = -65795;
msg = "No valid XML data in response";
};
"/FaultString" = "/CFStreamFault";
And In WSDebugInBody , It says "The server encountered an internal error () that prevented it from fulfilling this request.(http status code 500)"



Actually , I have made first call to web service successfully . But when I make second call to web service for authentication by passing username and password , I am getting error mentioned above. So,how to get rid of this error ?



In the technical requirements of web service , it is mentioned that
"The web service client must support accepting cookies from server and resending them back in HTTP header lines in subsequent web service calls. After server authenticates a user successfully through web service, a session cookie will be sent back in response to the web service client. The client must submit this cookie in all subsequent interaction with the server. Otherwise, any request without this cookie will be blocked out."


Would I need to send back cookies to make second call?

Actually , I am getting response headers  from first call as

/WSDebugInHeaders" =     {
        Connection = close;
        "Content-Type" = "text/xml;charset=\"utf-8\"";
        Date = "Thu, 18 Nov 2010 13:35:50 GMT";
        Server = Apache;
        "Transfer-Encoding" = Identity;
    };

Looking at response headers, how can I send cookies using Web servcies core ? Do I really need to send it ?


I have also tried to make web service call using NSURLConnection. Still I am getting the same error(http status code 500) for the second call .


Its Response headers :
Connection = "Keep-Alive";
"Content-Type" = "text/xml;charset=\"utf-8\"";
Date = "Fri, 19 Nov 2010 06:39:02 GMT";
"Keep-Alive" = "timeout=15, max=100";
Server = Apache;
"Transfer-Encoding" = Identity;
From response headers , I tried to collect cookies ,but its is returning zero objects as response headers does not contain field like cookie name ,expiration date and so on.



//fields is dictionary containing response headers
NSArray* allCookies =
[NSHTTPCookie cookiesWithResponseHeaderFields:fields forURL: [NSURL URLWithString:url]];


Since I am not getting cookie from the first call, how can I attach it with second call.



So what I think after I get authenticated with web service , I will get session cookie in response headers and will send it to each subsequent web service calls. How can I send session cookie with the help of web-services core ?Finally , I would like to go with web services core as it is easy to make a call rather than making soap request and then using NSURLConnection. Surprising thing for me is all calls are succeeded from windows platform .

Any suggestion /comments /ideas are welcome. Thanks in advance.

Vaibhao Mahore






DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. _______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: how to add a custom view (a pair of controls) to an NSToolbar in Interface Builder
  • Next by Date: Problem with soap based https Web service call using Web Services core
  • Previous by thread: Re: how to add a custom view (a pair of controls) to an NSToolbar in Interface Builder
  • Next by thread: Problem with soap based https Web service call using Web Services core
  • Index(es):
    • Date
    • Thread