i "! expected identifier or '('" next #import, "missing context property implementation" next @synthesize directives namespace variable onward , init method.
soapservice.h
#import "soapdelegate.h" @interface soapservice : nsobject { nsstring* _serviceurl; nsstring* _namespace; nsstring* _username; nsstring* _password; nsdictionary* _headers; bool _logging; id<soapdelegate> _defaulthandler; } @property (retain) nsstring* serviceurl; @property (retain) nsstring* namespace; @property (retain) nsstring* username; @property (retain) nsstring* password; @property (retain) nsdictionary* headers; @property bool logging; @property (nonatomic, retain) id<soapdelegate> defaulthandler; - (id) initwithurl: (nsstring*) url; - (id) initwithusername: (nsstring*) serviceusername andpassword: (nsstring*) servicepassword; @end
soapservice.m
#import "soapservice.h" @implementation soapservice @synthesize serviceurl = _serviceurl; @synthesize namespace = _namespace; @synthesize logging = _logging; @synthesize headers = _headers; @synthesize defaulthandler = _defaulthandler; @synthesize username = _username; @synthesize password = _password; - (id) init { if ((self = [super init])) { self.serviceurl = nil; self.namespace = nil; self.logging = no; self.headers = nil; self.defaulthandler = nil; self.username = nil; self.password = nil; } return self; } - (id) initwithurl: (nsstring*) url { if((self = [self init])) { self.serviceurl = url; } return self; } - (id) initwithusername: (nsstring*) serviceusername andpassword: (nsstring*) servicepassword { if ((self = [self init])) { self.username = serviceusername; self.password = servicepassword; } return self; } -(void)dealloc { [_serviceurl release]; [_namespace release]; [_username release]; [_password release]; [_headers release]; [_defaulthandler release]; [super dealloc]; } @end
soapdelegate.h
#import "soapfault.h" @protocol soapdelegate <nsobject> - (void) onload: (id) value; @optional - (void) onerror: (nserror*) error; - (void) onfault: (soapfault*) fault; @end
i can't see wrong! tried changing variable name namespace namespacexx, no success.
soapfault.h
#import "touchxml.h" @interface soapfault : nsobject { nsstring* faultcode; nsstring* faultstring; nsstring* faultactor; nsstring* detail; bool hasfault; } @property (retain, nonatomic) nsstring* faultcode; @property (retain, nonatomic) nsstring* faultstring; @property (retain, nonatomic) nsstring* faultactor; @property (retain, nonatomic) nsstring* detail; @property bool hasfault; + (soapfault*) faultwithdata: (nsmutabledata*) data; + (soapfault*) faultwithxmldocument: (cxmldocument*) document; + (soapfault*) faultwithxmlelement: (cxmlnode*) element; @end
touchxml.h
#import "cxmldocument.h" #import "cxmlelement.h" #import "cxmlnode.h" #import "cxmlnode_xpathextensions.h"
i can go further, state compiling xcode 4.0.2 , previous version of xcode compiler did not raise these semantic issues. leads me believe there syntax or notation has been deprecated.
cxmldocument.h
#import "cxmlnode.h" enum { cxmldocumenttidyhtml = 1 << 9 }; @class cxmlelement; @interface cxmldocument : cxmlnode { nsmutableset *nodepool; } - (id)initwithxmlstring:(nsstring *)instring options:(nsuinteger)inoptions error:(nserror **)outerror; - (id)initwithcontentsofurl:(nsurl *)inurl options:(nsuinteger)inoptions error:(nserror **)outerror; - (id)initwithdata:(nsdata *)indata options:(nsuinteger)inoptions error:(nserror **)outerror; //- (nsstring *)characterencoding; //- (nsstring *)version; //- (bool)isstandalone; //- (cxmldocumentcontentkind)documentcontentkind; //- (nsstring *)mimetype; //- (cxmldtd *)dtd; - (cxmlelement *)rootelement; //- (nsdata *)xmldata; //- (nsdata *)xmldatawithoptions:(nsuinteger)options; //- (id)objectbyapplyingxslt:(nsdata *)xslt arguments:(nsdictionary *)arguments error:(nserror **)error; //- (id)objectbyapplyingxsltstring:(nsstring *)xslt arguments:(nsdictionary *)arguments error:(nserror **)error; //- (id)objectbyapplyingxsltaturl:(nsurl *)xslturl arguments:(nsdictionary *)argument error:(nserror **)error; //- (id)xmlstringwithoptions:(nsuinteger)options; @end
cxmlnode.h
#import <foundation/foundation.h> #include <libxml/tree.h> typedef enum { cxmlinvalidkind = 0, cxmlelementkind = xml_element_node, cxmlattributekind = xml_attribute_node, cxmltextkind = xml_text_node, cxmlprocessinginstructionkind = xml_pi_node, cxmlcommentkind = xml_comment_node, cxmlnotationdeclarationkind = xml_notation_node, cxmldtdkind = xml_dtd_node, cxmlelementdeclarationkind = xml_element_decl, cxmlattributedeclarationkind = xml_attribute_decl, cxmlentitydeclarationkind = xml_entity_decl, cxmlnamespacekind = xml_namespace_decl, } cxmlnodekind; @class cxmldocument; // nsxmlnode @interface cxmlnode : nsobject { xmlnodeptr _node; } - (cxmlnodekind)kind; - (nsstring *)name; - (nsstring *)stringvalue; - (nsuinteger)index; - (nsuinteger)level; - (cxmldocument *)rootdocument; - (cxmlnode *)parent; - (nsuinteger)childcount; - (nsarray *)children; - (cxmlnode *)childatindex:(nsuinteger)index; - (cxmlnode *)previoussibling; - (cxmlnode *)nextsibling; //- (cxmlnode *)previousnode; //- (cxmlnode *)nextnode; //- (nsstring *)xpath; //- (nsstring *)localname; //- (nsstring *)prefix; //- (nsstring *)uri; //+ (nsstring *)localnameforname:(nsstring *)name; //+ (nsstring *)prefixforname:(nsstring *)name; //+ (cxmlnode *)predefinednamespaceforprefix:(nsstring *)name; - (nsstring *)description; - (nsstring *)xmlstring; - (nsstring *)xmlstringwithoptions:(nsuinteger)options; //- (nsstring *)canonicalxmlstringpreservingcomments:(bool)comments; - (nsarray *)nodesforxpath:(nsstring *)xpath error:(nserror **)error; - (nsstring*)_xmlstringwithoptions:(nsuinteger)options appendingtostring:(nsmutablestring*)str; @end
there's wrong in soapservice.h
since error showing near #import
. @ compile time, preprocessor takes text file , puts @ point. syntax error in .h
isn't figured out until gets .m
. near end of soapservice.h
Comments
Post a Comment