How to post xml to servlet using selenium - selenium-rc

Mine is logistics related web app, We need to create multiple jobs based on xml posted by SALOG API.
I want to create more shipments by posting the xml's to servet and this would be done using selenium. I can't proceed to implement this.
Is there a chance to post an xml to servlet using selenium?
Thanks in advance

I believe you should use direct HTTP Request for this instead of seeking how to do this using Selenium.
If you use Java you can use a wide range of libraries that ease this work.

Related

How to auto generate the yaml code for api documentation in swagger editor?

I want to design my web api using swagger, but the problem is I have to write all the yaml code myself, which in itself is a time consuming and tedious process. Can this process be automated?
I tried searching but did not anything useful.
Is auto-generation of yaml code for api design even possible before creating the api itself.
If yaml code can't be generated automatically then why use swagger for api design.
Any help will be appreciated. Thanks!
You can use swashbuckle instead of swagger (or alongside it, but i suggest just picking one)
https://github.com/domaindrivendev/Swashbuckle.AspNetCore#getting-started
They changed the docs since i've used it, however there's this tool you can use that scans your asp.net core project, looks at all controllers and routes and generates an opeapi document for you.
It can also generate client code and a bunch of other things.

RESTful API with CMS Made Simple

I have a client with a content-heavy site built in CMS Made Simple. The redesign requires a mostly AJAX interface, and I think a frontend framework like Backbone or Angular would be the way to go.
I want to avoid moving off CMS Made Simple, though (client is used to that interface, it will be annoying to migrate all the data).
I think if I could find or create a RESTful api for CMS Made Simple, I'd solve my problem. But after searching around online, I only found CGSocialApp module, which seems to provide a limited API for things like user management. I've also looked into other AJAX solutions for CMS Made Simple, and there don't seem to be good modules for it.
If there is no ready-made solution for me, how complex would building a RESTful API module be? I haven't built a RESTFUL api in a PHP framework before.
Thanks for any guidance!
So, there is no easy answer for this question, as the CMSMS doesn't have a build-in RESTful API.
I would go for one of the two solutions:
1. Output the content as hand made json.
In CMSMS, you really have a lot of control on the templates. You could change the default templates to output json content instead of HTML content. The only issue is that the CMSMS will still send an http content-type header, that you can try to ignore in the JS part.
To access the menu, just remove it from the main template and create an empty page who output the {menu}with a custom template that also build json content.
That's the quick and dirty solution, but it should be very accessible in terms of doing it.
2. Create a dedicated module.
As far as I know, there are no modules that expose the CMSMS in RESTFul format, but a module is really very easy to build. Well, you can try to build it yourself, with the help of the community. It don't really solve the current problem, but it's a hint.
I hope it shed some light on the problem.

instant search with jquery and spring mvc

I need some help with jquery or other scripts for instant search.
I have basic knowledge of jquery. And I use Spring MVC as the back end program.
In my page I need to search for two users and the result must bee shown on the same search page.
My question are: Must I use PHP for connecting to database? Is PHP working with spring?
Any example any where using live search with jquery and spring?
Thanks
I wrote a post about integration jQuery / AJAX / Spring MVC.
You can read it # http://stories.stefanocazzola.it/2012/07/spring-and-json-requests.html
Hope this can help you out,
Stefano
You might take a look into
JavaScript dynamic language support in Spring framework
and jquery autocomplete
"Is PHP working with spring": No it does not.
As far as the code goes, I create something over the weekend.

Filter JSON from ASP.Net handler | Using Dojo 1.8

Wanted to filter the results using Dojo 1.8 based upon the data received from server through a ASP.Net handler.
Handler Example - http://localhost/net/get8.ashx?longitude=-70.255325&latitude=43.661472&searchradius=200&searchunit=mi&locationtypes=3&numresults=20&Json=y
I could use (Store API) ItemFileReadStore but it's required specific format which we don't have and can't make the changes from the server end (JSON structure changes)
Able to successfully fetch the data through Dojo AJAX but looking for better way to filter the through some Dojo API.
One way around is, restructure the data again on client but it costs the performance and considering we developing for Mobile, doesn't look the right approach to take.
What all other options do we have in Dojo?
P.S. I just started learning Dojo Toolkit but having good experience in JavaScript.
The ItemFileReadStore has been replaced with the dojo/Store. You should be able to put the data into a dojo/store/Memory as is and query from that store.
http://dojotoolkit.org/reference-guide/1.8/dojo/store.html
http://dojotoolkit.org/reference-guide/1.8/dojo/store/Memory.html#dojo-store-memory
I already did use Object Store (Memory) to resolve the issue.

Looking for ajax multi-upload solution using struts2

Our team is looking to support multiple concurrent uploads in struts2 (i.e. "ajaxy", gmail-style file uploads, with progress bars, that
begin immediately instead of when the user submits the form).
We are wondering if there are any tips or best practices for
implementing this feature. For example, does struts require any
special handling for XHR multipart requests? Also, is it appropriate
to use the FileUploadInterceptor for this sort of thing, or is it
better to roll our own?
We've briefly looked at ajax-file-upload-struts2
but it looks as
though that project is either abandoned or incomplete (if that's wrong
please let me know).
As for the client side, we've looked at swfupload, plupload, and
uploadify. They seem to have their various strengths/weaknesses but
if anyone has a found a solution that they prefer we'd love to hear
it.
Struts2 already provides multiple file uploads functionality and its a good one in its own since its doing all the underlying work for you.i believe doing yourself means again doing the same work.
you can have look at current implementation of multiple file upload implementation and can tweak it as per your requirements
here is official document for the multiple file upload using struts2
Multiple File Uploads

Resources