create a java application running web services for testing purposes
#1 Updated by Constantin Asofiei about 10 years ago
Build a java application running web services covering all features of a SOAP message (soap header, parameter types, fault, etc) and of a WSDL document defining the services (custom types, binding, port type, etc).
The code for this application should be in a non-P2J project, under the
#3 Updated by Constantin Asofiei about 10 years ago
First, please create some simple SOAP services: exposed over both HTTP and HTTPS, with and without parameters; I need this as soon as possible, to be able to move deeper into testing. There are a few freely available SOAP services out there, but I don't want to rely on them.
#4 Updated by Constantin Asofiei about 10 years ago
- for the various CONNECT statement options, I need more than one WSDL file, as we need to cover:
- zero, one or more bindings
- zero, one or more port types
- zero, one or more services
- port types associated with more than one binding
- services associated with zero, one or more port/binding pairs
- http and https support
- user/password access to the WSDL document and to the SOAP endpoint.
As only the
-WSDLoption is mandatory, I need to make sure the target service/port/binding is determined properly.
- for the invocation of service operations, considering that the parameters can be passed in both wrapped and unwrapped mode (see the
dvwsv.pdfdocument), there should be operations with:
- only output messages (one or more)
- only input messages (one or more)
- one input and one output
- one input, more than one output
- more than one input, one output
- at first, is enough to use int and char data types for the parameters (combinations of these two). Subsequently, I need:
- parameters with all supported data types. See the
Defining and passing Web service method parameterschapter in the
dvwsv.pdfdocument for what XML Schema data types are supported.
- complex type parameters, custom data types (see the
GetSupplierBySupplyTypedefined by the
http://www.webservicex.net/medicareSupplier.asmx?WSDLfile as an example).
- support for the request/response SOAP headers. As I understand, this is custom XML data passed or received from the service.
- support for SOAP Fault responses.
- lower priority for now: invoke web services using TABLE and TABLE-HANDLE parameters.
- make sure the network port on which the web services are running can be configured (maybe passed as an argument).
- use axis2 or what other web service library you find useful. tomcat as a container I think is acceptable.
- the server-side of the web service must not be complicated. In some cases, is enough to return the input parameters or, if input parameters are not passed, to return something like "this is nth invocation of this operation".
- build this in phases, from the simple to complex ones. Start with writing WSDL documents configured in various ways, as the operations (and the web service server) can be implemented later. Use the
bprowsdldoc tool to validate the WSDL document.
#6 Updated by Constantin Asofiei about 10 years ago
- the full received SOAP Envelope
- the full sent SOAP Envelope
This will allow us to find what additional prepare is done to the envelope and/or to the nodes exposed to 4GL: SOAP Fault, SOAP Request/Response Header, Request/Response Messages.
#8 Updated by Evgeny Kiselev about 10 years ago
I have problem with SSL. It's not possible to do it in the internal Axis2 web server(SimpleHttpServer).
Here is a link, which explain how it can works in tomcat or other server like jetty.
But it's not about common Axis2 Simple Server. This article about additional settings in Axis2 for servlets in tomcat/jetty/or other app server.
But I've find interesting axis2 jira issue.
In the comment there is solution how to do it, but it's very old solution.
I'm trying to run it in embedded Jetty.
#13 Updated by Constantin Asofiei about 10 years ago
Evgeny Kiselev wrote:
Where I can upload update ?
I've ~20mb zip archive (with axis2 libs and configs).
Commit it to
testcases/uast/web_services/server/ folder. You might want to upload the archive to devsrv01 and commit it from there - depending on your connection, committing directly from your machine might take a while. It will be faster if you checkout the testcases project on devsrv01 and commit from there.
#14 Updated by Evgeny Kiselev about 10 years ago
To run this from IDE need to run class
com.p2j.soap.StartServer. Without parameters it runs on 8080 port.
There is 3 parameters:
- axis2 repository location, by default it is root dir of project
- axis2 configuration, by default it is root dir of project
There are 3 example web services.
#simple_service directory - accept JavaBean object.
#test_service2 directory - simple service which can accept and return String and primitives objects.
#MediCareSupplier directory - this is example of
http://www.webservicex.net/medicareSupplier.asmx?WSDL. It does not have implementation of particular methods and was generated by wsdl2java utility from Axis2 package.
In each service directory there is exits ant's build.xml script. which generate service jar file and put it into Axis2 repository.
Also there is possible to debug each service from IDE.
Jetty implementation with SSL support is comming soon.
#15 Updated by Greg Shah over 9 years ago
- Status changed from WIP to Closed
Marius has done a code review and he notes that the code is acceptable and that this task can be closed.
Please do update this task history with a note about the status of SSL support, so that any future development that is needed can be easily known by reading here.