arishanapalli / wsdl2objc

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

Call a webservice on a Glassfishserver with metro stack #108

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call a webservice on a GlassFish Enterprise Server v2.1 with metro stack
2.
3.

What is the expected output?
<?xml version="1.0"?>
<soap:Envelope ...
  <soap:Body>
    <SyncService:getDocumentAsByte xmlns:SyncService="http://ws.xxx.com/">
      <documentId>60e4f2c6d696803770e</documentId>
    </SyncService:getDocumentAsByte>
  </soap:Body>
</soap:Envelope>

What do you see instead?
<?xml version="1.0"?>
<soap:Envelope....
  <soap:Body>
    <SyncService:getDocumentAsByte>
     <SyncService:documentId>60e4f2c6d696803770e</SyncService:documentId>
    </SyncService:getDocumentAsByte>
  </soap:Body>
</soap:Envelope>

What version of the product are you using? On what operating system?
wsdl2objc0.7pre MacOS X 10.6.4 xcode 3.2.2

Please provide any additional information below.

I changed the following lines in the generated wsdl2objc output to get a 
working soap request:
From this:
- (void)addElementsToNode:(xmlNodePtr)node
{
    if(self.documentId != 0) {
        xmlAddChild(node, [self.documentId xmlNodeForDoc:node->doc elementName:@"documentId" elementNSPrefix:@"SyncService"]);
    }
}
to this:
- (void)addElementsToNode:(xmlNodePtr)node
{

    if(self.documentId != 0) {
        xmlAddChild(node, [self.documentId xmlNodeForDoc:node->doc elementName:@"documentId" elementNSPrefix:@""]);
    }
}

_________________________________________________________
and i add this line:
xmlNewProp(node, (xmlChar *)[@"xmlns:SyncService" UTF8String], (xmlChar 
*)[@"http://ws.xxx.com/" UTF8String]);

here the generated output with the added line
- (xmlNodePtr)xmlNodeForDoc:(xmlDocPtr)doc elementName:(NSString *)elName 
elementNSPrefix:(NSString *)elNSPrefix
{
    NSString *nodeName = nil;
    if(elNSPrefix != nil && [elNSPrefix length] > 0)
    {
        nodeName = [NSString stringWithFormat:@"%@:%@", elNSPrefix, elName];
    }
    else
    {
        nodeName = [NSString stringWithFormat:@"%@:%@", @"SyncService", elName];
    }

    xmlNodePtr node = xmlNewDocNode(doc, NULL, [nodeName xmlString], NULL);
    xmlNewProp(node, (xmlChar *)[@"xmlns:SyncService" UTF8String], (xmlChar *)[@"http://ws.xxx.com/" UTF8String]);

    [self addAttributesToNode:node];

    [self addElementsToNode:node];

    return node;
}

Original issue reported on code.google.com by t.reffli...@optadata.de on 28 Jul 2010 at 1:30

GoogleCodeExporter commented 9 years ago
Got the same problem here

Original comment by fabi...@gmail.com on 24 Aug 2010 at 6:01

GoogleCodeExporter commented 9 years ago
Some clients experienced this. Definitely a showstopper, and complicated to 
debug on the server side.

Original comment by jjmontes on 4 Nov 2010 at 3:51