[mashup-dev] svn commit r6816 -
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer
svn at wso2.org
svn at wso2.org
Sun Sep 2 00:27:19 PDT 2007
Author: keith
Date: Sun Sep 2 00:27:16 2007
New Revision: 6816
Modified:
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
Log:
Fix for Mashup-255
Modified: trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
==============================================================================
--- trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java (original)
+++ trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java Sun Sep 2 00:27:16 2007
@@ -253,8 +253,11 @@
axisService.setClassLoader(currentFile.getClassLoader());
String name = serviceAnnotationParser.getServiceName();
validateServiceName(name, legalCharactersInServiceName);
+ String interfaceName = name + WSDL2Constants.INTERFACE_PREFIX;
+ axisService.addParameter(WSDL2Constants.INTERFACE_LOCAL_NAME, interfaceName);
axisService.setName(name);
- axisService.setTargetNamespace(serviceAnnotationParser.getTargetNamespace());
+ String targetNamespace = serviceAnnotationParser.getTargetNamespace();
+ axisService.setTargetNamespace(targetNamespace);
axisService.setScope(serviceAnnotationParser.getServiceScope());
axisService.setDocumentation(serviceAnnotationParser.getServiceDocumentation());
@@ -269,8 +272,8 @@
Object object = engine.get(method, engine);
// some id's are not functions
if (object instanceof Function) {
- processOperation(engine, axisService, method, (Function) object,
- schemaGenerator);
+ processOperation(engine, axisService, method, (Function) object, schemaGenerator, interfaceName,
+ targetNamespace);
}
}
axisService.addSchema(schemaGenerator.getSchema());
@@ -289,7 +292,8 @@
//processing the a function present in the deploying javascript file.
private void processOperation(JavaScriptEngine engine, AxisService axisService, String method,
- Function function, SchemaGenerator schemaGenerator) throws AxisFault {
+ Function function, SchemaGenerator schemaGenerator, String interfaceName,
+ String targetNamespace) throws AxisFault {
JavaScriptOperationsAnnotationParser annotationParser = new JavaScriptOperationsAnnotationParser(
function, method);
String schemaTargetNamespace = schemaGenerator.getSchemaTargetNamespace();
@@ -320,6 +324,16 @@
}
AxisOperation axisOp = new InOutAxisOperation(new QName(name));
+ if (!targetNamespace.endsWith("/")){
+ targetNamespace = targetNamespace + "/";
+ }
+ String inputAction = targetNamespace + interfaceName + "/" + name + Java2WSDLConstants.REQUEST;
+ String outAction = targetNamespace + interfaceName + "/" + name + Java2WSDLConstants.RESPONSE;
+ ArrayList wsamappingList = new ArrayList(1);
+ wsamappingList.add(inputAction);
+ axisOp.setWsamappingList(wsamappingList);
+ axisOp.setSoapAction("urn:" + name);
+ axisOp.setOutputAction(outAction);
//set the org.wso2.javascript.rhino.JavaScriptReceiver as the MR for this operation
axisOp.setMessageReceiver(new JavaScriptReceiver());
axisOp.setStyle(WSDLConstants.STYLE_DOC);
More information about the Mashup-dev
mailing list