senojsitruc / wsdl2objc

Automatically exported from code.google.com/p/wsdl2objc
MIT License
0 stars 0 forks source link

No Body Part when nil is given #143

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

[env serializedFormUsingHeaderElements:[NSDictionary 
dictionaryWithObject:@"test" forKey:@"test"] bodyElements:nil 
serviceName:(xmlChar*)"http://someurl.com/SomeApi.php"]

What is the expected output?
 <?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:ns1="http://www.w3.org/2001/XMLSchema" 
xmlns:StoreApiService="http://someurl.com/" xsl:version="1.0">
  <soap:Header>
    <test>test</test>
  </soap:Header>
  <soap:Body>
  </soap:Body>
</soap:Envelope>

What do you see instead?
 <?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:ns1="http://www.w3.org/2001/XMLSchema" 
xmlns:StoreApiService="http://someurl.com/" xsl:version="1.0">
  <soap:Header>
    <test>test</test>
  </soap:Header>
</soap:Envelope>

What version of the product are you using? On what operating system?
it's iOS but the version i don't know, but i generated the code in march 2011

Please provide any additional information below.
It's not a major issue, i just wanted to inform you the the method described 
above does not create a SOAP Body element if the Dictionary containing the body 
elements is nil. 
But as the Body element is mandatory it should at least be an empty body 
(described at SOAP 1.2 -> 
http://www.w3.org/TR/2007/REC-soap12-part0-20070427/#L1165).

Original issue reported on code.google.com by j...@trademob.com on 1 Jun 2011 at 11:57