View Full Version : XML tools for Miva?
Kent Multer
05-28-08, 02:14 AM
Hi folks --
A few times a year, I get a custom project using XML for communication between a Miva store and some other server for payment, fulfillment, etc., and the only documentation they have is WSDL or some similar form. These are great if you have a tool that can read them. But I always end up asking if they can send me a couple of sample messages, and I write the code by hand. Is there a better way? Is anyone using any automated tools to convert WSDL to something that can be used by a Miva module?
Without doing any research, I'd guess that there are free or low-cost tools available that can read WSDL and similar meta-languages, and produce some kind of parsing tables, or maybe even source code ... probably not in Miva Script, though. If anyone knows of an open-source tool that works with, say, PHP, I might take a stab at converting it to generate Miva Script.
Any ideas? Thanks --
From memory there is a tool from Microsoft called Web Service Explorer or something that allows you to hand-craft calls to a web service. You just enter the url to the service, enter in some values and it shows up the XML packet it is sending and the XML packet it gets back.
On a slightly related note -- does anyone know how to extract Base-16 encoded binary data in an XML file? I am trying to parse an xml file containing JPEG images but I can't seem to figure out a way of extracting them.
Does Miva plan to add any more functionality to Empresa in the future? There are a few things I'd like to see such as some type of image manipulation functionality and PDF generation. I don't think these would be too impossible to implement given all would be needed is a wrapper around existing open source libraries.
Kent Multer
05-29-08, 02:15 AM
Thanks for that. I found an open-source Web Services Explorer, and a Microsoft Web Services Toolkit; but these don't seem like they'd be much help with Miva.
-- and, sorry to bite the hand that helps me, but I think Empresa will perform better if it stays small, simple, and focused on its primary purpose. However, I'd love to see some features for easier integration with other software, such as direct calls to PHP functions or other external resources.
virtualkiwi
05-30-08, 09:21 AM
Does Miva plan to add any more functionality to Empresa in the future? There are a few things I'd like to see such as some type of image manipulation functionality and PDF generation. I don't think these would be too impossible to implement given all would be needed is a wrapper around existing open source libraries.
I'd love to see a few extensions like this. It wouldn't be too hard to do, and the core Mivascript would remain small.
Some time ago James Harrell gave some example code for creating extension libraries for Mivascript.
The only catch is is you needed to be a C++ programmer, and you need to add a line to the mivavm.conf file to make the new functions available.
The MivaSQL and mySQL functionality look like they were pretty much added that way.
If James is still around and could give a step-by-step process for dummies who are not familiar with the vagaries of GCC and compiling for different platforms, and maybe a simple 'hello world' example, rather than the mvbinary one he demonstrated previously, that would be greatly appreciated.
mvmarkus
06-01-08, 02:06 AM
Hi Christopher,
Actually, another way is to wrap your C/C++ code into an MvCOMMERCE-construct. There is a fairly decent documentation about it in the docs.
Markus
As a quasi-developer looking into the scene - I can tell you anyway to connect to external XML APIs would be a huge plus for Miva Merchant!
As a developer on the merchant side of things I work with a lot of third party vendors that have excellent XML APIs but once we get in talks with developers it almost becomes cost prohibitive or we have to prolong our development due to Miva Merchant/MivaScript limitations.
Tim
Brandon MUS
06-04-08, 11:31 PM
+1 vote for SimpleXML (http://www.php.net/manual/en/book.simplexml.php) for Miva.
The main problem with Miva on this issue seems to me to be documentation. I think Miva already supports XML just fine but the api isn't documented well enough to do much.
@ Rick Wilson: Really? Rick, what's the status on forthcoming documentation?
Rick Wilson
06-07-08, 01:11 AM
While we're working on some docs, utilizing XML isn't part of that process. In fact I was under the impression we needed an engine change to properly use XML (in order to have full control of the header).
That change and a few others are coming soon to Miva Empresa.
It would be really really nice to be able to do server side redirects (which require a change in HTTP status code in the response)
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.