nsftools blog | comments

[1] Thomas @ 03:00PM | 2007-03-14

Have you tried it ? did it work for you ?

I successfully imported the wsdl but I was not able to compile the call to the web service function.

/Thomas



[2] Axel Janssen @ 03:49PM | 2007-03-15

What do you think about POX style Webservices (POX = plain old xml)?
On the consumer side I simply use jakarta.commons.HTTP client (which may be used from inside a notes Agent).
On the producer side I use kind of like this Domino Agent:
[code]
Dim s As New NotesSession
Dim doc As NotesDocument
Dim strIn As String ' in value (via HTTP Post Request)
Dim strOut As String ' return value (via print statement)

Set doc = s.DocumentContext()
'Print "remoteUser=" + doc.Remote_User(0)

strIn = doc.Request_Content(0)
strOut = processIn(strIn)
Print "Content-Type: text/xml"
Print strOut
[/code]

What advantages does SOAP add to it? Especially as a lot organizations simply doesn't have the people to set up a full Enterprise Service Bus architecture and a lot of the public webservices out there are servicing POX or REST style Webservices anyway.



[3] Matt Vargish @ 09:25AM | 2007-03-16

I tried it yesterday with a very simple exchange rate calc at http://www.xmethods.net/sd/CurrencyExchangeService.wsdl - It worked like a charm:
Sub Initialize
Dim exch As New CurrencyExchangePortType_n0
Print exch.getRate( "uk", "us" )
End Sub

Then I pulled the WSDL for my saleforce acct and it gave me 1500 lines in decl alone don't have the time to play with that now....



[4] Axel Janssen @ 08:50PM | 2007-03-16

I am really serious on this. No pointless agression. SOAP is just one hammer and there are different nails.
I had quite a bit of success with prototyping the POX thing in a Webservice where a Java app needs to be integrated with a Domino server this week. The xml is exchanged via http-post request-response. The Domino side seems to prefer LotusScript and so I coded them some SaxParser code on their side (with LS btw.).
Aditionally: I mean as Domino experts we know that documents can be an eficient container to save data. So why on earth this preference for "/encoded" and not "/literal" as encoding style.
Am going to publish that in german atnotes forum. One has to be carefull with comparisions, but this SOA thing starts to remind me on EJB (before EJB3). People shall not think that SOAP is the *only* solution to remotely exchange data via xml. There are interesting alternatives and its all there in Domino (xml parsing/generation, HTTP -> on client side with a little java and jakarta httpClient, on the serverside its there anyway.


[5] Julian Robichaux @ 10:36AM | 2007-03-17

Hi guys. Sorry I've been away for a few days, not minding the farm...

@Thomas: I honestly haven't had a chance to do any testing yet, I just saw the feature list. I'll let you know after this weekend. It's entirely possible that it has something to do with the WSDL you're trying to import -- maybe the encoding style or something. I'll try to do lots of different tests.

@Matt: yes, I've seen a Salesforce WSDL file before. Those things are monsters.

@Axel: I think that continues to be an excellent question -- SOAP vs. REST vs. any kind of "situational" XML or JSON messages.

There are plenty of times where SOAP is complete overkill. To use the hammer example, SOAP can be like using a sledgehammer to hang a picture on the wall.

In most projects I work on, I avoid the web services interfaces, to be honest. Unless there's already some kind of infrastructure and existing knowledge in place. If there is, it's a great fit because people already have the tools and it makes Domino more of a "player" in an enterprise.

However, you don't really want to force the issue either. If you're just trying to build an app that another app can trade information with, web services may or may not make sense. It all depends (as does everything in life).

I'm in the middle of a project right now where I'm taking calls on a Domino 7 server that need to get passed to a SQL Server database, and then the resultsets need to be manipulated and returned to the caller. What did I decide to use? HTTP GET requests for the incoming messages, and HTTP plain/text formatted responses in JSON format. Why? It made the most sense. When I'm finished with my project, my client will understand it and be able to integrate it anywhere they want with little problem. They don't have any web services expertise in-house, and right now they don't need it. They just want to move some data around.

- Julian



[6] Julian Robichaux @ 10:46AM | 2007-03-17

Oh, and regarding the question of "encoded" versus "literal"? I agree that if I'm coding something by hand, I will absolutely use "literal" format. All those encoding types are a pain in the ass.

However, if I'm using tools to generate or interact with a web service, I could care less. The tools should take care of it all for me, completely transparently.

In the old days (a few years ago ), RPC/encoded was very widely understood by all of the tools so it was the safe bet. These days, doc/literal is probably more pervasive, if for no other reason than the fact that it was (and maybe still is) the default message format for .NET web services. I'm pretty sure it was, anyway.

The other advantage to /literal format is that it's less verbose, so the XML messages are smaller. In practice, though, the size doesn't make that much of a difference over a corporate network unless you have a LOT of web service traffic.

- Julian




[7] Thomas @ 05:52AM | 2007-03-19

@Matt. Thanks, It works great now.

/Thomas



[8] Axel Janssen @ 04:41AM | 2007-03-21

Julian, I completly agree with you.



[9] Thomas Adrian @ 06:58AM | 2007-03-22

Some webservices use XSD_STRING types as function parameters. how can I handle them using Lotusscript.

/Thomas




[10] Julian Robichaux @ 08:15AM | 2007-03-22

@Thomas: something like this:

Function EchoString (s As XSD_String) As String
EchoString = s.getValueAsString()
End Function

There will also be a setValueFromString() function if you need to set a value.

All the XSD classes are actually documented in the lsxsd.lss file, which is a plain-text LotusScript file in your Notes7 program directory.

- Julian



[11] Brian @ 12:45PM | 2007-03-22

Does anyone have a sample script showing how to push data to a web services provider using Lotusscript for Notes 8?

I was able to get the exchange rate web service calc to work on Notes 8. I have been playing with IBM helpdesk.nsf sample web service. But I am uncertain on how to write to the database.

Thanks
-Brian-



add a comment

name:
e-mail:
www:

HTML markup is not allowed in your comments, although URLs will be automatically converted to links (make sure there is a space before and after the URL).