Translate xml content using web service API from Ektron CMS400.Net - web-services

First of all: I'm on Ektron CMS v8.1
I'm having a problem with dynamicly adding translated content to the cms via the Webservice API. I can perfectly add xml content by using the following object and method:
ContentSoapClient csc = new ContentSoapClient("ContentSoap");
csc.AddContent3(...);
I specify a language and the xml content gets inserted. But now I want to add a translated version of the xml to the cms. So I want it to have the same contentId!
Anyone has an idea on this? The only method in the csc object that recieves a contentId is 'csc.AddContent2(..)' But that doesn't import anything and just gives me an error saying my xml is incorrect. While my xml is correct..I checked it!
Thanks!

Found the answer..
Ektron apparantly uses alot of asmx files and I only checked the "/workarea/webservices/WebServiceAPI/Content/Content.asmx" webservice. I found the method 'AddTranslatedXMLContent()' I need in the "/Workarea/webservices/ContentWS.asmx" webservice.
I wish they just cleaned up their API... Would save us a lot of trouble.

Firstly, I haven't used the ContentSoapClient class and can't find any documentation on it.
Ektron often takes a language id when you create the API object. See if the ContentSoapClient contructor can take a Language Id.

Related

Calling webservice from voice xml

How I can call webservice from voice xml (vxml) document. I am using an opensource IVR project and I need to run a webservice for any given option from within the vxml document.
This is similar to this query;
how can I call a webservice from voiceXML?
However, solution is provided there but it is not
You cannot call a web service directly from a VoiceXML application. There are generally two approaches for getting data into a VoiceXML application:
Use the data element tag to make an http request. The result must be XML. You will need to parse the result with the provided DOM functions. Note, some browsers have extended features to facilitate XML parsing. This also requires a VoiceXML 2.1 compliant browser.
Transfer control to a dynamic bit of server code that returns VXML to be processed populating your desired variables. This can be done with a goto element or subdialog element.
Your question is incomplete, but I suspect I know what's bothering you.
I get information from a webservice by using
<data name="return_data" srcexpr="some_url" method="post" namelist="var1 var2 var3" />
The data I get back is inside the return_data variable. In my case, the data are in XML format, and I use JavaScript functions to extract the data I need.
As an aside, for maintainability, re-usability, and ease of reading, I personally find it useful to create separate files for the JS functions and include them via <script> into my root VoiceXML document.

easiest way to parse html from soapui http request

I created a http request step in soapui which is an html page from which I need to extract one single value from
<span class="result">12345<span>
I'm thinking about using groovy,is it the best way ? If yes I'm beginner in both soapui and groovy, any snippet code to get started (how to get html Content from http request step, how to parse in groovy) thanks.
If you feel more comfortable with Groovy, then go for it!
SoapUI internally represents almost everything as XML. Therefore the easiest way to manipulate things in SoapUI is using XPath. In your case, you could probably use a Property Transfer step to extract //span[#class="result"].
Siking answer worked setting the source 'property' to ResponseAsXml along with XPath expresions, as for common HTML XPath expressions there's a resource online at
https://devhints.io/xpath

How to provide image data for embedded web control in C++

In my C++ app I'm embedding (via COM) a web browser (Internet Explorer) control (CLSID_WebBrowser).
I can display my own html in that control by using IHTMLDocument2::write() method but if the html has <img src="foo.png"> element, it's not displayed.
I assume there is a way for me to provide the data for foo.png somehow to the web control, but I can't find the right place to hook this functionality?
I need to be in full control of providing the content of foo.png, so work-arounds like using res:// protocol or saving to disk and using file:// protocol are not good enough. I just want to plug my code somehow so that when embedded CLSID_WebBrowser control sees <img src="foo.png"> in html data given with IHTMLDocument2::write() it will ask me to provide this data.
To answer my own question, the solution that finally worked for me is:
register custom IInternetProtocol/IInternetProtocolInfo/ via custom IClassFactory given to IInternetSession::RegisterNameSpace(). For reasons that seem like a bug to me, it has to be a protocol already known to IE (I've chosen "its") even though it would be much better if it was my own, unique namespace.
feed html data via custom IMoniker through IPersistentMoniker::Load() and make sure that IMoniker::GetDisplayName() (which is a base url according to which relative links in provided html will be resolved) starts with that protocol scheme (in my case "its://"). That way relative link "foo.png" in the html data will be its://foo.png to IE which will make urlmon call IInternetProtocol::Start() and IInternetProtocol::Read() to ask for the data for that url.
This is all rather complicated, you can look at the actual (BSD-licensed) code here:
http://code.google.com/p/sumatrapdf/source/browse/trunk/src/utils/HtmlWindow.cpp
You can embed a small webserver such as mongoose and reference those impage from there.
In mongoose, you can attach callback to specific path, thus returning images from C++ code.
We use this for our debugging tools, where each images is accessible from a web interface
The easiest solution would be a Data URI. You'd inline out the image directly with IHTMLDocument2::write().

Get input and output of a webservice?

I am new to using webservices and i need to find out the input and output of a webservice.
I have the WSDL of the webservice and the XSD files.
Is there a script or a utility that I could use to get the list of input fields that a webservice requires and the output fields that it will return?
I tried using soapUI and by checking Request 1 i see all the fields of the webservice, but i dunno how i could tell which ones are input and which ones are output.
Any pointers on this are very much appreciated.
Thanks a lot in advance!
Do you mean something like this?
Thats just the design view of a WSDL file in eclipse!

ColdFusion Google Adwords Business Component Error

I am using Martin Orth's ColdFusion API for Google Adwords. I have been able to fix some errors to get the API working in most cases, but am running into a roadblock when I try to use the business.cfc component. I try to create the component the same way I have successfully created them for other components of the API with the syntax:
cfset oBusiness=createObject("component","com.google.adwords.api.v12.business")>
The results in a:
coldfusion.xml.rpc.CFCInvocationException: [java.lang.ClassNotFoundException : com.google.adwords.api.v12.business][coldfusion.runtime.CfJspPage$NoSuchTemplateException : Could not find the ColdFusion Component or Interface long.]
even though the business.cfc file is located as the specified path and has not been modified. Has anyone been able to get this component to work? If so, can you post a copy of your business.cfc file? Thanks in advance.
I just rewrote the entire code minus comments and hints (in past files there were many illegal chars) in a new file and it worked fine.
There is a new version (V201101) of the AdWords API library for ColdFusion at http://www.cfsolutions.de/coldfusion_adwords_api/docs/index.cfm