sudzc icon indicating copy to clipboard operation
sudzc copied to clipboard

Problem generating SOAP Arrays

Open fusenigk opened this issue 12 years ago • 6 comments

I´m trying to generate SOAP files for this WSDL

http://www.mantisbt.org/bugs/api/soap/mantisconnect.php?wsdl

If you take a look for e.g. the definition of IssueDataArray You see this should be an array.

But the current version of sudzc generated a SoapObject, not an SoapArray

About a year ago this worked correctly with szdzc. As there are now new supported versions for ARC support, I wanted to update my sources.

fusenigk avatar Sep 06 '12 17:09 fusenigk

seems to be fixed. Thanks a lot!

fusenigk avatar Jan 02 '13 12:01 fusenigk

sorry, array don´t work for this wsdl. In an older version of sudzc it worked.

fusenigk avatar Mar 06 '13 18:03 fusenigk

I'm having the same problem. How can I fix it? Thanks

francocarbonaro avatar Aug 25 '13 17:08 francocarbonaro

I don´t have a solution. The developer does not answer to this issue or to my mails. You should you send him a mail too.

fusenigk avatar Aug 27 '13 18:08 fusenigk

Karsten, thanks for the feedback.

What I did until now:

I changed the superclass of ArrayOfString from SoapObjet to SoapArray. I also changed the serialize method:

  • (NSMutableString_) serialize: (NSString_) nodeName { NSMutableString* s = [NSMutableString string]; [s appendFormat: @"<%@", nodeName]; [s appendString: [self serializeAttributes]]; [s appendString: @">"];

    for (id item in self.items) {
        [s appendFormat:@"<item>%@</item>", item];
    }
    

// [s appendString: [self serializeElements]]; [s appendFormat: @"</%@>", nodeName]; return s; }

To create a new ArrayOfString object I had to do this:

NSString *xmlString = [NSString stringWithFormat:@"%@%@", _addressLine1TextField.text, _addressLine2TextField.text];

CXMLDocument *document = [[CXMLDocument alloc] initWithXMLString:xmlString options:0 error:nil];

CXMLNode *streetNode = [document rootElement];

ArrayOfString *streetArray = [[ArrayOfString alloc] initWithNode:streetNode];

I'm not sure if this solution will work on all scenarios, I'm still testing it, for now it has been working.

Franco Carbonaro Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Tuesday, August 27, 2013 at 3:45 PM, Karsten wrote:

I don´t have a solution. The developer does not answer to this issue or to my mails. You should you send him a mail too.

— Reply to this email directly or view it on GitHub (https://github.com/jkichline/sudzc/issues/10#issuecomment-23360603).

francocarbonaro avatar Aug 27 '13 18:08 francocarbonaro

I set an email to Jason too.

francocarbonaro avatar Aug 27 '13 18:08 francocarbonaro