"Antonio Lucas Rodríguez (sr&tec)" alucas at srtec.com
Fri Apr 21 06:15:55 EDT 2006


Traian Stanev wrote:

>OK I understand what you are trying to do. If you want to use TCP/IP you
>should look at the library that the web extensions use to communicate
>with the server. All the server APIs are actually also implemented in
>that library as "proxy" APIs that use TCP to forward the calls to the
>server and then read the results. May be instead of writing code from
>scratch, you can use or modify that code. The nice thing about it is
>that the compilation process for the web extensions automatically
>generates a .Net wrapper for the proxy APIs, which you should just be
>able to add a reference to from C# and use it to communicate with the
>server via TCP/IP.
>
>The .Net API wrappers get installed with the ASP web extensions (it's
>MapGuideDotNetApi.dll), but you can also open the web extensions
>solution to look at the C++ code that gets published to the .Net
>wrapper, or even compile your own API wrappers. 
>
>Looking at the code itself... in the Service project, under the Services
>folder you can see how the server APIs are also implemented as Proxy
>objects that basically do the API call to the server via TCP. For
>example look at ProxyRenderingService.cpp, at the function
>MgProxyRenderingService::RenderMap. This is the proxy for the
>MgServerRenderingService::RenderMap call. You will see how all it does
>is issue a command with the correct arguments. Then if you dig into
>ExecuteCommand you will see how the arguments get serialized to a stream
>and written to the server port. The result is then read from the port.
>
>Traian
>
> 
>
>-----Original Message-----
>From: alucas at srtec.com [mailto:alucas at srtec.com] 
>Sent: Wednesday, April 19, 2006 5:38 PM
>To: Traian Stanev
>Subject: 
>
>Hello Traian,
>
>First of all, thank you very match for your attention. So, your mail has
>been very useful for me. I'm planning create a test application that
>connect via TCP/IP to the mgserver service from a test c# or c++
>application for example to get a PNG from the repository.
>So, what are the necessary steps to follow? Any sample code would be
>very
>useful for me...
>
>Thanks in advance.
>
>
>Antonio Lucas
>
>Software Engineer
>SER&TEC S.L
>Phone: +34 96 395 95 13
>www.srtec.com
>Valencia (Spain)
>
>
>
>
>
>  
>
Thanks Traian,

It's very useful for me. It's a pity that this things are not 
documented. I've build WebTier.sln, it generates the following dll's:

ACE.dll
MapguideDotNetApi.dll
MapguideJavaApi.dll
MapguideUnmanagedApi.dll
MgCommon.dll
MgCoordinateSystem.dll
MgHttpHandler.dll
MgMdfModel.dll
MgMdfParser.dll
MgWebApp.dll
PhpMapguideApi.dll
Proj.dll
xerces-c_2_7.dll

Ok, then I create one simple c# windows form application and add a 
reference to /release/MapGuideDotNetApi.dll. Well, I have the DotNetApi 
reference, the question is how can I connect via TCP/IP with the server 
that runs mapguide? What are the necessary steps?

Thanks.




-- 
------------------------------------------------------------------------

Antonio Lucas

Software Engineer

alucas at srtec.com <mailto:alucas at srtec.com> 	www.srtec.com 
<http://www.srtec.com>

963·959·513

	

Fax 963·731·756


	 

	  	SER&TEC
avda. Ausias March 79 - 1
46013 Valencia

-------------- next part --------------
Skipped content of type multipart/related


More information about the Mapguide-internals mailing list