FROM : Niklas Saers
DATE : Mon Apr 21 14:15:25 2008
Just a short PS
On Apr 21, 2008, at 1:45 PM, Niklas Saers wrote:
> TestAuthentication *WS = [[TestAuthentication alloc] init];
> [WS setParameters:param];
> NSLog(@"isComplete == %d, isFault == %d, true == %d", [WS
> isComplete], [WS isFault], YES);
I hadn't noticed that static functions were also present in the stubs,
so I tried them but got the same results. I added a NSLog there as
well, and got the same result:
+ (id) TestAuthentication:(CFTypeRef) in_parameters
{
id result = NULL;
TestAuthentication* _invocation = [[TestAuthentication alloc]
init];
[_invocation setParameters: in_parameters];
result = [[_invocation resultValue] retain];
NSLog(@"debug: isComplete: %d, isFault: %d, true: %d",
[_invocation isComplete], [_invocation isFault], YES);
[_invocation release];
return result;
}
output: debug: isComplete: 1, isFault: 1, true: 1
To decouple this from the complex types, I wrote a little webservice
in C# for MS-IIS called testInt that I've verified with SOAP Client
from Scandalous Software that behaves correctly:
[WebMethod]
int testInt() {
return 5;
}
that returns
<soap:Envelopexmlns:xsd=""xmlns:xsi="<A href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema
instance"xmlns:soap="">
-<soap:Body>
-<testIntResponse xmlns="webservices.mydomain.com/myService">
-<testIntResult>-5</testIntResult>
</testIntResponse>
</soap:Body>
</soap:Envelope>
Again I added debug info to the code:
+ (id) testInt:(CFTypeRef) in_parameters
{
id result = NULL;
testInt* _invocation = [[testInt alloc] init];
[_invocation setParameters: in_parameters];
result = [[_invocation resultValue] retain];
NSLog(@"debug: isComplete: %d, isFault: %d, true: %d", [_invocation
isComplete], [_invocation isFault], YES);
[_invocation release];
return result;
}
and again it failed: debug: isComplete: 1, isFault: 1, true: 1
My call in this case was:
[Service1Service testInt:[[NSDictionary alloc] init]];
That is, an empty dictionary, so no parameters. I tried passing nil,
but then it just crashed
For the authentication I called:
NSDictionary *serviceDict = (NSDictionary*) [myServiceService
TestAuthentication:param];
NSLog(@"Entries: %d", [serviceDict count]);
and I got: "Entries: 0"
So either way isFault returns YES, and either way I get an empty
NSDictionary back. Why is this, and how do I get it to return
correctly? (you'd think it'd be easy enough calling an "int
function()" ;-) )
Cheers
Nik
DATE : Mon Apr 21 14:15:25 2008
Just a short PS
On Apr 21, 2008, at 1:45 PM, Niklas Saers wrote:
> TestAuthentication *WS = [[TestAuthentication alloc] init];
> [WS setParameters:param];
> NSLog(@"isComplete == %d, isFault == %d, true == %d", [WS
> isComplete], [WS isFault], YES);
I hadn't noticed that static functions were also present in the stubs,
so I tried them but got the same results. I added a NSLog there as
well, and got the same result:
+ (id) TestAuthentication:(CFTypeRef) in_parameters
{
id result = NULL;
TestAuthentication* _invocation = [[TestAuthentication alloc]
init];
[_invocation setParameters: in_parameters];
result = [[_invocation resultValue] retain];
NSLog(@"debug: isComplete: %d, isFault: %d, true: %d",
[_invocation isComplete], [_invocation isFault], YES);
[_invocation release];
return result;
}
output: debug: isComplete: 1, isFault: 1, true: 1
To decouple this from the complex types, I wrote a little webservice
in C# for MS-IIS called testInt that I've verified with SOAP Client
from Scandalous Software that behaves correctly:
[WebMethod]
int testInt() {
return 5;
}
that returns
<soap:Envelopexmlns:xsd=""xmlns:xsi="<A href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema
instance"xmlns:soap="">
-<soap:Body>
-<testIntResponse xmlns="webservices.mydomain.com/myService">
-<testIntResult>-5</testIntResult>
</testIntResponse>
</soap:Body>
</soap:Envelope>
Again I added debug info to the code:
+ (id) testInt:(CFTypeRef) in_parameters
{
id result = NULL;
testInt* _invocation = [[testInt alloc] init];
[_invocation setParameters: in_parameters];
result = [[_invocation resultValue] retain];
NSLog(@"debug: isComplete: %d, isFault: %d, true: %d", [_invocation
isComplete], [_invocation isFault], YES);
[_invocation release];
return result;
}
and again it failed: debug: isComplete: 1, isFault: 1, true: 1
My call in this case was:
[Service1Service testInt:[[NSDictionary alloc] init]];
That is, an empty dictionary, so no parameters. I tried passing nil,
but then it just crashed
For the authentication I called:
NSDictionary *serviceDict = (NSDictionary*) [myServiceService
TestAuthentication:param];
NSLog(@"Entries: %d", [serviceDict count]);
and I got: "Entries: 0"
So either way isFault returns YES, and either way I get an empty
NSDictionary back. Why is this, and how do I get it to return
correctly? (you'd think it'd be easy enough calling an "int
function()" ;-) )
Cheers
Nik
| Related mails | Author | Date |
|---|---|---|
| Niklas Saers | Apr 20, 14:07 | |
| Niklas Saers | Apr 21, 13:45 | |
| Niklas Saers | Apr 21, 14:15 | |
| Jeff LaMarche | Apr 21, 15:30 | |
| Niklas Saers | Apr 23, 14:41 | |
| Jeff LaMarche | Apr 23, 16:25 | |
| Niklas Saers | Apr 24, 10:31 | |
| Niklas Saers | Apr 24, 10:40 | |
| Niklas Saers | Apr 25, 09:22 |






Cocoa mail archive

