Hi,
I have been looking at the webservice that is provided by OpenDental in an attempt to see if I wish my application to query it. Currently I have ascertained that the ws consists of one method that takes a string and returns a string.
Is there more API information than this? Such as what sorts of things can be sent in the request? I'm guessing that it's potentially just a pipe for SQL statements, I'm just not sure. One option is for me to put a proxy between the client and the server (over HTTP) and play around and watch what gets sent, but I'm wondering if it's documented anywhere?
Thanks,
Stefan
API for the WebService
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: API for the WebService
It's a pipe for everything BUT SQL statements. Accepting SQL would be far too dangerous. The "documentation" is the source code. A quick look at OpenDentalServer ServiceMain.asmx.cs
You would basically package the entire request into an object called a DataTransferObject (DTO). There are different kinds of DTO. Each DTO includes credentials, methodname, and parameters. The result back from the server can be an error, a simple type like an int or string, a DataTable, etc. All DTO's and all results are serialized. So you would have to serialize each DTO in exactly the same way that we do, and you would have to process the serialized result. That part is not very well documented and would involve testing.
This is not meant for casual interaction with outside programs. It's instead designed for someone who wants to build an entire interface as part of building a client version of Open Dental.
You would basically package the entire request into an object called a DataTransferObject (DTO). There are different kinds of DTO. Each DTO includes credentials, methodname, and parameters. The result back from the server can be an error, a simple type like an int or string, a DataTable, etc. All DTO's and all results are serialized. So you would have to serialize each DTO in exactly the same way that we do, and you would have to process the serialized result. That part is not very well documented and would involve testing.
This is not meant for casual interaction with outside programs. It's instead designed for someone who wants to build an entire interface as part of building a client version of Open Dental.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: API for the WebService
Thanks for your prompt reply.
So I checked out the source code and I see what you mean. One question, is there a reason the unmarshalling is done manually in your layer and not done by the WS framework that you use? If you let the WS framework do it then the WSDL and accompanying schema that is generated would have the XML definition of the possible DTOs in it, which would make custom development and integration with OpenDental easier, as it would give us a known XML schema to work off and against, and would reduce coupling between the client and the server.
So I checked out the source code and I see what you mean. One question, is there a reason the unmarshalling is done manually in your layer and not done by the WS framework that you use? If you let the WS framework do it then the WSDL and accompanying schema that is generated would have the XML definition of the possible DTOs in it, which would make custom development and integration with OpenDental easier, as it would give us a known XML schema to work off and against, and would reduce coupling between the client and the server.
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: API for the WebService
That just wasn't high on my priority list. Mostly lack of time. Yes, it would be nice to have 9 web methods instead of 1, but not really a big deal
Anyway, you might have the XML definition of the DTO's, but you would still need to be very careful about how you serialized each object within the DTO. I think it's more complicated than an XML schema could define.
Anyway, you might have the XML definition of the DTO's, but you would still need to be very careful about how you serialized each object within the DTO. I think it's more complicated than an XML schema could define.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: API for the WebService
Cool, thanks for the clarification. You're right, it doesn't really make that much difference, it just threw me for a moment 
