I wanna consume some web services, but I don't wanna use any method where eclipse or other code generation mechanism to generate any SOAP client classes for me.
I want something similar to ksoap (the one I used a loooong time ago when playing with J2ME), which enable me (freely) to create a SOAP request and parse SOAP response, without the need of using generated client codes.
I did some search on this issues in this forum too, but most are advising to use code generation method, and that is not what I'm looking for.
Any suggestion will be appreciated.
Thanks in advance,
Bromo
Never mind, I found what I'm looking for here in Github, and it really suit to my requirements.
Related
First timer here and just starting with (the latest) SonarQube. Are there client libraries to download through the web-api already written and available? And is there a set of JAVA classes established that map to the structure of the JSON that will be returned that already exist? I was able to write my own test JAVA code to connect and to parse using the web api provided for one call I wanted, by building my own classes. But it seems like a lot of work to do this for all the data I hoped to pull and wondered if someone had done it already and/or Sonar provided it. And the web-api is a bit cryptic. Had to hover over values to figure out the exact call. I didn't see what I was looking for in the documentation or here. Or is there a better way to dump the data efficiently out of the GUI? Thank you!
Concerning, JAVA client library to request the SonarQube web services, we do not provide such library. There are lot of great tools to do a HTTP request and parse the JSON (see for instance OkHTTP and GSON).
Concerning "the web-api is a bit cryptic", I would be very interested to hear all your feedbacks about this, please share these feedbacks on the Google Group in order to discuss them and improve SonarQube web services.
As far as I know, the predecessor of JAX-WS (JAX-RPC) was using a
Client-Stub (Proxy) <--> Server-Skeleton (also called serverside stub, or Tie) system for the communication between Client and Service.
But if I am reading on the topic of communication in JAX-WS, I can't find anything relating Skeletons, serverside stubs, or Ties. Neither can I find anyone writing, that JAX-WS no longer needs skeletons. My researches only lead me to JAX-RPC topics, java rmi, or WSDL to Java approaches (SEI-Skeletons, but i don't think that are the skeletons I am looking for). But something in JAX-WS has to handle and steer the work of taking the SOAP-request, marshalling/unmarshalling it with JAXB and giving the parameters to the Methods of the Service Implementation.
Does anyone know, if JAX-WS is still using skeletons/ties on the server side and how they are created (with link to a source would be cool)? And if they are not used anymore, how is their work done?
I hope, my english isn't too bad.
The skeleton is still there but you can't see it.
The "server stub" in the picture below is the skeleton. It is created based on your annotated classe (#WebService), when the application is deployed.
It is still responsible in parsing the content, but now using JAXB.
Take a look at this link:
http://qallme.sourceforge.net/docs/sec_CreatingAWSImplementationSkeleton.html
sudzc is a very good online tool to get a bundled API for sending request to a SOAP service and get response from service using WSDL link of that webservice. I want to know is there is anything available like sudzc for java?
I'm also looking for something like this - there seem to be plenty of WSDL-to-Java utilities out there but most are unmaintained or don't support Android. The closest I can find is this Android ksoap2 stub generator. It appears like the perfect thing but I've not had a great deal of success with it (the generated code is very hit-or-miss), but that might be my WSDL files. Hopefully you have more luck with it.
Would SoapUI do what you need? It's very useful as an interactive testing tool, but it also interfaces with different Java libraries (Axis, Jax, etc) to create Web Services Java code.
Given a public SOAP web service and no WSDL, I need to build a .NET client that can communicate with this service.
I'm a .NET dev looking for a simple way to generate a WSDL file given this url? I'd prefer to do this with some tool directly from my windows development machine but the only thing I've found is the javatowsdl tool in Apache CXF or Axis2. Are there any tools (commercial or otherwise) that would accomplish this? I'm really hoping not to write my own WSDL by hand.
If I have to go the route of the javatowsdl, can this tool be used without having to setup a server to run apache/tomcat, etc? anyone know the steps necessary to actually make this work?
Update: This KB describes generating a proxy via wsdl.exe or VS both of which I've done before. The interesting part of this KB is the part at the top where it mentions using the WSTK from IBM to GET the WSDL in the first place. The WSTK no longer exists and I'm looking for alternatives. http://support.microsoft.com/kb/307324 Hope that helps to clarify things a little.
I didn't see this mentioned, but have you tried appending '?wsdl' to the end of the soap url and trying it out in a browser?
Say for example the url to the service is http://www.someserver.com/service/NewService. Then you could try this in any web browser and see if it works
http://www.someserver.com/service/NewService?wsdl
If the browser pulls up the wsdl, than you can also the same url to wsdl.exe and it will generate the .NET client stubs for you.
Supposing you are using Visual Studio, right click your project and click Add Web Reference. Then enter the end point URL and you should do fine from here. Further details here.
Not sure what you actually want to create the WSDL from...? You say this is about a public SOAP service without WSDL - which means that this service does NOT offer a WSDL by itself already, right?
So what do you know exactly about this service then? Because, if you only know the URL of where to invoke the service without any additional specification (and again, if the service does NOT publish it's WSDL itself already, like on the same URL with an appended ?wsdl), I guess you don't really have any basis to create something from.
So some more info required here I guess...
The usage for Java2WSDL is explained here. It requires Java classes or interfaces describing the web service for it to do the translation (i.e. you can't just give it a SOAP request/response and hope it'll work it out from there). WSDL2Java can generate Java client-side bindings when given a WSDL (which is probably useless if you want to write a .NET web service client). All of this can be done without running a Java application server (because you're not actually hosting the web service, you're just describing its inputs and outputs).
Therefore, if you wanted to go down this path, what you'd have to do is work out the server-side interfaces in Java, and use Java2WSDL to generate the WSDL. From there, you can feed the WSDL into Visual Studio as per the KB article you linked.
I can promise you now that it will be fiddly getting the interfaces correct. Regardless of whether you can get the inputs and outputs correct, there's still the matter of Document vs. RPC and all kinds of other parameters that might not be readily apparent from looking at SOAP requests/responses.
whoAfter lots of reading and research, I found this little gem: http://wscfblue.codeplex.com/ It took the XSD and generated a WSDL file and can also generate the proxy code if you choose. I don't have everything working end to end yet but I thought I'd go ahead a post this for anyone else you might have a similar question. If I remember, I'll post back any notes on this once I'm done.
Now, working with Spring-WS, I sometimes miss the simplicity of working with axis, where you just call a tool on the WSDL and XSD, and it creates the java objects and marshaller configurations, an interface that represents the information in the WSDL, a complete webservice client that implements this interface, and a server stub. Within minutes you can start writing the actual code for the webservice.
With Spring-WS you have much more configuration work to do - you have configure a marshaller, an endpoint, code all the information in the WSDL manually, and using the soap faults from the WSDL in form of java Exceptions seems difficult. Is there any tool that simplifies this work to a similar degree? I understand and appreciate that Spring-WS is flexible and whatnot, but sometimes you just want to whip up a quick webservice.
If you want the quick-and-easy tooled approach, then Spring-WS is not for you. It emphasises flexibility, small footprint and runtime simplicity, at the expense of having a bit more to do at first.
If this isn't what you want, then stick with the more heavyweight stacks like CXF or Axis2.
It's explained on this page: Why Contract First?. Basically, since there are problems to be solved when starting from a WSDL, they have chosen to drop the ball. If you want to work from a WSDL and keep being integrated with Spring, then choose CXF.