jzhone / wsdl2objc

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

Getting "Warning: Missing argument # for functionName()" from server #77

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It seems that there is a problem in the soap request definition with a php 
nusoap webservice. In fact, while 
the soap request needed by php is something like:

<soap:Body>
    <soap:functionName>
      <param1>value</param1>
      <param2>value</param2>
    </soap:functionName>
  </soap:Body>

the one generated by the stub is without the "<soap:functionName>" lines...

I'm using the 0.6 version and I'm trying to contact the soap server via iPhone.

I've solved adding two lines and changing another one as follows in the 
"serializedFormUsingHeaderElements" in the "MyServicenameSvc.m":

if((bodyElements != nil) && ([bodyElements count] > 0)) {
    xmlNodePtr bodyNode = xmlNewDocNode(doc, soapEnvelopeNs, (const xmlChar*)"Body", NULL);
    xmlAddChild(root, bodyNode);

    // I've added these two lines (funName is the function name, I've passed it as a parameter)
    xmlNodePtr funNode = xmlNewDocNode(doc, soapEnvelopeNs, (xmlChar*)funName, NULL);
    xmlAddChild(bodyNode, funNode);

    for(NSString *key in [bodyElements allKeys]) {
        id body = [bodyElements objectForKey:key];

        // and replaced this with the one that follows
        // xmlAddChild(bodyNode, [body xmlNodeForDoc:doc elementName:key]);
        xmlAddChild(funNode, [body xmlNodeForDoc:doc elementName:key]);
    }
}

Now obviously there is the same problem parsing the soap response (that is 
received correctly, looking in the 
debugger output)... Tomorrow I'll try to solve also that problem, but I was 
wondering if there is a know 
procedure to solve all this stuff easily, or if it is a bug (I don't think so, 
this software is so cool).

Thank you!

Original issue reported on code.google.com by armisael...@gmail.com on 22 Mar 2010 at 11:23

GoogleCodeExporter commented 9 years ago
i also has this problem.

Original comment by molind on 18 Aug 2010 at 7:04