{"action":"created","issue":{"url":"https://api.github.com/repos/priore/SOAPEngine/issues/31","labels_url":"https://api.github.com/repos/priore/SOAPEngine/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/priore/SOAPEngine/issues/31/comments","events_url":"https://api.github.com/repos/priore/SOAPEngine/issues/31/events","html_url":"https://github.com/priore/SOAPEngine/issues/31","id":61716894,"number":31,"title":"Delegate method Vs Block Method","user":{"login":"brettbrooks","id":354540,"avatar_url":"https://avatars.githubusercontent.com/u/354540?v=3","gravatar_id":"","url":"https://api.github.com/users/brettbrooks","html_url":"https://github.com/brettbrooks","followers_url":"https://api.github.com/users/brettbrooks/followers","following_url":"https://api.github.com/users/brettbrooks/following{/other_user}","gists_url":"https://api.github.com/users/brettbrooks/gists{/gist_id}","starred_url":"https://api.github.com/users/brettbrooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettbrooks/subscriptions","organizations_url":"https://api.github.com/users/brettbrooks/orgs","repos_url":"https://api.github.com/users/brettbrooks/repos","events_url":"https://api.github.com/users/brettbrooks/events{/privacy}","received_events_url":"https://api.github.com/users/brettbrooks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/priore/SOAPEngine/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-15T00:05:04Z","updated_at":"2015-03-15T01:56:29Z","closed_at":"2015-03-15T01:56:29Z","body":"I have an example where I'm using the delegate method.\r\nIt produces the following XML code (sensitive data has been blanked out)\r\n\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap12:envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">\r\n\t<soap12:header>\r\n\t</soap12:header>\r\n\t<soap12:body>\r\n\t\t<checkpermissions xmlns=\"http://tempuri.org/\">\r\n\t\t\t<username>\r\n\t\t\t\tXXX@AAAAA.VVV \r\n\t\t\t</username>\r\n\t\t\t<password>\r\n\t\t\t\tXXXXXXX \r\n\t\t\t</password>\r\n\t\t\t<msg xsi:nil=\"true\" /><securityticket xsi:nil=\"true\" /> \r\n\t\t\t<iuserid>\r\n\t\t\t\t0 \r\n\t\t\t</iuserid>\r\n\t\t\t<utcoffset>\r\n\t\t\t\t360000000000 \r\n\t\t\t</utcoffset>\r\n\t\t</checkpermissions>\r\n\t</soap12:body>\r\n</soap12:envelope>\r\n```\r\nwhich returns a valid response.\r\n\r\nI then tried to convert it to using a block which generates the following XML (sensitive data blanked out)\r\n\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap12:envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">\r\n\t<soap12:header>\r\n\t</soap12:header>\r\n\t<soap12:body>\r\n\t\t<checkpermissions xmlns=\"http://tempuri.org/\">\r\n\t\t\t<input>\r\n\t\t\t\t<username>\r\n\t\t\t\t\tXXX@AAAAA.VVV\r\n\t\t\t\t</username>\r\n\t\t\t\t<password>\r\n\t\t\t\t\tXXXXXXX\r\n\t\t\t\t</password>\r\n\t\t\t\t<msg xsi:nil=\"true\" /><securityticket xsi:nil=\"true\" />\r\n\t\t\t\t<iuserid>\r\n\t\t\t\t\t0\r\n\t\t\t\t</iuserid>\r\n\t\t\t\t<utcoffset>\r\n\t\t\t\t\t360000000000\r\n\t\t\t\t</utcoffset>\r\n\t\t\t</input>\r\n\t\t</checkpermissions>\r\n\t</soap12:body>\r\n</soap12:envelope>\r\n```\r\nwhich returns an error because of the added `<input></input>` tags.\r\n\r\nWhy does the block programming method insert the extra `<input></input>` tags? and is there a way to disable it?\r\n\r\n\r\nCode for the delegate method\r\n\r\n```Objc\r\nSOAPEngine *soap = [[SOAPEngine alloc] init];\r\nsoap.delegate = self;\r\nsoap.userAgent = @\"SOAPEngine\";\r\nsoap.actionNamespaceSlash = YES;\r\nsoap.replaceNillable = YES;\r\nsoap.selfSigned = YES;\r\nsoap.responseHeader = YES;\r\nsoap.userAgent = @\"SOAPEngine\";\r\nsoap.version = VERSION_1_2;\r\n    \r\n    \r\n[soap setValue:@\"XXX@AAAAA.VVV\" forKey:@\"UserName\"];\r\n[soap setValue:@\"XXXXXXX\" forKey:@\"Password\"];\r\n[soap setValue:nil forKey:@\"Msg\"];\r\n[soap setValue:nil forKey:@\"SecurityTicket\"];\r\n[soap setIntegerValue:0 forKey:@\"iUserID\"];\r\n[soap setValue:utcOffset forKey:@\"UtcOffset\"];\r\n[soap requestURL:@\"https://server.website.net/security.asmx\"\r\n          soapAction:@\"http://tempuri.org/CheckPermissions\"];\r\n```\r\n\r\nCode for the block method\r\n\r\n```Objc\r\nMyObject *myObject = [[MyObject alloc] init];\r\n    myObject.UserName = @\"XXX@AAAAA.VVV\";\r\n    myObject.Password = @\"XXXXXXX\";\r\n    myObject.Msg = nil;\r\n    myObject.SecurityTicket = nil;\r\n    myObject.iUserID = 0;\r\n    myObject.UtcOffset = utcOffset;\r\n    \r\n    \r\n    SOAPEngine *soap = [[SOAPEngine alloc] init];\r\n    soap.delegate = self;\r\n    soap.userAgent = @\"SOAPEngine\";\r\n    soap.actionNamespaceSlash = YES;\r\n    soap.replaceNillable = YES;\r\n    soap.selfSigned = YES;\r\n    soap.responseHeader = YES;\r\n    soap.userAgent = @\"SOAPEngine\";\r\n    soap.version = VERSION_1_2;\r\n    \r\n    [soap requestURL:@\"https://server.website.net/security.asmx\"\r\n          soapAction:@\"http://tempuri.org/CheckPermissions\"\r\n               value:myObject completeWithDictionary:^(NSInteger statusCode, NSDictionary *dict) {\r\n                   NSLog(@\"%@\", dict);\r\n               } failWithError:^(NSError *error) {\r\n                   NSLog(@\"%@\", error);\r\n               }];\r\n\r\n```\r\nThanks."},"comment":{"url":"https://api.github.com/repos/priore/SOAPEngine/issues/comments/80795693","html_url":"https://github.com/priore/SOAPEngine/issues/31#issuecomment-80795693","issue_url":"https://api.github.com/repos/priore/SOAPEngine/issues/31","id":80795693,"user":{"login":"brettbrooks","id":354540,"avatar_url":"https://avatars.githubusercontent.com/u/354540?v=3","gravatar_id":"","url":"https://api.github.com/users/brettbrooks","html_url":"https://github.com/brettbrooks","followers_url":"https://api.github.com/users/brettbrooks/followers","following_url":"https://api.github.com/users/brettbrooks/following{/other_user}","gists_url":"https://api.github.com/users/brettbrooks/gists{/gist_id}","starred_url":"https://api.github.com/users/brettbrooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettbrooks/subscriptions","organizations_url":"https://api.github.com/users/brettbrooks/orgs","repos_url":"https://api.github.com/users/brettbrooks/repos","events_url":"https://api.github.com/users/brettbrooks/events{/privacy}","received_events_url":"https://api.github.com/users/brettbrooks/received_events","type":"User","site_admin":false},"created_at":"2015-03-15T01:56:29Z","updated_at":"2015-03-15T01:56:29Z","body":"Awesome! Works as expected. Thanks!"}}