Author: keith Date: Tue Jun 10 02:28:20 2008 New Revision: 18277 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=18277
Log: Fixing deployer to be compatible with WSAS 2.3 Modified: trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java Modified: trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java?rev=18277&r1=18276&r2=18277&view=diff ============================================================================== --- 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 Tue Jun 10 02:28:20 2008 @@ -1015,9 +1015,9 @@ if (inMessage != null) { Object inputTypes = annotationParser.getInputTypesNameObject(); inMessage.setName(method + Java2WSDLConstants.MESSAGE_SUFFIX); - AxisBindingMessage inBindingMessage = new AxisBindingMessage(); - inBindingMessage.setName(inMessage.getName()); - inBindingMessage.setAxisMessage(inMessage); + createAxisBindingMessage(soap11BindingOperation, inMessage); + createAxisBindingMessage(soap12BindingOperation, inMessage); + createAxisBindingMessage(httpBindingOperation, inMessage); // Genarate the input element for the input message using the "inputTypes' // annotation specified by the user @@ -1028,12 +1028,7 @@ inMessage.setElementQName(new QName(schemaTargetNamespace, element.getName())); } - soap11BindingOperation - .addChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE, inBindingMessage); - soap12BindingOperation - .addChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE, inBindingMessage); - httpBindingOperation - .addChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE, inBindingMessage); + } AxisMessage outMessage = axisOp.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE); @@ -1043,10 +1038,9 @@ if (outMessage != null) { outMessage.setName(method + Java2WSDLConstants.RESPONSE_MESSAGE); - AxisBindingMessage outBindingMessage = new AxisBindingMessage(); - outBindingMessage.setName(outMessage.getName()); - outBindingMessage.setAxisMessage(outMessage); - + createAxisBindingMessage(soap11BindingOperation, outMessage); + createAxisBindingMessage(soap12BindingOperation, outMessage); + createAxisBindingMessage(httpBindingOperation, outMessage); // Genarate the output element for the input message using the "outputType' // annotation specified by the user XmlSchemaElement element = @@ -1055,18 +1049,23 @@ if (element != null) { outMessage.setElementQName(new QName(schemaTargetNamespace, element.getName())); } - soap11BindingOperation - .addChild(WSDLConstants.MESSAGE_LABEL_OUT_VALUE, outBindingMessage); - soap12BindingOperation - .addChild(WSDLConstants.MESSAGE_LABEL_OUT_VALUE, outBindingMessage); - httpBindingOperation - .addChild(WSDLConstants.MESSAGE_LABEL_OUT_VALUE, outBindingMessage); + } axisService.addOperation(axisOp); axisConfig.getPhasesInfo().setOperationPhases(axisOp); } } + private void createAxisBindingMessage(AxisBindingOperation bindingOperation, + AxisMessage message) { + AxisBindingMessage inBindingMessage = new AxisBindingMessage(); + inBindingMessage.setName(message.getName()); + inBindingMessage.setAxisMessage(message); + inBindingMessage.setParent(bindingOperation); + bindingOperation + .addChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE, inBindingMessage); + } + /** * Given a name of a JavaScript function this operation converts that function to a string and * extract its defined parameters and put it into an array. _______________________________________________ Mashup-dev mailing list [email protected] http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev
