NetTalk Central
The Rest Of NetTalk => The Rest - Ask For Help => Topic started by: terryd on December 28, 2011, 09:22:26 PM
-
I need to allow a .NET developer to access a Nettalk SOAP Application.
I have a Nettalk client application used to verify Banking details.
The system works with no problems
Now however I have a client whose systems are .net and they would like to access the webserver, send the required information and get back the result.
My problem is that I have no idea of how to explain to him what he must do to get the results
In my windows client I have 2 groups defined
RequestGroup
request:BranchCode
request:AccountNumber
request:AccountType
END
and
ResultGroup
result:CDVPassed
result:ErrorCode
result:ErrorString
END
On the window the client enters BranchCode,AccountNumber and AccountType
Clicks GetInfo
and a result string displays on the screen whether the account can be a valid account for that branch or not
The code on click is
SendCDVRequest routine
request:BranchCode = BranchCode
request:AccountNumber = AccountNumber
request:AccountType = AccountType
xml.save(RequestGroup)
PostString = xml.xmldata
do SendPost
Exit
SendPost routine
PostURL = 'http://' & clip(loc:url) & '/getInfo'
ThisWebClient.SetAllHeadersDefault()
ThisWebClient.Pragma_ = 'No-Cache'
ThisWebClient.CacheControl = 'No-Cache'
ThisWebClient.ContentType = 'text/xml'
ThisWebClient.AcceptEncoding = ''
ThisWebClient.ContentLength = len (clip(PostString))
ThisWebClient.AsyncOpenTimeOut = 1200 ! 12 seconds
ThisWebClient.InActiveTimeout = 2000 ! 20 seconds
ThisWebClient.Post(PostURL,PostString)
Exit
-
first thing you can do is document what a "valid request" looks like at the raw HTTP level.
ie grab the incoming text in the server log and paste that into your docs. (be sure to obfuscate the bank account details.)
second document all the possible responses at the HTTP level. (you can add a project define to your server,
NetShowSend=>1
and then the responses will appear in debugview.
In my SOAP Webinar I used a weather service as an example, and they had really nice documentation, so creating your documentation to look like theirs is a really good place to start. That does the most good to the most number of languages.
Of course, being a .Net developer, he's gonna look at you confused like, and ask for a WSDL file. This is a text file containing a description of your service. .Net creates, and consumes these files automatically, which is nice, but results in programmers not knowing how to read the raw HTTP. So most (although not all) .Net programmers I've come across are lost without this file.
It is possible to create a WSDL by hand - typically take a basic one and modify it to match your interface. A bit of trial and error with him perhaps, but it's not especially difficult for simple interfaces like yours.
Cheers
Bruce
-
Thanks Bruce
I'll look at the SOAP webinar again. I actually went back to the documentation you gave out on your World Tour in May 2007 which was helpful.