Hi I am new to SOAP web services and trying to create a client. I am following This tutorial but the problem which I am facing is Sometimes it generates the client stub in the form of .java files and sometimes it generates proper client with some .jsp pages like test.jsp, intput.jsp etc.
I have tried searching a lot on internet. Please let me know why it generates two different kind of clients though I am following the same process.
I have generated my client using wsimport but I just want to know, what is causing eclipse to generate two different clients at different times. may be some bug or some detail that I have missed.
The difference is most likely caused by selecting a different value in step 6 of the tutorial, when you select which kind of client should be generated: Move the Client slider to the Test Client position .
When you run the Eclipse WTP wizard, you get to choose which client you want to have. The JSPs that are generated are simply an input test form to test your web service.
Related
Sorry if this question doesnt make sense, but I don't know how else to ask. Let me describe my problem.
There are two projects A and B. Project B team has provided me with a WSDL File and url. They gave a demo of this API in Soap UI in which if you input data like name, age, address, etc., you get a ticket number in return.
Now my project is in Java Spring boot. I have the data name, age, address, etc., in my project A database. I have to send this to Project B using the url they provided and save the ticket number in the response in my database.
So my question is what exactly do I need to search to learn about this Soap UI and WSDL file? How do I send data to this WSDL file? I am a noob so I dont even know what search terms to google to find this answer. Can anyone explain this process if possible?
Do I need to make a rest template calling this url?
The WSDL file you received, it's just a definition (or schema) of how the server should work (in your case it's as a simulation of project B).
SoapUI is just a utility that runs a simple server, and WSDL defines how this server responds.
So, the WSDL file it's like a config of the SoapUI app. And SoapUI it's a web server simulator.
Your Project A should be able to send HTTP requests. Where to send it? - SoapUI
Looks like Project B consumes SOAP requests. Your WSDL file tells you the requests it supports and the format of each request. Spring with help from the maven-jaxb2-plugin can make this easy for you. This plugin will create Java classes that represent the messages in the WSDL and Spring provides classes that make invoking the requests straight forward. See this for a full example of how to do this.
You can generate classes from given wsdl file. And you can see methods which you must send data.
You can try some ways for generate java classes from wsdl. IntelljIdea or Eclipse or Netbeans or other tools.
Or try reficio lib
https://github.com/reficio/soap-ws
I have a java listener for working with Docusign connect. Checking out the logs for the connect calls I see the XML as I expected with form fields populated. However, for some reason when the object gets deserialized in the form data section is null. I think it may be related to the below SO question
Why is my WCF web service presenting this object in a different namespace with different field names?
I'm using apache CXF and Maven to download the API objects from
https://www.docusign.net/api/3.0/api.asmx?wsdl
However, the deserialized object looks to be different to the XML sent from connect. Has anyone come across this before or have gotten a listener working in java which can access the forms fields?
Thanks,
Derm
I've never built a Java DocuSign Connect listener application, but I have built one with C#, and I did so by starting with the sample code on GitHub. The Java code is here -- https://github.com/docusign/DocuSign-eSignature-SDK/tree/master/Java/Connect -- if nothing else, perhaps comparing it with what you've got may help you identify the issue(s). Or, you might choose to start over by using the GitHub sample app as the basis for building your listener app -- the C# listener app was plug-and-play, I'd expect the Java version to be the same.
guys!
I'm kinda new to WS, as well to Java, and i wondered if you could help me.
I gotta create a WS ( Don't tell me?! ;) ) and a need to deploy it to TomCat but, i "don't" know how to do it. My WS's are meant to do some access to SP's in a database and return the results.
Simple. Its already done. Used NetBeans, developed, published on my own PC and cretead a desktop application in C# and added the WSs reference. Works great.
The thing is: the people that im going to send my WS are in other State, far away from here. I wanted to know how to do it. I saw that i can right click on the webService (The WS it self, localized inside the WebService projects folder "Web Services" generated by NetBeans) and click on "Generate and copy WSDL", get this wsdl file, send to the people that i want and they put it inside the "WebApps" folder on their TomCat Server, and whoever accesses de server can see my services.
Is that correct? If not, how can i do it?
One more thing: i created a class in java to access the database, with the connection string. There is some kinda of ".config" that i can put these information in? I didn't find that on the WebService project i created...
Thanks for the patience!
Just sending WSDL will be not enough since that just defines the protocol and operations of the WS. It does not say anything about implementation. What you need to do is generate a web archive package (.war, think of it as a .jar for webapp) and send that to the customer that you are writing it for. They can then deploy it on to their server.
I have created a WebService in NetBeans, and am using it in Android.
On the localhost it works fine, but when testing for deploying to server it gives an Exception:
"org.xmlpull.v1.xmlpullparserexception:expected START_TAG"
What am I doing wrong?
Well the exception seems to indicate that a start tag is missing - do you have the web service tags wrapped around your content?
Sometimes permissions can be different when testing locally rather than remotely. It can also be different depending on how you're testing it - for example, if you're testing in a web browser, missing tags can often be fixed automatically by the browser so that the page can be displayed - this isn't the case with some stricter XML parsing libraries.
If you could post some code, we might be able to help solve your actual problem rather than guessing what's wrong.
I have followed this tutorial http://netbeans.org/kb/docs/websvc/gs-axis.html and successfully created the web service. When i run the sample i only see the result printed not the whole xml structure as shown in the tutorial.
second when i create a client that will point to the .wdsl and check the asynchronous option .. netbeans creates 6 files after that !!
HelloAxisworldHttpSoap11endpoint
HelloAxisworldHttpsSoap11endpoint
HelloAxisworldHttpSoap12endpoint
HelloAxisworldHttpsSoap12endpoint
HelloAxisworldHttpendpoint
HelloAxisworldHttpsendpoint
can i know what are these files ? and how can i consume my simple function that was created ?
many Thanks
Files having Soap11 in file names are supportive to SOAP 1.1 version and Soap12 to SOAP 1.2 version. Files having Https denote that webservice can be accessed in secure mode.
You can't see the XML structure because you are in a web browser. Press ctrl+u or go to your browser's option "See sourcecode" in order to see the entire XML response.