PrintAndExport is the recommended approach at ArcGIS 10. This class was not just added for data driven pages support. It was added as a wrapper method to simplify print and export for developers. In addition to wrapping many COM calls, it also handles many of the GDI/Win32 calls that are needed for correct printing and exporting.
- You have my complete admiration for attempting this. You may be insane, but I'm discounting that possibility.
- Since you say ArcObjects / ArcEngine, I'm assuming a .NET implementation
- I would definitely start here. Somehow, you need to get generated classes from the XSD, and while you could do it yourself for whatever subset you need, it's gonna hurt. If there's any way to use LINQ (and it appears there is), I'd try that route.
If you can give a few more details on what you're trying to accomplish (r/o? r/w?), I suspect that someone can probably give you more specifics. What you're attempting is a largish, but not insurmountable problem.
Oh, and one quick (obvious in retrospect) question - does the server you're talking to generate WSDL? If so, then you should be able to get VS2008 or 2010 to consume that directly, making life much more pleasant.
Edit: Add specifics from minor experimentation:
Starting from the link previously, I was able to generate C# classes using XSD. This generates classes that will fail at runtime due to the problem of XSD & .NET not generating strongly typed lists correctly. I also tried the suggestions / fixes from this post, just to see what's changed. I'm unconvinced that changing the underlying data types from double/int, etc. to string is the greatest idea ever, but it should work. In both cases the command to generate classes is:
xsd.exe gml.xsd ..\..\xlink/1.0.0\xlinks.xsd ..\..\iso\19139\20070417\gmd\gmd.xsd ..\..\iso\19139\20070417\gco\gco.xsd ..\..\iso\19139\20070417\gss\gss.xsd ..\..\iso\19139\20070417\gts\gts.xsd ..\..\iso\19139\20070417\gsr\gsr.xsd /classes
And yeah, it's ugly. It also assumes that you've downloaded the entire set of schemas from OpenGIS.net (available here), which you've got to have to resolve all the references.
A quick comparison of the two resulting sets of classes shows surprisingly few differences (the original data type in parenthesis after the name of the changed member:
DirectPositionType.Text (double)
DirectPositionListType.Text (double)
GridType.axisLabels (NCName)
ParameterValueType.integerValueList (integer)
MeasureListType.Text (double)
So, worst case, if you really needed to, you might want to use the "fixed" version of 3.2.1, and then update those few members to use custom serialization to get a more strongly typed implementation instead of simply using strings.
Best Answer
I gave up trying to write my own and bought this instead. http://www.spatial-online.com/LegendLimiterforArcGIS.htm