WebServiceProxyFactory bug??

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

WebServiceProxyFactory bug??

cbare
I'm trying to use the WebServiceProxyFactory to access a public web
service at:

http://soap.genome.jp/KEGG.wsdl.

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

_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: WebServiceProxyFactory bug??

John Bandhauer
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
http://lxr.mozilla.org/seamonkey/source/extensions/webservices/proxy/src/wspfactory.cpp#209

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
(https://bugzilla.mozilla.org) 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.

John.

cbare wrote:

> I'm trying to use the WebServiceProxyFactory to access a public web
> service at:
>
> http://soap.genome.jp/KEGG.wsdl.
>
> 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
>
_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: WebServiceProxyFactory bug??

John Bandhauer
Ah, I see that this issue is already noted as a bug in bugzilla. But, no
one had figured out your 'work-around'. I added the info in the thread
above as a comment to the bug. The bug is:

https://bugzilla.mozilla.org/show_bug.cgi?id=302985

John.

John Bandhauer wrote:

> 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
> http://lxr.mozilla.org/seamonkey/source/extensions/webservices/proxy/src/wspfactory.cpp#209 
>
>
> 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
> (https://bugzilla.mozilla.org) 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.
>
> John.
>
> cbare wrote:
>> I'm trying to use the WebServiceProxyFactory to access a public web
>> service at:
>>
>> http://soap.genome.jp/KEGG.wsdl.
>>
>> 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
>>
_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: WebServiceProxyFactory bug??

cbare
In reply to this post by John Bandhauer
John,

Thanks for the response. I wouldn't have guessed that code was that
old... kinda ahead of its time. I guess what's really amazing is that
it's taken this long for the world to catch up.

But, now the idea of the browser as a platform for rich applications is
cool again. Is anyone actively working on that code? Or is it just
waiting for someone to pick up the ball and run with it?

Anyway, thanks a lot for the info.

-Chris


John Bandhauer wrote:
> 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
...

_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml