I need to call an webservice method from my excel macro. can any on suggest me how can i do that. I don't want to use soap related thing durin calling the webservice in macro code.
Thanks in advance.
Eshwer Nayudu
If you don't wish to use the SOAP type library, you could use MSXML instead and create the SOAP request manually in code and then post it to the web service.
Please take a look at http://www.freevbcode.com/ShowCode.asp?ID=7611 for a nice example. It's for VB6, but I am sure it would need little adjustment for VBA.
The best way to do this is to create a simple class which acts as a WCF client to the service. Then, with just a little more work, you can turn this class into a COM object. Excel can easily access COM objects.
Related
I'm trying to consume my SOAP web service in my C++ programm. I'm using in-build wizard to generate interaction code automaticaly using my wsdl. When I call non parameterized method everything is OK, but when I trying to call web method with parameter, I get error linked with namespace. I think I need to override onBeforeExecute method of HTTPRIO to replace some bad tags, but I could not find any useful HTTPRIO documentation or examples wrote on C++. Can anybody give me a link dedicated to HTTPRIO applying with SOAP. Or may be someone already faced with transmitting parameters problem and knows more elegant solution?
Unmarshaling error: unexpected element(uri:"/*my_service_namespace*/", local:"/*parameter_name*/"). Expected element are <{}/*parameter_name*/>
I have a some web services that my app needs to communicate with by sending json with REST over HTTP POST/GET. The only way I can see to do this is with the iXMLHTTPRequest2 framework but geeze oh man is it uglier than I want to deal with.
Is this the only option I have to look at with c++?
Would this be easier with c#? I know most of the things are the same across the languages, but if c# has a better way to do this, I'd be willing to make the jump.
You should also look into Project Casablanca - it's a fully native C++ library that also is adapted for use with Metro apps (I believe it wraps IXHR2). I've been using it to perform http REST calls and to parse JSON very successfully.
That's the interface you have to use in C++. It is more difficult than in C#. Given that, there is a good sample that will make using that interface a bit more bearable.
I want to call a rest service written in WCF (which can support both XML and JSON Web Message Formats) from my C++ application.
What is the best solution to achieve this ? I have seen some utilities (gsoap) which create proxy classes for you to be used to call web services.
Can I achieve the same functionality without using any intermediate utility ? As its a rest service and it works using GET/PUT functions which are basic HTTP functions, is there any C++ library/Solution which could be used to invoke these function directly from a c++ application ?
On Linux, you probably could use curl library (and I guess it is ported to Windows). Curl is a library providing HTTP client functionality to a C or C++ program.
Use Casablanca. This should be helpful for people looking for this answer in 2013. CURL is perfectly appropriate but if you're doing C++ in Windows and using MS stuff, Casablanca seems fit.
Hope the following articles might be of help to you
1. Accessing an XML Web Service Using C++
2. SOAP client for C++
I tried gsoap myself but it became difficult to maintain cross platform versions of my app.
Instead i went the HTTP request route.
For cross platform and C++ i found this Call Rest Web Services from C++
If XML serialization with your REST approach is really not needed then curl is perfect to use. However, if you want type-safe XML serialization in C or C++ then it would become cumbersome to use curl, since you will have to use something that runs on top of curl to process XML such as with a DOM parser (slow and not type safe). If you have a WSDL, then I recommend gSOAP 2.8 which provides integrated REST and XML serialization capabilities (and JSON when you need it).
We have a three-tier architecture consisting of Classic ASP Frontend, VB COM+ Objects and MSSql Database.
We are going to replace the VB COM by ASP.NET Webservice layer soon but we are not in the position to replace the Classic ASP with new .NET code (yet) and we're therefore going to need a way to consume webservices in Classic ASP...
We know it's possible but unsure what the best way is to do this...
Can we return VBScript RecordSets in a webservice call? (All of our Classic ASP Frontend uses Recordsets at the moment). If not what would the easiest way to use consume the results?
Are there any libraries / classes that make it easier?
All advice, links, code examples and comments are welcome!
Here is an article on codeproject which should solve your problem.
I suggest that you write a .NET client and compile it with a COM interface so that you can invoke it from classic asp just like any other COM component.
Depending on what your webservice returns/requires you may need to write a layer around the the .NET client to make the input\output VB Script friendly. If you are using recordsets in your VB code you could fabricate these inside this layer.
Since it's a Webservice, is there a reason to avoid using ASP.NET for just that layer?
It is certainly possible to return a recordset using VBscript, but I'm not sure why you would want to go this route since you would have to convert the recordset to XML, etc.
Just kicking this out in VB.NET, which is extremely well documented, will probably take less time and energy than all of the crazy debugging you will end up doing in VBScript.
There is a Microsoft SOAP client COM component you can use in ASP/VBScript, called MSSOAP.SoapClient, you can get it here - http://www.driverskit.com/dll/mssoap30.dll/2342.html
I don't think MS is particularly supporting this component anymore, the link to the download on their site now redirects to the WCF home page. You'd have to dig for some documentation on it's use as well...
Can someone give me an example of a Unmanaged C++ HTML Client with proxy support?
I want to do some get and posts inside my unmanaged c++ programs, ideally I would like to allow for proxy server configuration, or just use the IE defaults.
I am not looking for hand outs, just something to go by, as I can't seem to find too much on this.
What, seriously?
Call WinHttpGetIEProxyConfigForCurrentUser to get the proxy configuration and then use the HTTP stack of your choice. I would avoid implementing your own psuedo HTTP stack, getting it right is more work then you probably think.
I'd start with Boost.ASIO. It does not deliver out-of-the-box what you request, there are more complete libraries out there, it just happens that I don't know them.
If you're developing on Windows, you can use WinHttp to write a C++ HTTP client, I just finished implementing a client with it here at work.
WinHttp is a fairly straightforward API to use and takes care of all the HTTP communication details for you.