It's too bad #loadFrom doesn't send #asURI to whatever it's sent. It's
easy enough for me to add (Smalltalk allows that kind of fun) but as soon as I do that I wonder what will happen if a subsequent version of #loadFrom: will do it for me or worse, do something else. Which would be recommend, adding #loadFromString: or modifying #loadFrom:? I think I'm leaning towards #loadFromString:. The biggest problem with that is now there's two methods where only one is really necessary, and both methods #loadFrom: and #loadFromString: start to resemble static typing to me. Do they anyone else? From that standpoint I'd rather modify #loadFrom: to send #asURI to its parameter just to keep it's protocol to a minimum. -- Visit <http://tggagne.blogspot.com/>,<http://gagne.homedns.org/> or <http://gagne.homedns.org/~tgagne/> for more great reading. |
The API
WsdlClient class>>readFrom: WsdlClient>>loadFrom: except as a parameter any data source. The data source may be a URI, a Filename (or a String which will be treated as a Filename), or an InputSource. If you want to use only URL there is another method: WsdlClient class>>url: The request could be; wsdlClient := WsdlClient url: 'http://lepago.homeip.net/HelloLangJB4EJB/HelloLangEndpointPort?wsdl'. args := Array with: 'hello'. value := wsdlClient executeSelector: #sayHello args: args. Tamara Kogan Smalltalk Development Cincom Systems > -----Original Message----- > From: Thomas Gagné [mailto:[hidden email]] > Sent: Tuesday, April 18, 2006 4:41 PM > To: vwnc > Subject: WsdlClient's #loadFrom: > > It's too bad #loadFrom doesn't send #asURI to whatever it's sent. It's > easy enough for me to add (Smalltalk allows that kind of fun) but as > soon as I do that I wonder what will happen if a subsequent version of > #loadFrom: will do it for me or worse, do something else. > > Which would be recommend, adding #loadFromString: or modifying > #loadFrom:? I think I'm leaning towards #loadFromString:. > > The biggest problem with that is now there's two methods where only one > is really necessary, and both methods #loadFrom: and #loadFromString: > start to resemble static typing to me. Do they anyone else? From that > standpoint I'd rather modify #loadFrom: to send #asURI to its parameter > just to keep it's protocol to a minimum. > > -- > Visit <http://tggagne.blogspot.com/>,<http://gagne.homedns.org/> or > <http://gagne.homedns.org/~tgagne/> for more great reading. |
Kogan, Tamara wrote:
> <snip> > > If you want to use only URL there is another method: > WsdlClient class>>url: That is much better, and makes for a better example: | wsdlClient | wsdlClient := WsdlClient url: 'http://lepago.homeip.net/HelloLangJB4EJB/HelloLangEndpointPort?wsdl'. wsdlClient executeSelector: #sayHello args: #('Hello, world!'). That's how Smalltalk should be. Short and obvious. -- Visit <http://tggagne.blogspot.com/>,<http://gagne.homedns.org/> or <http://gagne.homedns.org/~tgagne/> for more great reading. |
In reply to this post by Thomas Gagné-2
Actually next time if you need to create a request using a Wsdl client you can run:
wsdlClient := WsdlClient url: 'http://lepago.homeip.net/HelloLangJB4EJB/HelloLangEndpointPort?wsdl'. (Script := wsdlClient createScript) inspect. The script will have a sample of the request for this client. Tamara Kogan Smalltalk Development Cincom Systems > -----Original Message----- > From: Thomas Gagné [mailto:[hidden email]] > Sent: Wednesday, April 19, 2006 10:27 AM > To: vwnc > Subject: Re: WsdlClient's #loadFrom: > > Kogan, Tamara wrote: > > <snip> > > > > If you want to use only URL there is another method: > > WsdlClient class>>url: > That is much better, and makes for a better example: > > | wsdlClient | > wsdlClient := WsdlClient url: > 'http://lepago.homeip.net/HelloLangJB4EJB/HelloLangEndpointPort?wsdl'. > wsdlClient executeSelector: #sayHello args: #('Hello, world!'). > > That's how Smalltalk should be. Short and obvious. > > -- > Visit <http://tggagne.blogspot.com/>,<http://gagne.homedns.org/> or > <http://gagne.homedns.org/~tgagne/> for more great reading. |
Free forum by Nabble | Edit this page |