Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed help on Objective-C code generated from wsdl2objc webservice
    text
    copied!<p>I am new to iPhone development. I am trying out to generate a proxy server at a client side using a wsdl2objc web service. I went through <a href="http://code.google.com/p/wsdl2objc/wiki/UsageInstructions" rel="nofollow">this tutorial</a> and am doing a sample application using this tutorial.</p> <p>Actually I have two strings s1 and s2 I need to concatenate the two strings and display the result on a textfield using a button. I have generated code out of the wsdl2objc file. The name of the generated class is <code>SimpleService</code>.</p> <p>As I am new to iphone development, the generated code contains many methods where I am confused which class to be used. I have a written code which compiles correctly but still its not executing. Where I am going wrong? What corrections need to be done in the following code?</p> <pre><code>@implementation WsdlViewController @synthesize field; -(IBAction)buttonpressed:(id)sender { SimpleServiceSOAP *binding = [SimpleService SimpleServiceSOAP]; binding.logXMLInOut = YES; SimpleService_concat *testParams = [[SimpleService_concat new]autorelease]; testParams.s1 = field.text; // parameters all become properties of this testParams object testParams.s2 = field.text; SimpleServiceSOAPResponse * response = [binding concatUsingParameters: testParams]; [response self]; NSArray * responseBodyParts = response.bodyParts; NSError *responseError = response.error; for (id bodypart in responseBodyParts) { if ([bodypart isKindOfClass:[SimpleService_concat class]]) { SimpleService_concat * body = (SimpleService_concat *)bodypart; field.text = body.s1; field.text = body.s2; } } } </code></pre> <p>u wan me to provide wsdl2objc generated code?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload