Last Comment Bug 302985 - Could not call SOAP procedure when procedure name contains '_' (underscore) character
: Could not call SOAP procedure when procedure name contains '_' (underscore) c...
: testcase
Product: Core
Classification: Components
Component: Web Services (show other bugs)
: Trunk
: x86 Linux
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on:
  Show dependency treegraph
Reported: 2005-08-01 12:46 PDT by Fabien Chevalier
Modified: 2010-11-03 00:57 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

WSDL file for test case (1.63 KB, text/plain)
2005-08-01 12:47 PDT, Fabien Chevalier
no flags Details
HTML file for test case (1.84 KB, text/html)
2005-08-01 12:48 PDT, Fabien Chevalier
no flags Details

Description User image Fabien Chevalier 2005-08-01 12:46:10 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050801 Firefox/1.0+
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050801 Firefox/1.0+

When i I create a WebServiceProxy object, I can only call methods that have no
underscore, which means that (let serviceproxy be a WebServiceProxy object, and
a adhoc wsdl file with two operations : foobar and foo_bar):
  - calling serviceproxy.foobar() works
  - calling serviceproxy.foo_bar() fails with an error (see above)

Reproducible: Always

Steps to Reproduce:
1.Download the nsps.wsdl and wsdl.html files (attached with this bug report),
put them in /tmp
2.go to file:///tmp/wsdl.html
3.Enter a string in the Line Edit, press 'Send string value' button

Actual Results:  
Message Box is displayed  : TypeError: proxy.user_search is not a function

Expected Results:  
Do the SOAP Call, and actually fail because the server is not responding...
Unless you have SOAP server in front, in this case it should just work.
Comment 1 User image Fabien Chevalier 2005-08-01 12:47:20 PDT
Created attachment 191238 [details]
WSDL file for test case
Comment 2 User image Fabien Chevalier 2005-08-01 12:48:02 PDT
Created attachment 191239 [details]
HTML file for test case
Comment 3 User image Doron Rosenberg (IBM) 2006-05-28 08:00:04 PDT
note that wsdl/soap is on its way out of the codebase, so this will be probably wontfixed.
Comment 4 User image John Bandhauer 2007-01-16 17:31:49 PST
This just came up in the newsgroup. pointed this out and noted that replacing the single underscores with '_005f' in his JS code fixes the problem. My reply to him (and his original quoted message) follows...

FWIW, This is working as designed. The issue is that arbitrary XML 'names' need to be mapped to legal JS 'identifiers' in and easily reversible way. I remember discussing this with Vidur at the time (he did most of this work). We agreed to do something *very* simple and just use a single underscore as an escape character. We were aware of the downside, but decided to do it this way anyway. This was 5+ years ago and this Soap support for mozilla was a very experimental project.

The code is in the two static methods:

WSPFactory::C2XML and WSPFactory::XML2C at

I can imagine other escaping strategies (e.g. a multi-character escape indicator). Of course, changing this now would break any code that *expects* the current behavior.

As to bug filing...  If you go to the main bugzilla page ( and search for bugs with "wsdl" in the subject line you'll get a list of some of the bugs and feature requests related to this module. It appears that bugs are filed as: Product: Core, Component: Web Services.


cbare wrote:
> I'm trying to use the WebServiceProxyFactory to access a public web
> service at:
> I'm seeing some weird behavior, which is either a bug or I don't
> understand what's going on. The WSDL for this service defines a bunch
> of methods, among them: get_genes_by_organism.
>     <operation name="get_genes_by_organism">
>       <input message="typens:get_genes_by_organismRequest"/>
>       <output message="typens:get_genes_by_organismResponse"/>
>     </operation>
> The trouble is, the proxy generated by the factory ends up with names
> like this: get_005fgenes_005fby_005forganism.
> Suspiciously, 0x005f is unicode for the underscore character. Maybe the
> underscores are messing things up? Or maybe the WSDL is in an
> unexpected character encoding?
> It works if I call the methods with the munged up names, but it's not
> pretty. Anyone seen similar problems? Is there a good place to file a
> bug report?
> Thanks,
> -Chris
Comment 5 User image Mike Shaver (:shaver -- probably not reading bugmail closely) 2010-11-03 00:57:34 PDT
We dropped SOAP.

Note You need to log in before you can comment on or make changes to this bug.