You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by de...@apache.org on 2006/01/07 05:41:33 UTC
svn commit: r366655 - in /webservices/axis2/trunk/java/modules:
tool/ideaplugin/plugin/org/apache/axis2/tools/bean/
tool/ideaplugin/plugin/org/apache/axis2/tools/idea/
tool/ideaplugin/plugin/org/apache/ideaplugin/bean/
tool/ideaplugin/plugin/org/apache...
Author: deepal
Date: Fri Jan 6 20:41:10 2006
New Revision: 366655
URL: http://svn.apache.org/viewcvs?rev=366655&view=rev
Log:
- fix IDEA plug-in to cope with current code base.
- fix jsp problems
Removed:
webservices/axis2/trunk/java/modules/tool/ideaplugin/wsdl2java/
Modified:
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/bean/CodegenBean.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/BottomPanel.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/FirstPanel.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/SecondPanel.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/ServiceArchiveCreator.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/bean/ArchiveBean.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/bean/ServiceObj.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/Axi2PluginPage.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/BottomPanel.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/ClassSelctionPage.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/DescriptorFile.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/FirstFrame.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/OutPage.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/ResourceChooser.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/SelectPanel.java
webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/XMLSelectionPage.java
webservices/axis2/trunk/java/modules/webapp/viewServiceContext.jsp
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/bean/CodegenBean.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/bean/CodegenBean.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/bean/CodegenBean.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/bean/CodegenBean.java Fri Jan 6 20:41:10 2006
@@ -6,6 +6,7 @@
import org.apache.axis2.wsdl.codegen.CommandLineOption;
import org.apache.axis2.wsdl.codegen.CommandLineOptionConstants;
import org.apache.axis2.wsdl.codegen.CommandLineOptionParser;
+import org.apache.wsdl.WSDLConstants;
import org.apache.wsdl.WSDLDescription;
import javax.wsdl.WSDLException;
@@ -16,7 +17,6 @@
import java.util.HashMap;
import java.util.Map;
-
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -41,28 +41,23 @@
* Time: 2:41:26 PM
*/
public class CodegenBean {
+
private String WSDLFileName = null;
- private String output = "E:/CD";
+ private String output = ".";
private String packageName = URLProcessor.DEFAULT_PACKAGE;
- private String language = CommandLineOptionConstants.LanguageNames.JAVA;
+ private String language = "java";
private boolean asyncOnly = false;
private boolean syncOnly = false;
- private boolean serverSide = false;
- private boolean testcase = false;
- private boolean generateServerXml = false;
+ private boolean serverSide = true;
+ private boolean testcase = true;
+ private boolean generateServerXml = true;
+ private String dbType = "";
+
/**
*
*/
- public Map fillOptionMap(boolean isAyncOnly,
- boolean isSyncOnly,
- boolean isServerSide,
- boolean isServerXML,
- boolean isTestCase,
- String WSDLFileName,
- String packageName,
- String selectedLanguage,
- String outputLocation) {
+ public Map fillOptionMap() {
Map optionMap = new HashMap();
//WSDL file name
optionMap.put(CommandLineOptionConstants.WSDL_LOCATION_URI_OPTION,
@@ -71,27 +66,27 @@
getStringArray(WSDLFileName)));
//Async only
- if (isAyncOnly) {
+ if (asyncOnly) {
optionMap.put(CommandLineOptionConstants.CODEGEN_ASYNC_ONLY_OPTION,
new CommandLineOption(
CommandLineOptionConstants.CODEGEN_ASYNC_ONLY_OPTION,
new String[0]));
}
//sync only
- if (isSyncOnly) {
+ if (syncOnly) {
optionMap.put(CommandLineOptionConstants.CODEGEN_SYNC_ONLY_OPTION,
new CommandLineOption(
CommandLineOptionConstants.CODEGEN_SYNC_ONLY_OPTION,
new String[0]));
}
//serverside
- if (isServerSide) {
+ if (serverSide) {
optionMap.put(CommandLineOptionConstants.SERVER_SIDE_CODE_OPTION,
new CommandLineOption(
CommandLineOptionConstants.SERVER_SIDE_CODE_OPTION,
new String[0]));
//server xml
- if (isServerXML) {
+ if (generateServerXml) {
optionMap.put(
CommandLineOptionConstants.GENERATE_SERVICE_DESCRIPTION_OPTION,
new CommandLineOption(
@@ -100,7 +95,7 @@
}
}
//test case
- if (isTestCase) {
+ if (testcase) {
optionMap.put(CommandLineOptionConstants.GENERATE_TEST_CASE_OPTION,
new CommandLineOption(
CommandLineOptionConstants.GENERATE_TEST_CASE_OPTION,
@@ -115,16 +110,16 @@
optionMap.put(CommandLineOptionConstants.STUB_LANGUAGE_OPTION,
new CommandLineOption(
CommandLineOptionConstants.STUB_LANGUAGE_OPTION,
- getStringArray(selectedLanguage)));
+ getStringArray(language)));
//output location
optionMap.put(CommandLineOptionConstants.OUTPUT_LOCATION_OPTION,
new CommandLineOption(
CommandLineOptionConstants.OUTPUT_LOCATION_OPTION,
- getStringArray(outputLocation)));
+ getStringArray(output)));
// System.out.println(page3.getOutputLocation());
- optionMap.put(CommandLineOptionConstants.DATA_BINDING_TYPE_OPTION, new CommandLineOption(
- CommandLineOptionConstants.DATA_BINDING_TYPE_OPTION, getStringArray(0+"")));
+ optionMap.put(CommandLineOptionConstants.DATA_BINDING_TYPE_OPTION, new CommandLineOption(
+ CommandLineOptionConstants.DATA_BINDING_TYPE_OPTION, getStringArray(dbType)));
return optionMap;
}
@@ -138,20 +133,11 @@
public WSDLDescription getWOM(String wsdlLocation) throws WSDLException,
IOException {
InputStream in = new FileInputStream(new File(wsdlLocation));
- return WOMBuilderFactory.getBuilder(org.apache.axis2.wsdl.WSDLConstants.WSDL_1_1).build(in).getDescription();
+ return WOMBuilderFactory.getBuilder(WSDLConstants.WSDL_1_1).build(in).getDescription();
}
public void execute() throws Exception {
- Map optionsMap = fillOptionMap(
- isAsyncOnly(),
- isSyncOnly(),
- isServerSide(),
- isGenerateServerXml(),
- isTestcase(),
- getWSDLFileName(),
- getPackageName(),
- getLanguage(),
- getOutput());
+ Map optionsMap = fillOptionMap();
CommandLineOptionParser parser = new CommandLineOptionParser(optionsMap);
CodeGenerationEngine codegen = new CodeGenerationEngine(parser);
codegen.generate();
@@ -227,6 +213,14 @@
public void setTestcase(boolean testcase) {
this.testcase = testcase;
+ }
+
+ public String getDbType() {
+ return dbType;
+ }
+
+ public void setDbType(String dbType) {
+ this.dbType = dbType;
}
}
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/BottomPanel.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/BottomPanel.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/BottomPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/BottomPanel.java Fri Jan 6 20:41:10 2006
@@ -1,14 +1,7 @@
package org.apache.axis2.tools.idea;
-import javax.swing.JButton;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import javax.swing.*;
+import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.PrintWriter;
@@ -37,15 +30,15 @@
* Date: Jul 20, 2005
* Time: 3:38:12 PM
*/
-public class BottomPanel extends JPanel implements ActionListener{
+public class BottomPanel extends JPanel implements ActionListener {
public static JButton btnNext;
public static JButton btnFinish;
public static JButton btnCancel;
- private Window window;
+ private Java2CodeFrame java2CodeFrame;
- public BottomPanel(Window window) {
- this.window = window;
+ public BottomPanel(Java2CodeFrame java2CodeFrame) {
+ this.java2CodeFrame = java2CodeFrame;
setFont(new Font("Helvetica", Font.PLAIN, 12));
BottomLayout customLayout = new BottomLayout();
@@ -67,7 +60,7 @@
}
- public static void setEnable(boolean next , boolean finish , boolean cancel){
+ public static void setEnable(boolean next, boolean finish, boolean cancel) {
btnNext.setEnabled(next);
btnFinish.setEnabled(finish);
btnCancel.setEnabled(cancel);
@@ -75,25 +68,25 @@
public void actionPerformed(ActionEvent e) {
Object obj = e.getSource();
- if(obj == btnCancel){
- window.setVisible(false);
- Thread.currentThread().setContextClassLoader(window.getClassLoader());
- } else if (obj == btnFinish){
+ if (obj == btnCancel) {
+ java2CodeFrame.setVisible(false);
+ Thread.currentThread().setContextClassLoader(java2CodeFrame.getClassLoader());
+ } else if (obj == btnFinish) {
try {
- window.generatecode();
- JOptionPane.showMessageDialog(window, "Code genaration successful!",
+ java2CodeFrame.generatecode();
+ JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration successful!",
"Axis2 codegeneration", JOptionPane.INFORMATION_MESSAGE);
- window.setVisible(false);
+ java2CodeFrame.setVisible(false);
} catch (Exception e1) {
e1.printStackTrace();
StringWriter writer = new StringWriter();
e1.printStackTrace(new PrintWriter(writer));
- JOptionPane.showMessageDialog(window, "Code genaration failed!" + writer.toString(),
+ JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
"Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
- window.setVisible(false);
+ java2CodeFrame.setVisible(false);
}
- } else if (obj == btnNext){
- window.setPane();
+ } else if (obj == btnNext) {
+ java2CodeFrame.setPane();
}
}
}
@@ -120,8 +113,7 @@
}
public Dimension minimumLayoutSize(Container parent) {
- Dimension dim = new Dimension(0, 0);
- return dim;
+ return new Dimension(0, 0);
}
public void layoutContainer(Container parent) {
@@ -129,11 +121,17 @@
Component c;
c = parent.getComponent(0);
- if (c.isVisible()) {c.setBounds(insets.left+232,insets.top+24,80,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 232, insets.top + 24, 80, 24);
+ }
c = parent.getComponent(1);
- if (c.isVisible()) {c.setBounds(insets.left+312,insets.top+24,80,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 312, insets.top + 24, 80, 24);
+ }
c = parent.getComponent(2);
- if (c.isVisible()) {c.setBounds(insets.left+392,insets.top+24,80,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 392, insets.top + 24, 80, 24);
+ }
}
}
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/FirstPanel.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/FirstPanel.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/FirstPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/FirstPanel.java Fri Jan 6 20:41:10 2006
@@ -2,20 +2,13 @@
import org.apache.axis2.tools.bean.CodegenBean;
-import javax.swing.JButton;
-import javax.swing.JFileChooser;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
+import javax.swing.*;
import javax.swing.filechooser.FileFilter;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
import java.io.File;
/*
@@ -41,7 +34,7 @@
* Date: Jul 20, 2005
* Time: 3:35:47 PM
*/
-public class FirstPanel extends JPanel implements ActionListener {
+public class FirstPanel extends JPanel implements ActionListener, MouseListener {
JLabel lblWSDL;
JTextField txtWSDL;
@@ -59,6 +52,8 @@
txtWSDL = new JTextField("");
add(txtWSDL);
+ txtWSDL.addActionListener(this);
+ txtWSDL.addMouseListener(this);
btnBrowse = new JButton("Browse...");
add(btnBrowse);
@@ -70,20 +65,68 @@
public void actionPerformed(ActionEvent e) {
Object obj = e.getSource();
- if(obj == btnBrowse){
+ if (obj == btnBrowse) {
fc.setFileFilter(new WSDLFileFilter());
int returnVal = fc.showOpenDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
txtWSDL.setText(file.getAbsolutePath());
- BottomPanel.setEnable(true , false , true);
+ BottomPanel.setEnable(true, false, true);
codegenBean.setWSDLFileName(file.getAbsolutePath());
} else {
System.out.println("no file");
}
+ } else if (obj == txtWSDL) {
+ if (txtWSDL.getText() != null && !txtWSDL.getText().trim().equals("")) {
+ BottomPanel.setEnable(true, false, true);
+ codegenBean.setWSDLFileName(txtWSDL.getText().trim());
+ }
+
+ }
+
+ }
+
+ public void mouseClicked(MouseEvent e) {
+ Object obj = e.getSource();
+ if (obj == txtWSDL) {
+ if (txtWSDL.getText() != null && !txtWSDL.getText().trim().equals("")) {
+ BottomPanel.setEnable(true, false, true);
+ codegenBean.setWSDLFileName(txtWSDL.getText().trim());
+ }
+ }
+ }
+
+ public void mouseEntered(MouseEvent e) {
+ }
+
+ public void mouseExited(MouseEvent e) {
+ Object obj = e.getSource();
+ if (obj == txtWSDL) {
+ if (txtWSDL.getText() != null && !txtWSDL.getText().trim().equals("")) {
+ BottomPanel.setEnable(true, false, true);
+ codegenBean.setWSDLFileName(txtWSDL.getText().trim());
+ }
+ }
+ }
+ public void mousePressed(MouseEvent e) {
+ Object obj = e.getSource();
+ if (obj == txtWSDL) {
+ if (txtWSDL.getText() != null && !txtWSDL.getText().trim().equals("")) {
+ BottomPanel.setEnable(true, false, true);
+ codegenBean.setWSDLFileName(txtWSDL.getText().trim());
+ }
}
+ }
+ public void mouseReleased(MouseEvent e) {
+ Object obj = e.getSource();
+ if (obj == txtWSDL) {
+ if (txtWSDL.getText() != null && !txtWSDL.getText().trim().equals("")) {
+ BottomPanel.setEnable(true, false, true);
+ codegenBean.setWSDLFileName(txtWSDL.getText().trim());
+ }
+ }
}
}
@@ -95,11 +138,7 @@
}
String extension = getExtension(f);
if (extension != null) {
- if (extension.equals("wsdl")) {
- return true;
- } else {
- return false;
- }
+ return extension.equals("wsdl");
}
return false;
@@ -115,8 +154,8 @@
String s = f.getName();
int i = s.lastIndexOf('.');
- if (i > 0 && i < s.length() - 1) {
- ext = s.substring(i+1).toLowerCase();
+ if (i > 0 && i < s.length() - 1) {
+ ext = s.substring(i + 1).toLowerCase();
}
return ext;
}
@@ -145,8 +184,7 @@
}
public Dimension minimumLayoutSize(Container parent) {
- Dimension dim = new Dimension(0, 0);
- return dim;
+ return new Dimension(0, 0);
}
public void layoutContainer(Container parent) {
@@ -154,10 +192,16 @@
Component c;
c = parent.getComponent(0);
- if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+8,72,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 8, insets.top + 8, 72, 24);
+ }
c = parent.getComponent(1);
- if (c.isVisible()) {c.setBounds(insets.left+88,insets.top+8,350,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 88, insets.top + 8, 350, 24);
+ }
c = parent.getComponent(2);
- if (c.isVisible()) {c.setBounds(insets.left+448,insets.top+8,90,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 448, insets.top + 8, 90, 24);
+ }
}
}
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/SecondPanel.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/SecondPanel.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/SecondPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/SecondPanel.java Fri Jan 6 20:41:10 2006
@@ -54,7 +54,6 @@
comlanguage = new JComboBox();
comlanguage.addItem("Java");
comlanguage.addItem("C#");
- comlanguage.addItem("C++");
add(comlanguage);
cbg = new ButtonGroup();
@@ -73,10 +72,10 @@
databiding = new JLabel("Select Databinding type");
add(databiding);
databindingType = new JComboBox();
- databindingType.addItem("Default");
- databindingType.addItem("XML_BEANS");
- databindingType.addItem("JAXB");
- databindingType.setEnabled(false);
+ databindingType.addItem("adb");
+ databindingType.addItem("xmlbeans");
+ databindingType.addItem("none");
+ databindingType.setEnabled(true);
add(databindingType);
lblpakage = new JLabel("Set the package name");
@@ -93,18 +92,31 @@
int index = comlanguage.getSelectedIndex();
switch (index) {
case 0: {
- codegenBean.setLanguage(TestConstants.);
+ codegenBean.setLanguage("java");
break;
}
case 1: {
- codegenBean.setLanguage(CommandLineOptionConstants.LanguageNames.C_SHARP);
+ codegenBean.setLanguage("c-sharp");
break;
}
- case 2 : {
- codegenBean.setLanguage(CommandLineOptionConstants.LanguageNames.C_PLUS_PLUS);
+ }
+
+ index = databindingType.getSelectedIndex();
+ switch (index) {
+ case 0: {
+ codegenBean.setDbType("adb");
+ break;
+ }
+ case 1: {
+ codegenBean.setDbType("xmlbeans");
+ break;
+ }
+ case 2: {
+ codegenBean.setDbType("none");
break;
}
}
+
if (rdasync.isSelected()) {
codegenBean.setAsyncOnly(true);
} else if (rdsyn.isSelected()) {
@@ -139,8 +151,7 @@
}
public Dimension minimumLayoutSize(Container parent) {
- Dimension dim = new Dimension(0, 0);
- return dim;
+ return new Dimension(0, 0);
}
public void layoutContainer(Container parent) {
@@ -149,7 +160,7 @@
Component c;
c = parent.getComponent(0);
if (c.isVisible()) {
- c.setBounds(insets.left + 0, insets.top + 5, 200, 20);
+ c.setBounds(insets.left, insets.top + 5, 200, 20);
}
c = parent.getComponent(1);
if (c.isVisible()) {
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/ServiceArchiveCreator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/ServiceArchiveCreator.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/ServiceArchiveCreator.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/axis2/tools/idea/ServiceArchiveCreator.java Fri Jan 6 20:41:10 2006
@@ -33,7 +33,7 @@
// } catch (MalformedURLException e) {
//
// }
- Window win = new Window();
+ Java2CodeFrame win = new Java2CodeFrame();
// win.setClassLoader(contextClasLoader);
win.showUI();
// System.gc();
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/bean/ArchiveBean.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/bean/ArchiveBean.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/bean/ArchiveBean.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/bean/ArchiveBean.java Fri Jan 6 20:41:10 2006
@@ -32,7 +32,7 @@
private boolean singleService = false;
private boolean generetServiceDesc = false;
- private File classLocation ;
+ private File classLocation;
private ClassLoader classLoader;
private String ServiceXML;
@@ -59,6 +59,7 @@
public void setGeneretServiceDesc(boolean generetServiceDesc) {
this.generetServiceDesc = generetServiceDesc;
}
+
public File getClassLocation() {
return classLocation;
}
@@ -107,22 +108,22 @@
this.archiveName = archiveName;
}
- public void finsh(){
+ public void finsh() {
//Creating out File
try {
File outFile = new File(getOutPath());
- File tempfile = new File(outFile,"temp");
- if(!tempfile.exists()){
+ File tempfile = new File(outFile, "temp");
+ if (!tempfile.exists()) {
tempfile.mkdirs();
}
//creating META-INF
- File metainf = new File(tempfile,"META-INF");
- if(!metainf.exists()){
+ File metainf = new File(tempfile, "META-INF");
+ if (!metainf.exists()) {
metainf.mkdir();
}
// Writing services.xml
- File servicexml = new File(metainf,"services.xml");
+ File servicexml = new File(metainf, "services.xml");
FileWriter writer = new FileWriter(servicexml);
writer.write(getServiceXML());
writer.flush();
@@ -130,30 +131,30 @@
//Coping class files
FileCopier fc = new FileCopier();
- fc.copyFiles(getClassLocation(),tempfile,null);
+ fc.copyFiles(getClassLocation(), tempfile, null);
// Coping wsdl files
- File lib = new File(tempfile,"lib");
- if(!lib.exists()){
+ File lib = new File(tempfile, "lib");
+ if (!lib.exists()) {
lib.mkdir();
}
for (int i = 0; i < libs.size(); i++) {
String libname = (String) libs.get(i);
- fc.copyFiles(new File(libname),lib,null);
+ fc.copyFiles(new File(libname), lib, null);
}
//coping wsdl files
for (int i = 0; i < wsdls.size(); i++) {
String libname = (String) wsdls.get(i);
- fc.copyFiles(new File(libname),metainf,null);
+ fc.copyFiles(new File(libname), metainf, null);
}
- String arcivename =getArchiveName();
- if(arcivename.indexOf(".jar") < 0){
- arcivename = arcivename + ".jar";
+ String arcivename = getArchiveName();
+ if (arcivename.indexOf(".aar") < 0) {
+ arcivename = arcivename + ".aar";
}
JarFileWriter jwriter = new JarFileWriter();
- jwriter.writeJarFile(outFile,arcivename,tempfile);
+ jwriter.writeJarFile(outFile, arcivename, tempfile);
//craeting the jar file
deleteDir(tempfile);
//
@@ -166,10 +167,10 @@
}
}
- private boolean deleteDir(File dir) {
+ private boolean deleteDir(File dir) {
if (dir.isDirectory()) {
String[] children = dir.list();
- for (int i=0; i<children.length; i++) {
+ for (int i = 0; i < children.length; i++) {
boolean success = deleteDir(new File(dir, children[i]));
if (!success) {
return false;
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/bean/ServiceObj.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/bean/ServiceObj.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/bean/ServiceObj.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/bean/ServiceObj.java Fri Jan 6 20:41:10 2006
@@ -48,7 +48,7 @@
}
public String toString(){
- String serviceXML = "<service name=\""+ serviceName + "\">\n" +
+ String serviceXML = "<service name=\""+ serviceName + "\" scope=\"transportsession\">\n" +
"<description>\n" +
"Please Type your service description here\n" +
"</description>\n"+
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/Axi2PluginPage.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/Axi2PluginPage.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/Axi2PluginPage.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/Axi2PluginPage.java Fri Jan 6 20:41:10 2006
@@ -1,17 +1,9 @@
package org.apache.ideaplugin.frames;
-import javax.swing.ButtonGroup;
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import org.apache.axis2.tools.idea.Java2CodeFrame;
+
+import javax.swing.*;
+import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/*
@@ -49,8 +41,8 @@
setBackground(Color.white);
Dimension dim = getPreferredSize();
setSize(dim);
- setBounds(200,200,dim.width ,dim.height);
- setBounds(200,200,dim.width ,dim.height);
+ setBounds(200, 200, dim.width, dim.height);
+ setBounds(200, 200, dim.width, dim.height);
Axi2PluginPageLayout customLayout = new Axi2PluginPageLayout();
getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
@@ -61,7 +53,7 @@
cbg.add(service);
getContentPane().add(service);
- javawsdl = new JRadioButton("WSDL2Java codegenaration", false);
+ javawsdl = new JRadioButton("WSDL2Code codegenaration", false);
cbg.add(javawsdl);
getContentPane().add(javawsdl);
@@ -80,10 +72,11 @@
}
- public void showUI(){
+ public void showUI() {
pack();
show();
}
+
public static void main(String args[]) {
Axi2PluginPage window = new Axi2PluginPage();
window.showUI();
@@ -91,17 +84,17 @@
public void actionPerformed(ActionEvent e) {
Object obj = e.getSource();
- if(obj == butCancle){
+ if (obj == butCancle) {
this.hide();
setVisible(false);
- } else if(obj == butOK){
+ } else if (obj == butOK) {
this.hide();
setVisible(false);
- if(javawsdl.isSelected()){
- org.apache.axis2.tools.idea.Window win = new org.apache.axis2.tools.idea.Window();
+ if (javawsdl.isSelected()) {
+ Java2CodeFrame win = new Java2CodeFrame();
win.showUI();
- } else {
- MainFrame window = new MainFrame();
+ } else {
+ ServiceArciveFrame window = new ServiceArciveFrame();
window.setTitle("Service Rchive creation");
window.show();
}
@@ -132,21 +125,31 @@
}
public Dimension minimumLayoutSize(Container parent) {
- return new Dimension(0, 0);
+ return new Dimension(0, 0);
}
public void layoutContainer(Container parent) {
Insets insets = parent.getInsets();
Component c;
c = parent.getComponent(0);
- if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+104,208,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 24, insets.top + 104, 208, 24);
+ }
c = parent.getComponent(1);
- if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+136,208,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 24, insets.top + 136, 208, 24);
+ }
c = parent.getComponent(2);
- if (c.isVisible()) {c.setBounds(insets.left+130,insets.top+200,80,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 130, insets.top + 200, 80, 24);
+ }
c = parent.getComponent(3);
- if (c.isVisible()) {c.setBounds(insets.left+215,insets.top+200,80,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 215, insets.top + 200, 80, 24);
+ }
c = parent.getComponent(4);
- if (c.isVisible()) {c.setBounds(insets.left,insets.top,320,80);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left, insets.top, 320, 80);
+ }
}
}
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/BottomPanel.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/BottomPanel.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/BottomPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/BottomPanel.java Fri Jan 6 20:41:10 2006
@@ -3,15 +3,8 @@
import org.apache.ideaplugin.bean.ArchiveBean;
import org.apache.ideaplugin.bean.ObjectKeeper;
-import javax.swing.JButton;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import javax.swing.*;
+import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/*
@@ -42,12 +35,12 @@
JButton butNext;
JButton btnFinsh;
JButton btnCanclel;
- MainFrame parent;
+ ServiceArciveFrame parent;
private ArchiveBean bean;
private JPanel currentPanel = null;
- public BottomPanel(JPanel currPanel, MainFrame parent,ArchiveBean bean) {
+ public BottomPanel(JPanel currPanel, ServiceArciveFrame parent, ArchiveBean bean) {
BottomPanelLayout customLayout = new BottomPanelLayout();
setFont(new Font("Helvetica", Font.PLAIN, 12));
@@ -94,22 +87,22 @@
parent.setVisible(false);
}
if (obj == butNext) {
- ((ObjectKeeper)currentPanel).fillBean(bean);
- currentPanel =((ObjectKeeper)currentPanel).getNext();
+ ((ObjectKeeper) currentPanel).fillBean(bean);
+ currentPanel = ((ObjectKeeper) currentPanel).getNext();
parent.Next(currentPanel);
- if(currentPanel instanceof DescriptorFile){
- parent.setEnable(false,true,false,true);
+ if (currentPanel instanceof DescriptorFile) {
+ parent.setEnable(false, true, false, true);
}
- } else if (obj == btnFinsh){
- ((ObjectKeeper)currentPanel).fillBean(bean);
+ } else if (obj == btnFinsh) {
+ ((ObjectKeeper) currentPanel).fillBean(bean);
bean.finsh();
JOptionPane.showMessageDialog(parent, "Service creation successful!",
"Axis2 Service creation", JOptionPane.INFORMATION_MESSAGE);
parent.setVisible(false);
- } else if(obj == butBack){
- currentPanel =((ObjectKeeper)currentPanel).getPrivious();
+ } else if (obj == butBack) {
+ currentPanel = ((ObjectKeeper) currentPanel).getPrivious();
parent.Back(currentPanel);
}
}
@@ -137,8 +130,7 @@
}
public Dimension minimumLayoutSize(Container parent) {
- Dimension dim = new Dimension(0, 0);
- return dim;
+ return new Dimension(0, 0);
}
public void layoutContainer(Container parent) {
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/ClassSelctionPage.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/ClassSelctionPage.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/ClassSelctionPage.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/ClassSelctionPage.java Fri Jan 6 20:41:10 2006
@@ -46,11 +46,11 @@
File file;
Insets insets;
- MainFrame parent;
+ ServiceArciveFrame parent;
// protected SelectPanel selectPanel;
- public ClassSelctionPage(MainFrame parent) {
+ public ClassSelctionPage(ServiceArciveFrame parent) {
this.parent = parent;
setFont(new Font("Helvetica", Font.PLAIN, 12));
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/DescriptorFile.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/DescriptorFile.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/DescriptorFile.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/DescriptorFile.java Fri Jan 6 20:41:10 2006
@@ -41,7 +41,7 @@
protected JTextArea desArea;
protected JButton butaddpara;
protected JButton addModuleRef;
- protected MainFrame parent;
+ protected ServiceArciveFrame parent;
protected Insets insets;
protected JScrollPane sp;
@@ -49,7 +49,7 @@
protected ModuleDialog mdouledialog;
private JPanel previous;
- public DescriptorFile(MainFrame parent, String XML) {
+ public DescriptorFile(ServiceArciveFrame parent, String XML) {
this.parent = parent;
setFont(new Font("Helvetica", Font.PLAIN, 12));
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/FirstFrame.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/FirstFrame.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/FirstFrame.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/FirstFrame.java Fri Jan 6 20:41:10 2006
@@ -48,9 +48,9 @@
private JPanel previous;
protected ClassSelctionPage classPage;
- MainFrame parent;
+ ServiceArciveFrame parent;
- public FirstFrame(MainFrame parent) {
+ public FirstFrame(ServiceArciveFrame parent) {
this.parent = parent;
FirstFrameLayout customLayout = new FirstFrameLayout();
setFont(new Font("Helvetica", Font.PLAIN, 12));
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/OutPage.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/OutPage.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/OutPage.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/OutPage.java Fri Jan 6 20:41:10 2006
@@ -3,17 +3,8 @@
import org.apache.ideaplugin.bean.ArchiveBean;
import org.apache.ideaplugin.bean.ObjectKeeper;
-import javax.swing.JButton;
-import javax.swing.JFileChooser;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import javax.swing.*;
+import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
@@ -48,11 +39,11 @@
JTextField txtjarName;
public final JFileChooser fc = new JFileChooser();
- MainFrame parent;
+ ServiceArciveFrame parent;
private JPanel previous;
- public OutPage( MainFrame parent) {
+ public OutPage(ServiceArciveFrame parent) {
this.parent = parent;
OutPageLayout customLayout = new OutPageLayout();
@@ -98,31 +89,31 @@
}
public JPanel getPrivious() {
- return this.previous;
+ return this.previous;
}
public String getTopLable() {
- return "Output location selection";
- }
+ return "Output location selection";
+ }
- public String getLable() {
- return "Select output location and archive name";
- }
+ public String getLable() {
+ return "Select output location and archive name";
+ }
public void actionPerformed(ActionEvent e) {
Object obj = e.getSource();
- if(obj == butselect){
+ if (obj == butselect) {
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
int returnVal = fc.showOpenDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
File newfile = fc.getSelectedFile();
txtoutput.setText(newfile.getAbsolutePath());
- } else {
+ } else {
txtoutput.setText("");
}
- parent.setEnable(false,false,true,true);
+ parent.setEnable(false, false, true, true);
}
}
}
@@ -149,8 +140,7 @@
}
public Dimension minimumLayoutSize(Container parent) {
- Dimension dim = new Dimension(0, 0);
- return dim;
+ return new Dimension(0, 0);
}
public void layoutContainer(Container parent) {
@@ -158,15 +148,25 @@
Component c;
c = parent.getComponent(0);
- if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+16,152,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 8, insets.top + 16, 152, 24);
+ }
c = parent.getComponent(1);
- if (c.isVisible()) {c.setBounds(insets.left+168,insets.top+16,312,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 168, insets.top + 16, 312, 24);
+ }
c = parent.getComponent(2);
- if (c.isVisible()) {c.setBounds(insets.left+488,insets.top+16,72,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 488, insets.top + 16, 72, 24);
+ }
c = parent.getComponent(3);
- if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+56,152,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 8, insets.top + 56, 152, 24);
+ }
c = parent.getComponent(4);
- if (c.isVisible()) {c.setBounds(insets.left+168,insets.top+56,312,24);}
+ if (c.isVisible()) {
+ c.setBounds(insets.left + 168, insets.top + 56, 312, 24);
+ }
}
}
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/ResourceChooser.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/ResourceChooser.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/ResourceChooser.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/ResourceChooser.java Fri Jan 6 20:41:10 2006
@@ -68,9 +68,9 @@
private JPanel previous;
public final JFileChooser fc = new JFileChooser();
- MainFrame parent;
+ ServiceArciveFrame parent;
- public ResourceChooser(MainFrame parent) {
+ public ResourceChooser(ServiceArciveFrame parent) {
this.parent = parent;
ResourceChooserLayout customLayout = new ResourceChooserLayout();
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/SelectPanel.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/SelectPanel.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/SelectPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/SelectPanel.java Fri Jan 6 20:41:10 2006
@@ -62,7 +62,7 @@
private JPanel previous;
protected File file;
protected Insets insets;
- protected MainFrame parent;
+ protected ServiceArciveFrame parent;
protected String fileName;
protected int count = 1;
protected HashMap operations;
@@ -70,7 +70,7 @@
protected DescriptorFile disfile;
protected String sgXMl;
- public SelectPanel(MainFrame parent , File file ) {
+ public SelectPanel(ServiceArciveFrame parent , File file ) {
this.parent = parent;
this.file =file;
Modified: webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/XMLSelectionPage.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/XMLSelectionPage.java?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/XMLSelectionPage.java (original)
+++ webservices/axis2/trunk/java/modules/tool/ideaplugin/plugin/org/apache/ideaplugin/frames/XMLSelectionPage.java Fri Jan 6 20:41:10 2006
@@ -51,8 +51,8 @@
String value;
private JPanel previous;
- protected MainFrame parent;
- public XMLSelectionPage(MainFrame parent) {
+ protected ServiceArciveFrame parent;
+ public XMLSelectionPage(ServiceArciveFrame parent) {
Insets insets = parent.getInsets();
this.parent = parent;
setFont(new Font("Helvetica", Font.PLAIN, 12));
Modified: webservices/axis2/trunk/java/modules/webapp/viewServiceContext.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/viewServiceContext.jsp?rev=366655&r1=366654&r2=366655&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/viewServiceContext.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/viewServiceContext.jsp Fri Jan 6 20:41:10 2006
@@ -5,6 +5,7 @@
<%@ page import="java.util.Hashtable" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Map" %>
+<%@ page import="org.apache.axis2.description.AxisService"%>
<%--
Created by IntelliJ IDEA.
User: Indika Deepal
@@ -23,9 +24,10 @@
String sgID = request.getParameter("PID");
String ID = request.getParameter("ID");
ServiceGroupContext sgContext = (ServiceGroupContext) serviceGroupContextsMap.get(sgID);
+ AxisService service = sgContext.getDescription().getService(ID);
ServiceContext serviceContext = null;
if (sgContext != null) {
- serviceContext = sgContext.getServiceContext(ID);
+ serviceContext = sgContext.getServiceContext(service);
}
if (sgID != null && serviceContext != null) {
if (type != null) {