You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by as...@apache.org on 2005/07/25 14:31:02 UTC
svn commit: r224719 - in
/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc:
client/CallImpl.java client/ServiceImpl.java handler/MessageContextImpl.java
Author: ashutosh
Date: Mon Jul 25 05:30:54 2005
New Revision: 224719
URL: http://svn.apache.org/viewcvs?rev=224719&view=rev
Log:
Handler integration between JAX-WS and Axis2
Modified:
webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/client/CallImpl.java
webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/client/ServiceImpl.java
webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/handler/MessageContextImpl.java
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/client/CallImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/client/CallImpl.java?rev=224719&r1=224718&r2=224719&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/client/CallImpl.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/client/CallImpl.java Mon Jul 25 05:30:54 2005
@@ -438,8 +438,12 @@
OperationDescription od = new OperationDescription(opName);
if(jaxRpcPhase != null){
- od.setRemainingPhasesInFlow(jaxRpcPhase.getHandlers());
- od.setPhasesOutFlow(jaxRpcPhase.getHandlers());
+ //od.setRemainingPhasesInFlow(jaxRpcPhase.getHandlers());
+ //od.setPhasesOutFlow(jaxRpcPhase.getHandlers());
+ java.util.ArrayList phaseList = new java.util.ArrayList();
+ phaseList.add(jaxRpcPhase);
+ od.setRemainingPhasesInFlow(phaseList);
+ od.setPhasesOutFlow(phaseList);
}
sContext.getServiceConfig().addOperation(od);
}
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/client/ServiceImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/client/ServiceImpl.java?rev=224719&r1=224718&r2=224719&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/client/ServiceImpl.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/client/ServiceImpl.java Mon Jul 25 05:30:54 2005
@@ -51,6 +51,7 @@
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.description.HandlerDescription;
import org.apache.axis2.description.OperationDescription;
import org.apache.axis2.description.ServiceDescription;
import org.apache.axis2.engine.AxisConfiguration;
@@ -88,10 +89,21 @@
jaxRpcHandlerList.addAll(list);
Iterator handlerIter = jaxRpcHandlerList.iterator();
while(handlerIter.hasNext()){
- Object handlerObject = handlerIter.next();
+ HandlerInfo handlerInfoObject = (HandlerInfo)handlerIter.next();
+ Object handlerObject = null;
+ try{
+ handlerObject = handlerInfoObject.getHandlerClass().newInstance();
+ } catch(Exception e){
+ e.printStackTrace();
+ }
Axis2Handler axisHandler = null;
if(handlerObject instanceof AbstractHandler){
axisHandler = new Axis2Handler((AbstractHandler)handlerObject);
+ //Pass as much information as possible from HandlerInfo to HandlerDescription:
+ //Don't see a way to pass the configuration or headers to HandlerDescription
+ //directly
+ HandlerDescription axisHandlerDesc = new HandlerDescription(new QName("Jax-Rpc Handler"));
+ axisHandler.init(axisHandlerDesc);
}
if(axisHandler != null){
jaxRpcPhase.addHandler(axisHandler);
@@ -102,7 +114,7 @@
return null;
}
- private ServiceContext getAxis2Service(Phase p)throws AxisFault{
+ private ServiceContext getAxis2Service()throws AxisFault{
/*AxisConfiguration axisConfig = new AxisConfigurationImpl();
ConfigurationContext configContext = new ConfigurationContext(axisConfig);
AxisEngine engine = new AxisEngine(configContext);
@@ -120,13 +132,7 @@
} catch(Exception e){
e.printStackTrace();
}
- /*OperationDescription od = new OperationDescription(new QName("TemplateOperatin")
- );
- if(p != null){
- od.setRemainingPhasesInFlow(p.getHandlers());
- od.setPhasesOutFlow(p.getHandlers());
- }
- description.addOperation(od);*/
+
sysContext.getAxisConfiguration().addService(description);
ServiceContext sContext = new ServiceContext(description, sysContext);
@@ -152,7 +158,7 @@
//INFORMATION TO AXIS2 INFORMATION(SPECIFICALLY HANDLER INFO)
try{
((CallImpl)call).jaxRpcPhase = createAxis2Phase((CallImpl)call);
- ((CallImpl)call).sContext = getAxis2Service(((CallImpl)call).jaxRpcPhase);
+ ((CallImpl)call).sContext = getAxis2Service();
} catch (Exception e){
e.printStackTrace();
}
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/handler/MessageContextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/handler/MessageContextImpl.java?rev=224719&r1=224718&r2=224719&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/handler/MessageContextImpl.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/src/org/apache/axis/jaxrpc/handler/MessageContextImpl.java Mon Jul 25 05:30:54 2005
@@ -33,6 +33,19 @@
*/
public MessageContextImpl(org.apache.axis2.context.MessageContext amc){
axisMC = amc;
+ //Set of check conditions to find out is the message is out/in bound message
+ //at server or client
+ if(axisMC.isResponseWritten() == false && axisMC.isServerSide() == false)
+ setProperty(MessageContext.MESSAGE_OUTBOUND_PROPERTY, true);
+ else if(axisMC.isResponseWritten() == true && axisMC.isServerSide() == false)
+ setProperty(MessageContext.MESSAGE_OUTBOUND_PROPERTY, false);
+ else if(axisMC.isResponseWritten() == false && axisMC.isServerSide() == true)
+ setProperty(MessageContext.MESSAGE_OUTBOUND_PROPERTY, false);
+ else
+ setProperty(MessageContext.MESSAGE_OUTBOUND_PROPERTY, true);
+
+ // Security Configuration not dealt with yet
+ setProperty(MessageContext.MESSAGE_SECURITY_CONFIGURATION, null);
}
public void setPropertyScope(String name, Scope scope)