Class PassThroughNHttpGetProcessor
java.lang.Object
org.apache.synapse.transport.passthru.api.PassThroughNHttpGetProcessor
- All Implemented Interfaces:
HttpGetRequestProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.axis2.context.ConfigurationContextprotected SourceHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgenerateWsdl(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String serviceName, Map<String, String> parameters) Generate WSDL.protected voidgenerateWsdl2(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String serviceName) Generate WSDL2.protected voidgenerateXsd(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String serviceName, Map<String, String> parameters) Generates Schema.protected static StringWhatever this method returns as the IP is ignored by the actual http/s listener when its getServiceEPR is invoked.protected StringgetServiceName(org.apache.http.HttpRequest request) Returns the service name.protected voidhandleBrowserException(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String msg, Exception e) Handles browser exception.voidinit(org.apache.axis2.context.ConfigurationContext cfgCtx, SourceHandler handler) Initialize the HttpGetProcessorprotected static booleanprotected booleanisServiceListBlocked(String incomingURI) Is the incoming URI is requesting service list and http.block_service_list=true in nhttp.propertiesprotected booleanisWSDLProvidedForProxyService(org.apache.axis2.description.AxisService service) Checks whether a wsdl is provided for a proxy service.voidprocess(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream ostream, boolean isRestDispatching) Process the HTTP GET request.
-
Field Details
-
cfgCtx
protected org.apache.axis2.context.ConfigurationContext cfgCtx -
sourceHandler
-
-
Constructor Details
-
PassThroughNHttpGetProcessor
public PassThroughNHttpGetProcessor()
-
-
Method Details
-
init
public void init(org.apache.axis2.context.ConfigurationContext cfgCtx, SourceHandler handler) throws org.apache.axis2.AxisFault Description copied from interface:HttpGetRequestProcessorInitialize the HttpGetProcessor- Specified by:
initin interfaceHttpGetRequestProcessor- Parameters:
cfgCtx- servers configuration context- Throws:
org.apache.axis2.AxisFault- if an error occurs
-
process
public void process(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream ostream, boolean isRestDispatching) Description copied from interface:HttpGetRequestProcessorProcess the HTTP GET request.- Specified by:
processin interfaceHttpGetRequestProcessor- Parameters:
request- The HttpRequestresponse- The HttpResponsemsgContext- The MessageContextconn- The NHttpServerConnectionostream- The OutputStreamisRestDispatching- Rest dispatching
-
generateWsdl
protected void generateWsdl(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String serviceName, Map<String, String> parameters) Generate WSDL.- Parameters:
response- HttpResponsemsgContext- MessageContextconn- NHttpServerConnectionos- OutputStreamserviceName- service nameparameters- parameters
-
generateWsdl2
protected void generateWsdl2(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String serviceName) Generate WSDL2.- Parameters:
response- HttpResponsemsgContext- MessageContextconn- NHttpServerConnectionos- OutputStreamserviceName- service name
-
getServiceName
Returns the service name.- Parameters:
request- HttpRequest- Returns:
- service name as a String
-
generateXsd
protected void generateXsd(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String serviceName, Map<String, String> parameters) Generates Schema.- Parameters:
response- HttpResponsemsgContext- Current MessageContextconn- NHttpServerConnectionos- OutputStreamserviceName- service nameparameters- url parameters
-
handleBrowserException
protected void handleBrowserException(org.apache.http.HttpResponse response, org.apache.axis2.context.MessageContext msgContext, org.apache.http.nio.NHttpServerConnection conn, OutputStream os, String msg, Exception e) Handles browser exception.- Parameters:
response- HttpResponseconn- NHttpServerConnectionos- OutputStreammsg- messagee- Exception
-
isServiceListBlocked
Is the incoming URI is requesting service list and http.block_service_list=true in nhttp.properties- Parameters:
incomingURI- incoming URI- Returns:
- whether to proceed with incomingURI
-
isWSDLProvidedForProxyService
protected boolean isWSDLProvidedForProxyService(org.apache.axis2.description.AxisService service) Checks whether a wsdl is provided for a proxy service.- Parameters:
service- AxisService- Returns:
- whether the wsdl is provided or not
-
getIpAddress
Whatever this method returns as the IP is ignored by the actual http/s listener when its getServiceEPR is invoked. This was originally copied from axis2- Returns:
- Returns String.
- Throws:
SocketException- if the socket can not be accessed
-
isIP
-