senojsitruc / wsdl2objc

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

Missing the Method Name in SOAP-Body #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. sending a normal SOAP-Request
2.
3.

What is the expected output?
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>
<SOAP-ENV:Body>
 <m:login xmlns:m="http://gforgegroup.com">
 <userid xsi:type="xsd:string">gforgeadmin</userid>
 <passwd xsi:type="xsd:string">gforgeadmin</passwd>
</m:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

What do you see instead?
<?xml version="1.0"?>
<soap-env:Envelope
xmlns:soap-env="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:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:GForgeAPI="http://gforgegroup.com"
xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://schemas.xmlsoap.org/wsdl/" xsl:version="1.0">
  <soap-env:Body>
    <userid>tester</userid>
    <passwd>tester</passwd>
  </soap-env:Body>
</soap-env:Envelope>

What version of the product are you using? On what operating system?
0.6 wsdl2objc, sdk iPhone 3.1, gForge SOAP Api 

Please provide any additional information below.

First, your tool is awesome!.

Second, i'm not quite sure what really is producing the error. Using SOAP
Client for Mac the Interface works very well. Using your produced code
seems to create a message the server won't read.

I compared all header informations, and those seem to be allright. Goal is
to talk to the GForge SOAP Interface. I suppose the error is produced
because of the missing child node in body. I allready changed "soap" to
"soap-env". But what i now need is:

 <m:login xmlns:m="http://gforgegroup.com">
   ...
 </m:login>

inside the body.

The Response is embeded in 

  <ns1:loginResponse xmlns:ns1="http://gforgegroup.com">
   ...
  </ns1:loginResponse>

as well.

I thing i need to change "serializedFormUsingHeaderElements", but i'm not
so good unterstanding the XML-stuff in there.

Maybe somebody has a good idea.

thanks matthias

Original issue reported on code.google.com by beate...@googlemail.com on 18 Oct 2009 at 8:47

GoogleCodeExporter commented 8 years ago
As posted in discussion group i added to "serializedFormUsingHeaderElements":

xmlNodePtr methodNode = xmlNewDocNode(doc, NULL, (const xmlChar*)"methodName", 
NULL);
xmlNsPtr methodNs = xmlNewNs(methodNode, (const 
xmlChar*)"http://namespacehost.com",
(const xmlChar*)"m");
xmlSetNs(methodNode, methodNs);
xmlAddChild(bodyNode, methodNode); 

to get the request namespace. But how do I access the function name inside that
function name?

Next step is the namespace in the response.

Original comment by beate...@googlemail.com on 19 Oct 2009 at 7:16

GoogleCodeExporter commented 8 years ago
OK, second problem in the response solved by changing

for(bodyNode=cur->children ; bodyNode != NULL ; bodyNode = bodyNode->next){

to

for(bodyNode=cur->children->children ; bodyNode != NULL ; bodyNode = 
bodyNode->next){

I suppose it's just a workaround, but well. it's working.

Original comment by beate...@googlemail.com on 19 Oct 2009 at 7:53