how to generate xml file using gSOAP with Visual C++ - visual-c++

I am using gSOAP, Visual C++ connecting to salesforce.com and I am very new to gSOAP.
I am retrieving some data using SOAP.
Are there any ways to generate the SOAP result to a xml file?
If anyone has got some sample codes, it would be very helpful for me.
Thanks in advance.

Congratulations on getting this far :)
I'm not providing a solution, but a workaround:
Compile with the DEBUG flag and gSoap will produce three log files. One of these - "RECV.log" - will contain entire response, including the XML file.
However, gSoap does entire response parsing for you, so it is probably much easier to just gather relevant data from the response structure it provides.

Related

how to encode and decode pdf files using base64encode/decode ( windows app store )in c#

solution with sample using c#,
scenario:
Download encoded pdf file of base64Encode and decode(base64Decode) and store in ApplicationData.Current.LocalFolder;
you can use File.ReadAllBytes to load the PDF file into your program and then u can convert the loaded pdf file using Convert.ToBase64String(bytes) method
You might want to prefer this link
https://social.msdn.microsoft.com/forums/vstudio/en-US/e5965e02-0bbb-4f8d-9e5f-8611aa902457/how-to-convert-pdf-file-to-base64binary
Well, I am not going to write a solution with a complete sample for you, but I will point you to what may be the most exhaustive base42 discussion in Windows Runtime.
http://blog.jerrynixon.com/2014/11/reading-and-writing-base64-in-windows.html
It's a crazy coincidence that I just wrote this a few weeks ago. You'll notice that it is in the context of an image, but you should be able to translate it simple enough.
Remember to post your solution here!
Best of luck!

Sandcastle, /doc, and Unmanaged C++

I work on a project that uses unmanaged visual C++ and a smattering of C#. We are trying to come up with a way to document our project, both the API reference, as well as some additional conceptual documents. Ideally, all of the documentation would live together in a .chm file that we could distribute with our product.
I was already familiar with Doxygen, as a long time C++ developer. Someone suggested that I look into Sandcastle as well, but I've run into a few snags.
From a number of other sources, including other posts on this site, it's well known that sandcastle does not support unmanaged C++. I did find a post that seems to indicate that you can still cram the C++ documentation into sandcastle, by adding the API reference as conceptual topics.
Using Visual Studio 2010, you can turn on the /doc option in the project settings for your unmanaged C++ project. This produces .XDC files which studio then compiles into an .xml file that goes along with your lib/dll/exe. Where I am stuck is that is unclear what exactly you can do with this xml file. Some pages I've found online suggest that you may be able to use this file for intellisense, but I've never seen that work in unmanaged C++. I was hopeful that I might be able to use this .xml file in Sandcastle Help File Builder somehow, but I can't find any examples of how that's done online, and every attempt I've made with SHFB has failed. It seems to only want MAML or HTML files if I want to add an existing conceptual help file.
So my question:
Is there a way to get my /doc generated .xml file into my SHFB help solution?
If not, what is the point of the /doc option for unmanaged C++?
Is there some kind of transformation I can do on my /doc generated .xml file to produce HTML or MAML which I could then import via SHFB?
Can this work, or should I just go back to Doxygen?
In theory, Sandcastle could be used to document unmanaged code but it would require a tool to produce the equivalent reflection data file that is currently produced by the MRefBuilder.exe tool for managed code assemblies. So far, nobody has done that to my knowledge.
I can't comment on the lack of IntelliSense for unmanged C++ since I don't use it anymore. At a guess, /doc is probably there for the managed code output assuming the same compiler is used but with a few extra command line options.
Using XSL to transform the XML comments to MAML is a possibility but, again, it's an option I'm not aware of anyone pursuing. My guess is that most opt to use Doxygen in this case since it's an established solution.
Eric
I have a similar situation. I need XML documentation in my C++/CLI bindings so .NET code can see them with Intellisense. But FYI, Visual Studio 2010 doesn't support XML documentation in native code:
https://msdn.microsoft.com/en-us/library/ms177226(v=vs.100).aspx
Visual Studio 2010
In Visual C++, you can add XML
documentation (triple-slash) comments to your source code and instruct
the compiler to output them to an .xml file. This file can then be
input to a process that creates documentation for the classes in your
code. The IDE for Visual C++ in this version does not support XML
comments in Intellisense.
That limitation was removed in Visual Studio 2013. However, it's still an annoying ecosystem to work with if you use templates in the native code (e.g. Boost libraries):
In the current release, code comments are not processed on templates or anything containing a template type (for example, a function taking a parameter as a template). Adding such comments will result in undefined behavior.
I found your question while searching for a way to temporarily disable the XML comment parser with a #pragma or #define when including such libraries.

Visual Studio 2008 Read values from XSD file

First post. I am trying to read the values of any XSD in Visual Basic. I want the application to read back values like complextypes, elements etc. I have been looking at MSXML2 but most examples include validation against a XML file. I only want to read XSD and get information. Will xml reader be able to read a XSD file? Any help be great.
It depends a lot on what you're trying to do with this information, therefore the prerequisites you need to have in place before doing it.
For all but really trivial tasks, I recommend the use of classes in System.Xml.Schema namespace, particularly start with XmlSchema and XmlSchemaSet. This would allow you to manipulate XSDs any way you want; it would also allow you to validate the schemas before using them, if it would prove to be a requirement.
For completeness, and for what I would call very simple tasks, you may also think that XSD is just XML, so then any XML processor should allow you to load an XSD and interogate it as needed.
All of the above, since you've mentioned VS2008, would be on Visual Basic.NET. If you're still on Visual Basic and need to rely on MSXML, then I would refer you to this article on using Visual Basic and SOM.

Parsing Excel files in monotouch

Are there any good ways of parsing Excel files in monotouch? Seems like most methods to work with Excel is based on using the Excel Object Library. Doesn't seem like that's even an option in monotouch? I read that objective-c doesn't have any native support for Excel-files, so don't know if that would change anything?
You would need to either
write your own
find an obj-c library that does it and write MT bindings for it
find a open source .NET library and port it to MT
If all you want to do is display a file, you can use the existing iOS document APIs to do it.
The newest Office formats are XML based, so depending on how complex the files are, writing your own parser might be feasible to do.
I ended up just writing the middle step, a web service that fetches the Excel file, parses it and serves up the content as xml/json.

Parsing XML results into cc.net

I have used the parser in thread
Parse Fitnesse RESTFul XML output into TFS Test format
And I get the result in XML as I want.
I want to
1: include the running of this parsing in MSBuild as a Target and I think I am almost there, with a Exec target
2: show the results of the testrunning in cc.net. Anyone who knows how to do that? It inludes parsing the XML into something cc.net can interpret.
Thank You,
Magnus
CruiseControl.net already has an xsl for displaying Fitnesse results. You shouldn't need to parse anything.
In your CCNET project configuration, make sure you merge the XML result file from the Fitneese report.
http://confluence.public.thoughtworks.org/display/CCNET/File+Merge+Task
For me it´s working following the instructions given here: http://gojko.net/FitNesse/book/ch10s03.html

Resources