/** * @param doc * @param operation * @return Returns Element. */ protected Element getOutputParamElement(Document doc, AxisOperation operation) { Element param = super.getOutputParamElement(doc, operation); addCSpecifcAttributes(doc, operation, param, WSDLConstants.MESSAGE_LABEL_OUT_VALUE); return param; }
/** * @param doc * @param operation * @return Returns the parameter element. */ protected Element[] getInputParamElement(Document doc, AxisOperation operation) { Element[] param = super.getInputParamElement(doc, operation); for (int i = 0; i < param.length; i++) { addCSpecifcAttributes(doc, operation, param[i], WSDLConstants.MESSAGE_LABEL_IN_VALUE); } return param; }
/** * Update mapper for message receiver */ protected void updateMapperForMessageReceiver() { updateMapperClassnames(getFullyQualifiedMessageReceiverName()); }
/** * Emit the skeltons * * @throws CodeGenerationException */ public void emitSkeleton() throws CodeGenerationException { try { // write skeleton writeCSkel(); // write a Service Skeleton for this particular service. writeCServiceSkeleton(); //create the build script emitBuildScript(); writeServiceXml(); writeVCProjectFile(); } catch (Exception e) { e.printStackTrace(); } } /**
/** @throws Exception */ protected void writeCServiceSkeleton() throws Exception { Document skeletonModel = createDOMDocumentForServiceSkeletonXML(); addGenerateMessageContextAttr(skeletonModel); CSvcSkeletonWriter writer = new CSvcSkeletonWriter(getOutputDirectory(codeGenConfiguration.getOutputLocation(), codeGenConfiguration.getSourceLocation()), codeGenConfiguration.getOutputLanguage()); writeFile(skeletonModel, writer); }
protected void writeServiceXml() throws Exception { if (this.codeGenConfiguration.isGenerateDeployementDescriptor()) { // Write the service xml in a folder with the Document serviceXMLModel = createDOMDocumentForServiceXML(); FileWriter serviceXmlWriter = new CServiceXMLWriter( getOutputDirectory(this.codeGenConfiguration.getOutputLocation(), codeGenConfiguration.getResourceLocation()), this.codeGenConfiguration.getOutputLanguage()); writeFile(serviceXMLModel, serviceXmlWriter); } } /** Creates the DOM tree for implementations. */
/** * Writes the Ant build. * * @throws Exception */ protected void writeAntBuild() throws Exception { // Write the service xml in a folder with the Document skeletonModel = createDOMDocumentForAntBuild(); debugLogDocument("Document for ant build:", skeletonModel); AntBuildWriter antBuildWriter = new AntBuildWriter(codeGenConfiguration.getOutputLocation(), codeGenConfiguration.getOutputLanguage()); antBuildWriter.setDatabindingFramework(codeGenConfiguration.getDatabindingType()); antBuildWriter.setOverride(codeGenConfiguration.isOverride()); writeFile(skeletonModel, antBuildWriter); }
/** * Update mapper for the stub */ protected void updateMapperForStub() { updateMapperClassnames(getFullyQualifiedStubName()); }
/** * Adds the soap action * * @param doc * @param rootElement * @param qName */ protected void addSOAPAction(Document doc, Element rootElement, QName qName) { addAttribute(doc, "soapaction", (String) getBindingPropertyFromOperation(WSDL2Constants.ATTR_WSOAP_ACTION, qName), rootElement); }
/** * Emit the stub * * @throws CodeGenerationException */ public void emitStub() throws CodeGenerationException { try { // write interface implementations writeCStub(); writeVCProjectFile(); } catch (Exception e) { //log the error here e.printStackTrace(); } }
/** * A convenient method for the generating optionParam components * * @param doc * @param name * @param value * @return Element */ protected Element generateOptionParamComponent(Document doc, String name, String value) { Element optionParamElement = doc.createElement("optionParam"); addAttribute(doc, "name", name, optionParamElement); addAttribute(doc, "value", value, optionParamElement); return optionParamElement; }
/** * A convenient method for the generating the parameter element * * @param doc * @param paramName * @param paramType * @return DOM Element */ protected Element generateParamComponent(Document doc, String comment, String paramName, String paramType, QName paramQName) { return generateParamComponent(doc,comment, paramName, paramType, null, paramQName, null, false, false); }
/** * @return fully qualified MR name */ protected String getFullyQualifiedMessageReceiverName() { String packageName = codeGenConfiguration.getPackageName(); String localPart = makeJavaClassName(axisService.getName()); return packageName + "." + localPart + MESSAGE_RECEIVER_SUFFIX; }
public void setCodeGenConfiguration(CodeGenConfiguration configuration) { super.setCodeGenConfiguration(configuration); }
/** * Emit the build script * * @throws CodeGenerationException */ public void emitBuildScript() throws CodeGenerationException { try { writeBuildScript(); } catch (Exception e) { e.printStackTrace(); } }
/** * Get the fault element - No header faults are supported * * @param doc * @param operation */ protected Element getFaultElement(Document doc, AxisOperation operation) { Element faultElt = doc.createElement("fault"); Element[] param = getFaultParamElements(doc, operation); for (int i = 0; i < param.length; i++) { faultElt.appendChild(param[i]); } return faultElt; }
/** * Looks for the SOAPVersion and adds it. * * @param doc * @param rootElement */ protected void addSoapVersion(Document doc, Element rootElement) { // loop through the extensibility elements to get to the bindings element addAttribute(doc, "soap-version", (String) axisBinding.getProperty(WSDL2Constants.ATTR_WSOAP_VERSION), rootElement); }
/** * A convenient method for the generating the parameter element * * @param doc * @param paramName * @param paramType * @return DOM Element */ protected Element generateParamComponent(Document doc, String comment, String paramName, String paramType, QName operationName, QName paramQName) { return generateParamComponent(doc, comment, paramName, paramType, operationName, paramQName, null, false, false); }
/** * @return fully qualified skeleton name */ protected String getFullyQualifiedSkeletonName() { String packageName = codeGenConfiguration.getPackageName(); String localPart = makeJavaClassName(axisService.getName()); String skeltonName; if (this.codeGenConfiguration.isBackwordCompatibilityMode()) { skeltonName = packageName + "." + makeJavaClassName(axisService.getBindingName()) + SKELETON_CLASS_SUFFIX_BACK; } else { skeltonName = packageName + "." + localPart + SKELETON_CLASS_SUFFIX; } return skeltonName; }
/** * @param doc * @param rootElement */ protected void fillSyncAttributes(Document doc, Element rootElement) { addAttribute(doc, "isAsync", this.codeGenConfiguration.isAsyncOn() ? "1" : "0", rootElement); addAttribute(doc, "isSync", this.codeGenConfiguration.isSyncOn() ? "1" : "0", rootElement); }