gdaniels 02/04/11 09:07:35
Modified: java/src/org/apache/axis MessageContext.java
java/src/org/apache/axis/handlers JWSProcessor.java
Log:
Fix ?wsdl for JWS services - make sure the ServiceDesc is set up
correctly when we make the service. We should really be caching the
SOAPService somewhere..... TODO!!
Revision Changes Path
1.87 +10 -0 xml-axis/java/src/org/apache/axis/MessageContext.java
Index: MessageContext.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/MessageContext.java,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- MessageContext.java 25 Mar 2002 04:44:01 -0000 1.86
+++ MessageContext.java 11 Apr 2002 16:07:35 -0000 1.87
@@ -57,6 +57,7 @@
import org.apache.axis.client.AxisClient;
import org.apache.axis.encoding.TypeMappingRegistry;
+import org.apache.axis.encoding.TypeMapping;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.session.Session;
import org.apache.axis.utils.JavaUtils;
@@ -292,6 +293,15 @@
return axisEngine.getTypeMappingRegistry();
return mappingRegistry;
+ }
+
+ /**
+ * Return the type mapping currently in scope for our encoding style
+ */
+ public TypeMapping getTypeMapping()
+ {
+ return (TypeMapping)getTypeMappingRegistry().
+ getTypeMapping(encodingStyle);
}
/**
1.43 +6 -3 xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java
Index: JWSProcessor.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- JWSProcessor.java 6 Mar 2002 23:39:17 -0000 1.42
+++ JWSProcessor.java 11 Apr 2002 16:07:35 -0000 1.43
@@ -56,8 +56,8 @@
import org.apache.axis.AxisFault;
import org.apache.axis.Constants;
-import org.apache.axis.Handler;
import org.apache.axis.MessageContext;
+import org.apache.axis.description.ServiceDesc;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.providers.java.RPCProvider;
import org.apache.axis.transport.http.HTTPConstants;
@@ -115,7 +115,6 @@
/* Grab the *.jws filename from the context - should have been */
/* placed there by another handler (ie. HTTPActionHandler) */
/***************************************************************/
- Runtime rt = Runtime.getRuntime();
String jwsFile = msgContext.getStrProp(Constants.MC_REALPATH);
String rel = msgContext.getStrProp(Constants.MC_RELATIVE_PATH);
if (rel.charAt(0) == '/') {
@@ -207,7 +206,6 @@
// Process proc = rt.exec( "javac " + jFile );
// proc.waitFor();
Compiler compiler = CompilerFactory.getCompiler();
- String[] args = null ;
compiler.setClasspath(getDefaultClasspath(msgContext));
compiler.setDestination(outdir);
@@ -274,6 +272,11 @@
* configure this in the future.
*/
rpc.setOption( "allowedMethods", "*");
+
+ // Set up service description
+ ServiceDesc sd = rpc.getServiceDescription();
+ sd.setImplClass(cl.loadClass(clsName));
+ sd.setTypeMapping(msgContext.getTypeMapping());
rpc.init(); // ??
if (doWsdl)