RE: WSMakeStubs code issues
RE: WSMakeStubs code issues
- Subject: RE: WSMakeStubs code issues
- From: "Josh Ferguson" <email@hidden>
- Date: Tue, 11 Feb 2003 11:09:50 -0600
- Priority: normal
- Thread-topic: WSMakeStubs code issues
Dave,
I've also noticed a couple issues with the CFRunLoopRunInMode() (I don't get a hung app, I just occasionally don't get any results). Typically, the reason you'd be getting a link error is because you're not linking the framework into the app. The other issue may be that you're linking against an old version of the framework? It doesn't seem likely that this would be the problem (you'd probably be getting other undefined symbols). One work around would be to try just using @"kWSMethodInvocationTimeoutValue" instead of the constant (I don't know if this will work, but I know a lot of instances where the constant is the same as the actual value). BTW: The constant is actually only declared in the header file, not actually defined.
As far as switching to synchronous, this is alright except that execution of your application will pause while it's waiting to receive the results, so if you have a progress bar or something, it will appear frozen (unless you use threads). This may not be an issue to you, and in that case doing a synchronous call is probably easier.
Josh
-----Original Message-----
From: Dave Kvach [
mailto:email@hidden]
Sent: Tuesday, February 11, 2003 10:45 AM
To: Cocoa Development List
Subject: WSMakeStubs code issues
We're developing a client app in Cocoa using generated code from
WSMakeStubs. We have, for the most part, been successful communicating
with some web services we developed.
But, there is on occasion a situation when this code:
while (fResult == NULL)
CFRunLoopRunInMode(wsGeneratedMode, -1.0, true);
from method getResultDictionary in WSGeneratedObj.m will loop
infinitely and result in a hung app.
So, I tried adding the following code to the createInvocationRef (per
the documentation), trying to set a timeout value for the invocation:
NSNumber *timeout = [NSNumber numberWithInt:10];
WSMethodInvocationSetProperty(ref,
kWSMethodInvocationTimeoutValue, timeout);
[timeout release];
This code compiles fine, the constant kWSMethodInvocationTimeoutValue
is defined in WSMethodInvocation.h along with all the other kWS...
constants, but I get a link error that kWSMethodInvocationTimeoutValue
is an undefined symbol.
What's up wit dat???
Would using synchronous WS calls perform better than asynchronous?
Does WSMakeStubs have any flags to tell it generate certain code,
besides language??
Thanks for any input,
Dave
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.