I have a GAE web service with a few GETs and POSTs, I am required to have a WSDL of the web service.
I have found several pages and posts about generating a web service from WSDL but how would I generate a WSDL from an already created web service? I was told this is possible with only a few clicks in Eclipse.
Typically the WebService producer gives you the WSDL. Most web services you are able to get to the WSDL by postfixing ?WSDL to the URL. Keep in mind that, some web service providers disable this feature.
That is if you have a web service here
http://hostname:1234/webservice
you can use
http://hostname:1234/webservice?wdsl
to retrieve the WSDL
Related
My application has a SOAP web service implemented using Apache CXF. I'm not using Spring or EJB, it's just a simple web application deployed in an application container (Payara). The web service is configured through web.xml and sun-jaxws.xml and deployed automatically. It's completely written by source code with annotations (#WebService, #WebMethod, etc) without any pre-existing WSDL file.
I need to secure it with WS-Security but I can't find how...
The most promising solution is configuring an out interceptor as this page indicates, but I don't know how to get an instance of Server or Endpoint of my deployed WS. If I use the ServerFactoryBean class, I'm creating a new Server object, but will this help me if my WS is deployed by the container?
So, how can I obtain a org.apache.cxf.endpoint.Server? Other ways of adding security to my WS?
I haven't had to build a service yet, only a consumer but you may want to take a look at the Apache CXF examples available on github under the ws_security directory.
Apache CXF Examples Page
Apache CXF GitHub Examples Repo
After hours of working I have found a way to create a SOAP client that performs calls to web servers. I did two tests on public web servers and everything went okay. When I did a project with another server I got an error:
Web Service Client can not be created by JAXWS:wsimport utility.
Reason: 'Any' Property already defined. Use <jaxb:property> to
resolve this conflict
I am using Java EE 7 and Netbeans to create the web service client.
The problem maybe is that this web server requires a username and password to download the WSDL file.
How I can resolve this, and how can I enter a username and password to request the WSDL file?
EDIT:
The problem is not related to SSL, beacause I can access to WSDL from browser.
I have create one simple web service and I deploy it to the axis2 web application based on this tutorial
After creating my service, I am able to deploy it to the server and I can see the WSDL file by this url: localhost:8084/axis2/services/HelloAxisWorld?wsdl
Now, I want to call this service by an independent java application. I found some pieces of code that makes the invocation, but I am facing problems because I suppose that I don't include the proper libraries in my project.
Does anybody knows an example to call the web service by using axis2?
A simple Google for 'axis2 client tutorial' gives me this. It covers setting up your classpath properly, generating java from the WSDL via wsdl2java, and developing the client from this.
I need to invoke aws through SOAP by using java.Is there any application that create SOAP request ?. I mean while giving WSDL link it should create a SOAP query and should allow to invoke.i have tried out eclipse addon but it doesnot creating SOAP request..Can any one help...?
Is there any application that create SOAP request ?.
soapUI
soapUI is a tool for functional testing, mainly of Web Services like SOAP based Web Services and REST Web Services, but also HTTP based services and JMS Services as well as databases. soapUI is an Open Source tool with a commercial companion, soapUI Pro, with extra functionality for companies with mission critical Web Services. soapUI is being produced by the community as well as the Open Source company eviware.
After developing a web service on Eclipse, based on Axis1 and JBoss, I deploy it and test it with soapUI. It works perfectly.
Eclipse generates a wsdl file which I use in Eclipse's new web service client wizard to create an application client that consumes the web service. It generates the client code perfectly, but when I invoke some operations, I get the following error:
org.xml.sax.SAXException: Invalid element int ClassX - variableName.
How's that even possible? Everything was done using Eclipse's webservices tools for both generating the web service and the client. How can I check that my web service is getting generated correctly? What conditions should a complex object that is sended over a web service follow?
https://issues.apache.org/jira/browse/AXIS-2545
Is this along the same lines as your problem? I remember the wsdl axis tool sometimes mismatches element names, so instead of
elemField.setFieldName("**EventID**");
elemField.setXmlName(new javax.xml.namespace.QName("", "EventID"));
it comes out as
elemField.setFieldName("**eventID**");
elemField.setXmlName(new javax.xml.namespace.QName("", "EventID"));