Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  Patchs on soap support: configurations and call with prefix.

start2046
Posted: Fri Nov 20, 2009 8:46 am Reply with quote
User Joined: 28 Oct 2009 Posts: 19
Hi all,
Last week , I talked about soap on yaws with Steve Vinoski. He recommended some valuable articles to read and suggested just using http instead of soap. I do agree with him in some aspects, but still can't avoid soap. So, it's still necessary to make better support on soap by yaws, IMO.

What I have done are 1)add some adding some soap related configurations to yaws and 2)add new method: call/5 on yaws_soap_lib to support additional specified prefix. More details are following:

1) concrete configuration syntax.
Quote:
soap_srv_mods=<Mod1, HandlerFunc, WsdlFile1><Mod2, HandlerFunc, WsdlFile2, SpecifiedPrefix>...
Modules will be automatically setup while yaws starts. As indicated here, you can specify your own prefix instead of the default one: "p".
This configuration will be set in GLOBAL PART ( why there, please see explanation on patch 1).

2) explanation on patch 1: add some configurations support for soap.
At the beginning, I prepared to add the configuration to SERVER PART, and setup the services in yaws_server:gserv() which seems appropriate. Unfortunately, it will arose a race condition problem, since yaws manages soap modules by gen_server. At the same time soap client connects the server indicated in the WSDL file, the configuration looks like more a global one.

As you can see in patch 1, I use method: is_file() to check the WsdlFile setting, that means the configuration is only support to local filename, or it will fail. Since yaws_soap_lib:initModel() also accepts a http-headed-url, I do consider to use method: parse_url() to do this, but it will additionally accept ftp-headed-url and https-headed-url which are not supported by yaws_soap_lib:initModel(). At the server side here, I prefer just use the local file.

3) explanation on patch 2: add new call/5 on yaws_soap_lib to support additional specified prefix.
I think the additional specfied prefix support is incomplete, and it just a little better. Since the yaws_soap_lib:call methods are interfaces, I just add a new method: call/5 , so that somebody uses the old ones will work well as before.

Too much explanations about some patches usually means they are not perfect. Maybe? Or are there something I've missed?  Anything you have about these, please let me know. However, any other suggestions will be appreciated. Thanks in advance.

I don't know whether these patches are good enough to yaws or not, they do work well for me, and hope these will be helpful for your work.

Cheers,
Eric

Post received from mailinglist
View user's profile Send private message Send e-mail

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum