Save Web Service Response as XML - testing

I'm working with HP UFT nad HP ALM. I'm trying to save a web service response as xml in an API-Test. I found many tutorials to save a response in an Excel but it's not what I want.
Is this possible? If not, is it possible to download an .wsdl response?
API-Test construction
Control if there exist an specific xml file(refernce.xml) on my computer
If not then stop the test/if the reference.xml exist then keep going
Now I want to save the response
Compare the 2 files(reference.xml and downloaded xml)

In Api Tests/Components you can do this by simply using the standard activities available.
In the Toolbox menu, under 'Standard Activities' expand the 'File' list and add the 'Write to File' activity to your flow. Then, in the Input/Checkpoints tab of the activity you can set the export path (in the path you should include the name.xml file that will be generated) and the content (for the content you can select the main tag of the response, that holds all the content : for example).
https://community.hpe.com/t5/Unified-Functional-Testing/UFT-API-Save-Response-as-xml/td-p/6867566

In Api Tests/Components you can do this by simply using the standard activities available.
In the Toolbox menu, under 'Standard Activities' expand the 'File' list and add the 'Write to File' activity to your flow. Then, in the Input/Checkpoints tab of the activity you can set the export path (in the path you should include the name.xml file that will be generated) and the content (for the content you can select the main tag of the response, that holds all the content:` for example).
Source: https://community.hpe.com.

Related

Customizing image uploading in TinyMCE

I have an ASP.NET Web API web service which I want to use for file uploading. The way I do this is that the client posts a JSON object to the service at http://myserver.com/api/images/upload .
The object would contain a base64 string representation of the image, plus some metadata, e.g:
{ companyId: 12345, image: "someBase64encodedStringRepresentingTheImage" }
I would like to use TinyMCE on the client side, but I can't figure out how to customize it such that images are uploaded to the server in that format. (Actually, it doesn't seem like TinyMCE comes with an image uploader at all)
TinyMCE 4.2+ actually has its own built in process for handling the upload of images that you place in the editor:
https://www.tinymce.com/docs/advanced/handle-async-image-uploads/
The basic process is that TinyMCE will create a separate HTTP POST for each image that you insert into the editor. It will send that image to a URL of your choosing (via HTTP POST) based on the setting of the images_upload_url option in your init.
The image handler at the URL referenced in the images_upload_url (which you have to create) has to do whatever needs to be done to "store" the image in your application. That could mean something like:
Store the item in a folder on your web server
Store the item in a database
Store the item in an asset management system
...regardless of where you choose to store the image your image handler needs to return a single line of JSON telling TinyMCE the new location of the image. As referenced in the TinyMCE documentation this might look like:
{ location : '/uploaded/image/path/image.png' }
TinyMCE will then update the image's src attribute to the value you return. If you use the images_upload_base_path setting in the init that will be prepended to the returned location.
The net here is that TinyMCE knows when an embedded image exists in your content but it can't possibly know what to do with that image in the context of your application so that job (the "image handler") is something you must create.
There is an option for you to write your own image handler if the default one is not sufficient:
https://www.tinymce.com/docs/configure/file-image-upload/#images_upload_handler
I would recommend trying to use the uploader that comes with TinyMCE so you don't have to write and maintain your own code going forward (always easier) but if the built in code is not appropriate you can indeed replace it with your own function.

Where does Odoo save the contents of My Dashboard

I need to know where Odoo saves the views that will be shown in (My Dashboard) when we click (Add to My Dashboard).
I looked in the table scheme and I could only find one related table: board_create
which is used to save the custom dashboards the user creates.
But I only want to find out where the contents (the views not the data) of the default Dashboard are saved in the database.
In OpenERP 7 and 8 you can find the view for dashboard in 'ir_ui_view_custom' table.
The view will be saved inside 'arch' column.
From OpenERP web interface this is will happened when you click 'add to my dashboard'
Javascript will invoke 'add_dashboard'
Javascript will make rpc request using '/board/add_to_dashboard' to openerp server
Openerp server will invoke "add_to_dashboard" function
Openerp server will save the view inside 'ir_ui_view_custom' table
Openerp use these files to process 'add to my dashboard'
/OpenErp7/addons/board/static/src/js/dashboard.js
/OpenErp7/src/main/openerp/addons/board/controllers.py
I hope this help.

Can JQuery File upload be used without AJAX?

I want to use something along the lines of JQuery file upload (i'm open minded) in a form with lots of other fields for the UI (ex. image previews, delete, file sizes .etc), but I want to submit the files along with the form as if i used a normal HTML file field.
Is this at all possible?
If you console.log() the form after submission you will get an object in return that has a bunch of information. Among that information you can find for example file information of the file you just upload.
You can check this http://jsfiddle.net/1r0Lprkj/1/ and open your console after you've submitted the form.
Then if you want to go deeper into this, then you can check out the Javascript FileReader which lets you do a bunch of cool stuff with the uploaded file. https://developer.mozilla.org/en-US/docs/Web/API/FileReader
To answer your question; Yes it is possible to achieve without AJAX.

How to load properties from an external file in SOAP UI?

Currently, when I tried with an external csv/excel, some junk values are getting updated as properties. Please provide an external file snapshot on how to provide property values to import it in SOAP UI.
Have you tried using the Custom Properties import/export feature? It uses an xml document.
You can find it by clicking on your Project/TestSuite/TestCase/TestStep, then looking in the bottom-left corner. Click on the "Custom Properties" tab. There should be property import and export buttons.
There may also be something here which could help you:
http://www.soapui.org/Scripting-Properties/working-with-properties.html
first you should save your external file like this *.properties (like test.properties file type .properties). inside file there should be key=value Recordlike this

Windows Phone 8: Load/Create HTML on the fly and load into browser

I am working on an app that reads XML and displays content accordingly with whats contained n the XML. Now i have the XML part done but i need one other part and that is to load a Small section of html code into a web browser element. Is there anyway for me to either dynamically create a html file (i was thinking maybe create one and save in storage then load from there?) or directly insert code into the web browser element.
Failing this i'll just create a php page on my server that adjusts according to value its passed.
You can store your entire HTML code in a string variable and call the NavigateToString method.
myWebBrowser.NavigateToString("myHTMLcode")
How you create the HTML string depends on your app but you could store a basic template and use String.Replace to replace any particular items in the code.