Can I read WSDL and generate soapUI-like requests using XSLT?
Could you provide a template?
As I could not find an answer anywhere I decided to contruct the Soap Envelope Generator by myself. The full XSLT file is on Google Code.
Related
I am new to Android Programming.
I want to use a RESTful Webservice for my android app where I will be calling a REST API and in response I want to parse the XML Structure, consume the XML tag values and show it in UI.
Can anybody guide me with the required steps and some sample code.
Thanks in advance!
You should glance at Retrofit.
Retrofit helps you to hook up with a server in a very elegant way.
By default, Retrofit expects JSON data but you can set it up to use XML, via the Simple library.
I am working in a spring integration webs service module,where I need to extract all xsd from wsdl. Is there any tool or a way where I can extract all xsd from given wsdl file?
Thanks in advance.
It isn't clrear why just WSDL isn't enough for you.
Try to use SoapUI tool to get deal with that WSDL.
I can guess that you want to generate client model based on the server WSDL.
So, maybe this one can help, too: http://sourceforge.net/projects/wsdl2javawizard ?
Or this http://www.jetbrains.com/idea/webhelp/generate-java-code-from-wsdl-or-wadl-dialog.html, if you use IntelliJ IDEA
Can anyone please explain hot to implement RESTful service and post data in an xml and cnsume the xml at the service and map it to a java bean class? It would be better if an example can be posted. I have tried it using a json object using this
http://www.mkyong.com/webservices/jax-rs/restful-java-client-with-resteasy-client-framework/
but not able to do it with an xml
The same site that you tried the json example also provides a RESTEasy + JAXB example. Hope this helps.
Add to your REST methods:
#Consumes("application/xml") and #Produces("application/xml"). Your method would consume/produce XML.
I need to use the SOAP service of a printer. There is a windows tool to access this service and I used it to generate SOAP requests and responses of the important functions that I need.
Now I should write a client for Linux using Python and I found the easiest way would be to use the suds library with an WSDL file. But I don't have this WSDL!
As I investigated the windows tool (looked at the hexdump of the executables), I came to the conclusion that there probably is no WSDL file at all.
Now my question is, has anybody experience with "reverse engineering" SOAP services and knows tools which could be useful for creating WSDL files for existing services? (Googleing hasn't brought up anything useful yet).
You mentioned this is the SOAP service of a printer. Is the printer's API documented on the manufacturer's site? Does the documentation include the WSDL? Can you get the WSDL from the manufacturer?
If you can get the WSDL from the manufacturer then you're done!
If not, then you have to build the WSDL by yourself because I doubt you can find a tool that generates WSDLs given SOAP samples (when working with SOAP web services you mainly get two kinds of tools: those that generate code from WSDL + those that generate WSDL from code).
It's not hard to create the WSDL if you are familiar with SOAP, WSDL and XSD. You just need a text editor or maybe even a WSDL editor to speed things up.
If you don't have full confidence in your WSDL knowledge, there are still some tools that can get you most of the way to the complete WSDL. Here is a way you could do it:
1 - First you need to create the XML schema for the SOAP payloads. For this you can find tools, even some online. After you have the schema, tweak it to your needs by adding, changing or removing elements.
2 - Now you can use the XSD to generate a WSDL. There is an online tool that does that. It just needs the request/response element types to end with Request/Response. Make sure you read the instructions.
You take your XSD file, change the names of the operations to add the Request/Response suffix and feed it to the WSDL Generator - Web Tool. You will get your WSDL.
Now tweak this WSDL as you like (remove the Request/Response suffixes if you don't need them) then ...
3 - ... make sure you end up with a valid WSDL.
4 - Now you can take your WSDL and use a tool like SoapUI to generate sample requests and responses from it just to verify that you get the proper results back.
Do the SoapUI messages match the messages you started with? If yes, you are done and can feed the WSDL to suds to create the Linux client. If not, tweak the WSDL until you get the result you are after.
Looking for web service that download a webpage (we'll provide the URL), normalize it (gets XHTML) and applies XSLT (which sits on another URL we provide). Must support JSONP style result.
Could anyone suggest something?
Yahoo YQL is the answer: http://developer.yahoo.com/yql/.