test
Class StandAloneEndpoint

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by soaprest.DualProvider
              extended by test.StandAloneEndpoint
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, javax.xml.ws.Provider<javax.xml.transform.Source>

@Copyright
@WebServiceProvider(serviceName="TestService",
                    portName="TestEndpoint",
                    targetNamespace="http://test")
@ServiceMode(value=PAYLOAD)
public class StandAloneEndpoint
extends DualProvider

Stand-alone test endpoint. This shows how to develop an endpoint for a web service that can only be deployed as a stand-alone manner. Such a server will not provide WSDL and schema documents. If these are needed, then the endpoint should be annotated with @SoapRestProvider.

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
          Default version identifier.
 
Constructor Summary
StandAloneEndpoint(boolean returnRestFaults)
          Construct a test web service that will be deployed as a stand-alone web service and may be invoked with either SOAP or ReST.
 
Method Summary
static void main(java.lang.String... args)
          The program that deploys the test web service as a stand-alone service.
 
Methods inherited from class soaprest.DualProvider
deploy, getImplementation, getMessageContext, getWsdlLocation, init, invoke, returnRestFaults, service, setWsdlLocation
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Default version identifier.

See Also:
Constant Field Values
Constructor Detail

StandAloneEndpoint

public StandAloneEndpoint(boolean returnRestFaults)
                   throws java.lang.Exception
Construct a test web service that will be deployed as a stand-alone web service and may be invoked with either SOAP or ReST. Unlike a web service endpoint that is deployed in a container, the constructor may have parameters.

Parameters:
returnRestFaults - Whether to return ReST faults.
Throws:
java.lang.Exception - if the web service provider cannot be constructed.
Method Detail

main

public static void main(java.lang.String... args)
                 throws java.lang.Exception
The program that deploys the test web service as a stand-alone service.

Parameters:
args - The following are the command-line arguments.
  1. The web service URL. The default is http://localhost:7000.
  2. Whether to return ReST faults. The default is false.
Throws:
java.lang.Exception - if the test service cannot be deployed.