[Carbon-dev] svn commit r31257 - in branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui: . src/main/java/org/wso2/carbon/dataservices/ui src/main/resources src/main/resources/web/ds

sumedha at wso2.com sumedha at wso2.com
Sun Feb 22 20:03:12 PST 2009


Author: sumedha
Date: Sun Feb 22 20:03:12 2009
New Revision: 31257
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=31257

Log:
BE,FE seperation

Modified:
   branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/pom.xml
   branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/DataServiceAdminClient.java
   branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/DataServiceAdmin.wsdl
   branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/serviceDetails.jsp
   branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/wizardDoneProcessor.jsp

Modified: branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/pom.xml
URL: http://wso2.org/svn/browse/wso2/branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/pom.xml?rev=31257&r1=31256&r2=31257&view=diff
==============================================================================
--- branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/pom.xml	(original)
+++ branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/pom.xml	Sun Feb 22 20:03:12 2009
@@ -54,10 +54,6 @@
 								</java>
                                 <java
 									classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
-									<!--<arg
-										line="-uri src/main/resources/DataServiceAdmin.wsdl -u -uw
-										-o target/generated-code -p org.wso2.carbon.dataservices.ui.service
-										-ns2p http://admin.dataservices.carbon.wso2.org=org.wso2.carbon.dataservices.ui.service.admin,http://admin.dataservices.carbon.wso2.org/xsd=org.wso2.carbon.dataservices.ui.service.admin.xsd"/>-->
                                     <arg
 										line="-uri src/main/resources/DataServiceAdmin.wsdl -u -uw
 										-o target/generated-code -p org.wso2.carbon.dataservices.ui.service

Modified: branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/DataServiceAdminClient.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/DataServiceAdminClient.java?rev=31257&r1=31256&r2=31257&view=diff
==============================================================================
--- branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/DataServiceAdminClient.java	(original)
+++ branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/DataServiceAdminClient.java	Sun Feb 22 20:03:12 2009
@@ -2,6 +2,7 @@
 
 import java.rmi.RemoteException;
 
+import org.apache.axis2.AxisFault;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.context.ConfigurationContext;
@@ -28,15 +29,23 @@
             option.setManageSession(true);
             option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
         } catch (java.lang.Exception e) {
-        	e.printStackTrace();
-            log.error(e);
+            log.error("Error occurred while connecting via stub to :"+serviceEndPoint,e);
             throw e;
         }
     }
     
     public String getDataServiceContents(String serviceId) throws RemoteException {
-    	String contents = (String)stub.getDataServiceContents(serviceId);
+    	String contents = stub.getDataServiceContentAsString(serviceId);
 		return contents;
 	}
     
+    public void saveDataService(String serviceName,String serviceContents) throws AxisFault{
+    	try {
+			stub.saveDataService(serviceName, serviceContents);
+		} catch (RemoteException e) {
+			log.error("Error occurred while saving dataservice : "+serviceName,e);
+			throw new AxisFault("Saving "+serviceName+" failed.");
+		}
+    }
+    
 }

Modified: branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/DataServiceAdmin.wsdl
URL: http://wso2.org/svn/browse/wso2/branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/DataServiceAdmin.wsdl?rev=31257&r1=31256&r2=31257&view=diff
==============================================================================
--- branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/DataServiceAdmin.wsdl	(original)
+++ branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/DataServiceAdmin.wsdl	Sun Feb 22 20:03:12 2009
@@ -69,57 +69,27 @@
         </xs:complexType>
 
     </xs:element>
-    <xs:element name="getDataServiceContents">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" name="serviceId" nillable="true" type="xs:string" />
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="getDataServiceContentsResponse">
-
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" name="return" nillable="true" type="xs:anyType" />
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
     <xs:element name="XMLStreamException">
         <xs:complexType>
             <xs:sequence>
-
                 <xs:element minOccurs="0" name="XMLStreamException" nillable="true" type="xs:anyType" />
             </xs:sequence>
         </xs:complexType>
     </xs:element>
     <xs:element name="getDatabaseUrlDriverListResponse">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:DBServerData" />
-            </xs:sequence>
 
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="getDSMetaData">
         <xs:complexType>
             <xs:sequence>
-                <xs:element minOccurs="0" name="init" nillable="true" type="xs:string" />
+                <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:DBServerData" />
             </xs:sequence>
         </xs:complexType>
     </xs:element>
-
-    <xs:element name="getDSMetaDataResponse">
+    <xs:element name="saveDataService">
         <xs:complexType>
             <xs:sequence>
-                <xs:element minOccurs="0" name="return" nillable="true" type="ax28:DataServiceInfo" />
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="saveDataServiceContents">
-        <xs:complexType>
 
-            <xs:sequence>
-                <xs:element minOccurs="0" name="dataWrapper" nillable="true" type="xs:anyType" />
+                <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string" />
+                <xs:element minOccurs="0" name="serviceContents" nillable="true" type="xs:string" />
             </xs:sequence>
         </xs:complexType>
     </xs:element>
@@ -134,120 +104,81 @@
             <xs:element minOccurs="0" name="serverId" nillable="true" type="xs:string" />
         </xs:sequence>
     </xs:complexType>
-    <xs:complexType name="DataServiceInfo">
-        <xs:sequence>
-            <xs:element minOccurs="0" name="dataWrapper" nillable="true" type="xs:anyType" />
-
-            <xs:element maxOccurs="unbounded" minOccurs="0" name="dbServerData" nillable="true" type="ax28:DBServerData" />
-        </xs:sequence>
-    </xs:complexType>
 </xs:schema>
     </wsdl:types>
-    <wsdl:message name="getDataServiceContentsRequest">
-        <wsdl:part name="parameters" element="ns1:getDataServiceContents" />
-    </wsdl:message>
-    <wsdl:message name="getDataServiceContentsResponse">
-
-        <wsdl:part name="parameters" element="ns1:getDataServiceContentsResponse" />
-    </wsdl:message>
     <wsdl:message name="getAvailableDSRequest" />
+
     <wsdl:message name="getAvailableDSResponse">
         <wsdl:part name="parameters" element="ns1:getAvailableDSResponse" />
     </wsdl:message>
     <wsdl:message name="getHeaderColumnNamesRequest">
         <wsdl:part name="parameters" element="ns1:getHeaderColumnNames" />
     </wsdl:message>
-
     <wsdl:message name="getHeaderColumnNamesResponse">
         <wsdl:part name="parameters" element="ns1:getHeaderColumnNamesResponse" />
     </wsdl:message>
-    <wsdl:message name="saveDataServiceContentsRequest">
-        <wsdl:part name="parameters" element="ns1:saveDataServiceContents" />
+
+    <wsdl:message name="saveDataServiceRequest">
+        <wsdl:part name="parameters" element="ns1:saveDataService" />
     </wsdl:message>
     <wsdl:message name="getDatabaseUrlDriverListRequest" />
     <wsdl:message name="getDatabaseUrlDriverListResponse">
         <wsdl:part name="parameters" element="ns1:getDatabaseUrlDriverListResponse" />
-
     </wsdl:message>
     <wsdl:message name="XMLStreamException">
         <wsdl:part name="parameters" element="ns1:XMLStreamException" />
+
     </wsdl:message>
     <wsdl:message name="testJDBCConnectionRequest">
         <wsdl:part name="parameters" element="ns1:testJDBCConnection" />
     </wsdl:message>
     <wsdl:message name="testJDBCConnectionResponse">
         <wsdl:part name="parameters" element="ns1:testJDBCConnectionResponse" />
-
     </wsdl:message>
     <wsdl:message name="getDataServiceContentAsStringRequest">
         <wsdl:part name="parameters" element="ns1:getDataServiceContentAsString" />
+
     </wsdl:message>
     <wsdl:message name="getDataServiceContentAsStringResponse">
         <wsdl:part name="parameters" element="ns1:getDataServiceContentAsStringResponse" />
     </wsdl:message>
-    <wsdl:message name="getDSMetaDataRequest">
-        <wsdl:part name="parameters" element="ns1:getDSMetaData" />
-
-    </wsdl:message>
-    <wsdl:message name="getDSMetaDataResponse">
-        <wsdl:part name="parameters" element="ns1:getDSMetaDataResponse" />
-    </wsdl:message>
     <wsdl:portType name="DataServiceAdminPortType">
-        <wsdl:operation name="getDataServiceContents">
-            <wsdl:input message="axis2:getDataServiceContentsRequest" wsaw:Action="urn:getDataServiceContents" />
-            <wsdl:output message="axis2:getDataServiceContentsResponse" wsaw:Action="urn:getDataServiceContentsResponse" />
-        </wsdl:operation>
-
         <wsdl:operation name="getAvailableDS">
             <wsdl:input message="axis2:getAvailableDSRequest" wsaw:Action="urn:getAvailableDS" />
             <wsdl:output message="axis2:getAvailableDSResponse" wsaw:Action="urn:getAvailableDSResponse" />
         </wsdl:operation>
+
         <wsdl:operation name="getHeaderColumnNames">
             <wsdl:input message="axis2:getHeaderColumnNamesRequest" wsaw:Action="urn:getHeaderColumnNames" />
             <wsdl:output message="axis2:getHeaderColumnNamesResponse" wsaw:Action="urn:getHeaderColumnNamesResponse" />
         </wsdl:operation>
-        <wsdl:operation name="saveDataServiceContents">
-
-            <wsdl:input message="axis2:saveDataServiceContentsRequest" wsaw:Action="urn:saveDataServiceContents" />
+        <wsdl:operation name="saveDataService">
+            <wsdl:input message="axis2:saveDataServiceRequest" wsaw:Action="urn:saveDataService" />
         </wsdl:operation>
         <wsdl:operation name="getDatabaseUrlDriverList">
             <wsdl:input message="axis2:getDatabaseUrlDriverListRequest" wsaw:Action="urn:getDatabaseUrlDriverList" />
+
             <wsdl:output message="axis2:getDatabaseUrlDriverListResponse" wsaw:Action="urn:getDatabaseUrlDriverListResponse" />
             <wsdl:fault message="axis2:XMLStreamException" name="XMLStreamException" wsaw:Action="urn:getDatabaseUrlDriverListXMLStreamException" />
         </wsdl:operation>
         <wsdl:operation name="testJDBCConnection">
             <wsdl:input message="axis2:testJDBCConnectionRequest" wsaw:Action="urn:testJDBCConnection" />
-
             <wsdl:output message="axis2:testJDBCConnectionResponse" wsaw:Action="urn:testJDBCConnectionResponse" />
         </wsdl:operation>
         <wsdl:operation name="getDataServiceContentAsString">
             <wsdl:input message="axis2:getDataServiceContentAsStringRequest" wsaw:Action="urn:getDataServiceContentAsString" />
-            <wsdl:output message="axis2:getDataServiceContentAsStringResponse" wsaw:Action="urn:getDataServiceContentAsStringResponse" />
-        </wsdl:operation>
-        <wsdl:operation name="getDSMetaData">
-            <wsdl:input message="axis2:getDSMetaDataRequest" wsaw:Action="urn:getDSMetaData" />
-            <wsdl:output message="axis2:getDSMetaDataResponse" wsaw:Action="urn:getDSMetaDataResponse" />
 
+            <wsdl:output message="axis2:getDataServiceContentAsStringResponse" wsaw:Action="urn:getDataServiceContentAsStringResponse" />
         </wsdl:operation>
     </wsdl:portType>
     <wsdl:binding name="DataServiceAdminSoap11Binding" type="axis2:DataServiceAdminPortType">
         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
-        <wsdl:operation name="getDataServiceContents">
-            <soap:operation soapAction="urn:getDataServiceContents" style="document" />
-            <wsdl:input>
-                <soap:body use="literal" />
-            </wsdl:input>
-
-            <wsdl:output>
-                <soap:body use="literal" />
-            </wsdl:output>
-        </wsdl:operation>
         <wsdl:operation name="getAvailableDS">
             <soap:operation soapAction="urn:getAvailableDS" style="document" />
             <wsdl:input>
                 <soap:body use="literal" />
-            </wsdl:input>
 
+            </wsdl:input>
             <wsdl:output>
                 <soap:body use="literal" />
             </wsdl:output>
@@ -256,18 +187,18 @@
             <soap:operation soapAction="urn:getHeaderColumnNames" style="document" />
             <wsdl:input>
                 <soap:body use="literal" />
-            </wsdl:input>
 
+            </wsdl:input>
             <wsdl:output>
                 <soap:body use="literal" />
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="saveDataServiceContents">
-            <soap:operation soapAction="urn:saveDataServiceContents" style="document" />
+        <wsdl:operation name="saveDataService">
+            <soap:operation soapAction="urn:saveDataService" style="document" />
             <wsdl:input>
                 <soap:body use="literal" />
-            </wsdl:input>
 
+            </wsdl:input>
         </wsdl:operation>
         <wsdl:operation name="getDatabaseUrlDriverList">
             <soap:operation soapAction="urn:getDatabaseUrlDriverList" style="document" />
@@ -276,8 +207,8 @@
             </wsdl:input>
             <wsdl:output>
                 <soap:body use="literal" />
-            </wsdl:output>
 
+            </wsdl:output>
             <wsdl:fault name="XMLStreamException">
                 <soap:fault use="literal" name="XMLStreamException" />
             </wsdl:fault>
@@ -286,8 +217,8 @@
             <soap:operation soapAction="urn:getDataServiceContentAsString" style="document" />
             <wsdl:input>
                 <soap:body use="literal" />
-            </wsdl:input>
 
+            </wsdl:input>
             <wsdl:output>
                 <soap:body use="literal" />
             </wsdl:output>
@@ -296,18 +227,8 @@
             <soap:operation soapAction="urn:testJDBCConnection" style="document" />
             <wsdl:input>
                 <soap:body use="literal" />
-            </wsdl:input>
 
-            <wsdl:output>
-                <soap:body use="literal" />
-            </wsdl:output>
-        </wsdl:operation>
-        <wsdl:operation name="getDSMetaData">
-            <soap:operation soapAction="urn:getDSMetaData" style="document" />
-            <wsdl:input>
-                <soap:body use="literal" />
             </wsdl:input>
-
             <wsdl:output>
                 <soap:body use="literal" />
             </wsdl:output>
@@ -315,19 +236,9 @@
     </wsdl:binding>
     <wsdl:binding name="DataServiceAdminSoap12Binding" type="axis2:DataServiceAdminPortType">
         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
-        <wsdl:operation name="getDataServiceContents">
-            <soap12:operation soapAction="urn:getDataServiceContents" style="document" />
-
-            <wsdl:input>
-                <soap12:body use="literal" />
-            </wsdl:input>
-            <wsdl:output>
-                <soap12:body use="literal" />
-            </wsdl:output>
-        </wsdl:operation>
         <wsdl:operation name="getAvailableDS">
-            <soap12:operation soapAction="urn:getAvailableDS" style="document" />
 
+            <soap12:operation soapAction="urn:getAvailableDS" style="document" />
             <wsdl:input>
                 <soap12:body use="literal" />
             </wsdl:input>
@@ -336,8 +247,8 @@
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getHeaderColumnNames">
-            <soap12:operation soapAction="urn:getHeaderColumnNames" style="document" />
 
+            <soap12:operation soapAction="urn:getHeaderColumnNames" style="document" />
             <wsdl:input>
                 <soap12:body use="literal" />
             </wsdl:input>
@@ -345,9 +256,9 @@
                 <soap12:body use="literal" />
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="saveDataServiceContents">
-            <soap12:operation soapAction="urn:saveDataServiceContents" style="document" />
+        <wsdl:operation name="saveDataService">
 
+            <soap12:operation soapAction="urn:saveDataService" style="document" />
             <wsdl:input>
                 <soap12:body use="literal" />
             </wsdl:input>
@@ -356,8 +267,8 @@
             <soap12:operation soapAction="urn:getDatabaseUrlDriverList" style="document" />
             <wsdl:input>
                 <soap12:body use="literal" />
-            </wsdl:input>
 
+            </wsdl:input>
             <wsdl:output>
                 <soap12:body use="literal" />
             </wsdl:output>
@@ -366,8 +277,8 @@
             </wsdl:fault>
         </wsdl:operation>
         <wsdl:operation name="getDataServiceContentAsString">
-            <soap12:operation soapAction="urn:getDataServiceContentAsString" style="document" />
 
+            <soap12:operation soapAction="urn:getDataServiceContentAsString" style="document" />
             <wsdl:input>
                 <soap12:body use="literal" />
             </wsdl:input>
@@ -376,18 +287,8 @@
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="testJDBCConnection">
-            <soap12:operation soapAction="urn:testJDBCConnection" style="document" />
-
-            <wsdl:input>
-                <soap12:body use="literal" />
-            </wsdl:input>
-            <wsdl:output>
-                <soap12:body use="literal" />
-            </wsdl:output>
-        </wsdl:operation>
-        <wsdl:operation name="getDSMetaData">
-            <soap12:operation soapAction="urn:getDSMetaData" style="document" />
 
+            <soap12:operation soapAction="urn:testJDBCConnection" style="document" />
             <wsdl:input>
                 <soap12:body use="literal" />
             </wsdl:input>
@@ -396,19 +297,9 @@
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
-    <wsdl:binding name="DataServiceAdminHttpBinding" type="axis2:DataServiceAdminPortType">
 
+    <wsdl:binding name="DataServiceAdminHttpBinding" type="axis2:DataServiceAdminPortType">
         <http:binding verb="POST" />
-        <wsdl:operation name="getDataServiceContents">
-            <http:operation location="DataServiceAdmin/getDataServiceContents" />
-            <wsdl:input>
-                <mime:content type="text/xml" part="getDataServiceContents" />
-            </wsdl:input>
-            <wsdl:output>
-                <mime:content type="text/xml" part="getDataServiceContents" />
-            </wsdl:output>
-
-        </wsdl:operation>
         <wsdl:operation name="getAvailableDS">
             <http:operation location="DataServiceAdmin/getAvailableDS" />
             <wsdl:input>
@@ -416,8 +307,8 @@
             </wsdl:input>
             <wsdl:output>
                 <mime:content type="text/xml" part="getAvailableDS" />
-            </wsdl:output>
 
+            </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getHeaderColumnNames">
             <http:operation location="DataServiceAdmin/getHeaderColumnNames" />
@@ -426,18 +317,18 @@
             </wsdl:input>
             <wsdl:output>
                 <mime:content type="text/xml" part="getHeaderColumnNames" />
-            </wsdl:output>
 
+            </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="saveDataServiceContents">
-            <http:operation location="DataServiceAdmin/saveDataServiceContents" />
+        <wsdl:operation name="saveDataService">
+            <http:operation location="DataServiceAdmin/saveDataService" />
             <wsdl:input>
-                <mime:content type="text/xml" part="saveDataServiceContents" />
+                <mime:content type="text/xml" part="saveDataService" />
             </wsdl:input>
         </wsdl:operation>
         <wsdl:operation name="getDatabaseUrlDriverList">
-            <http:operation location="DataServiceAdmin/getDatabaseUrlDriverList" />
 
+            <http:operation location="DataServiceAdmin/getDatabaseUrlDriverList" />
             <wsdl:input>
                 <mime:content type="text/xml" part="getDatabaseUrlDriverList" />
             </wsdl:input>
@@ -446,8 +337,8 @@
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getDataServiceContentAsString">
-            <http:operation location="DataServiceAdmin/getDataServiceContentAsString" />
 
+            <http:operation location="DataServiceAdmin/getDataServiceContentAsString" />
             <wsdl:input>
                 <mime:content type="text/xml" part="getDataServiceContentAsString" />
             </wsdl:input>
@@ -456,8 +347,8 @@
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="testJDBCConnection">
-            <http:operation location="DataServiceAdmin/testJDBCConnection" />
 
+            <http:operation location="DataServiceAdmin/testJDBCConnection" />
             <wsdl:input>
                 <mime:content type="text/xml" part="testJDBCConnection" />
             </wsdl:input>
@@ -465,19 +356,9 @@
                 <mime:content type="text/xml" part="testJDBCConnection" />
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="getDSMetaData">
-            <http:operation location="DataServiceAdmin/getDSMetaData" />
-
-            <wsdl:input>
-                <mime:content type="text/xml" part="getDSMetaData" />
-            </wsdl:input>
-            <wsdl:output>
-                <mime:content type="text/xml" part="getDSMetaData" />
-            </wsdl:output>
-        </wsdl:operation>
     </wsdl:binding>
-    <wsdl:service name="DataServiceAdmin">
 
+    <wsdl:service name="DataServiceAdmin">
         <wsdl:port name="DataServiceAdminHttpsSoap11Endpoint" binding="axis2:DataServiceAdminSoap11Binding">
             <soap:address location="https://10.100.1.200:9443/services/DataServiceAdmin.DataServiceAdminHttpsSoap11Endpoint" />
         </wsdl:port>
@@ -486,7 +367,7 @@
         </wsdl:port>
         <wsdl:port name="DataServiceAdminHttpsEndpoint" binding="axis2:DataServiceAdminHttpBinding">
             <http:address location="https://10.100.1.200:9443/services/DataServiceAdmin.DataServiceAdminHttpsEndpoint" />
-        </wsdl:port>
 
+        </wsdl:port>
     </wsdl:service>
 </wsdl:definitions>
\ No newline at end of file

Modified: branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/serviceDetails.jsp
URL: http://wso2.org/svn/browse/wso2/branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/serviceDetails.jsp?rev=31257&r1=31256&r2=31257&view=diff
==============================================================================
--- branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/serviceDetails.jsp	(original)
+++ branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/serviceDetails.jsp	Sun Feb 22 20:03:12 2009
@@ -4,14 +4,12 @@
 <%@ page import="org.apache.axis2.context.ConfigurationContext" %>
 <%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
 <%@ page import="org.wso2.carbon.CarbonConstants" %>
-<%@ page import="java.io.FileReader" %>
-<%@ page import="java.io.BufferedReader" %>
-<%@ page import="java.io.FileInputStream" %>
+<%@ page import="java.io.InputStream" %>
 <%@ page import="org.apache.axiom.om.impl.builder.StAXOMBuilder" %>
 <%@ page import="org.apache.axiom.om.OMElement" %>
 <%@ page import="org.wso2.carbon.dataservices.ui.beans.Data" %>
-<%@page import="org.wso2.carbon.dataservices.ui.service.DataServiceAdminStub"%>
 <%@page import="org.wso2.carbon.dataservices.ui.DataServiceAdminClient"%>
+<%@page import="java.io.ByteArrayInputStream"%>
 <script type="text/javascript" src="js/ui-validations.js"></script>
 
 <fmt:bundle basename="org.wso2.carbon.dataservices.ui.i18n.Resources">
@@ -25,25 +23,21 @@
     String description = "";
     if (serviceName != null && serviceName.trim().length() > 0) {
         try {
-            //TODO : consider front-end, back-end seperation
-            String pathToDBS = "./repository/dataservices/" + serviceName + ".dbs";
-            FileInputStream fis = new FileInputStream(pathToDBS);
-            OMElement configElement = (new StAXOMBuilder(fis)).getDocumentElement();
-            configElement.build();
-            Data data = new Data();
-            data.populate(configElement);
-            description = data.getDescription();
-            request.getSession().setAttribute("dataService",data);
-            
             String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
             ConfigurationContext configContext =
                     (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
             String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
             DataServiceAdminClient client = new DataServiceAdminClient(cookie,backendServerURL,configContext);
-            String test = client.getDataServiceContents("DataServiceSample1");
-            //out.write(test);
+            String serviceContents = client.getDataServiceContents(serviceName);
+            
+            InputStream ins = new ByteArrayInputStream(serviceContents.getBytes());
+            OMElement configElement = (new StAXOMBuilder(ins)).getDocumentElement();
+            configElement.build();
+            Data data = new Data();
+            data.populate(configElement);
+            description = data.getDescription();
+            request.getSession().setAttribute("dataService",data);
         } catch (Exception e) {
-        	e.printStackTrace();
 %>
 <script type="text/javascript">
     location.href = "../admin/error.jsp";

Modified: branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/wizardDoneProcessor.jsp
URL: http://wso2.org/svn/browse/wso2/branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/wizardDoneProcessor.jsp?rev=31257&r1=31256&r2=31257&view=diff
==============================================================================
--- branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/wizardDoneProcessor.jsp	(original)
+++ branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/wizardDoneProcessor.jsp	Sun Feb 22 20:03:12 2009
@@ -1,21 +1,29 @@
-<%@ page import="org.wso2.carbon.dataservices.ui.beans.Config" %>
-<%@ page import="org.wso2.carbon.dataservices.DBConstants" %>
 <%@ page import="java.io.BufferedWriter" %>
 <%@ page import="java.io.FileWriter" %>
 <%@ page import="java.io.IOException" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
+<%@page import="org.wso2.carbon.dataservices.ui.DataServiceAdminClient"%>
+<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
+<%@page import="org.apache.axis2.AxisFault"%>
 <jsp:useBean id="dataService" class="org.wso2.carbon.dataservices.ui.beans.Data" scope="session"/>
 <%
-    //out.println(dataService.buildXML());
-    //TODO : consider front-end, back-end seperation
     String serviceName = dataService.getName();
-    if (serviceName != null) {
-        String filePath = "./repository/dataservices/" + serviceName + ".dbs";
-        try {
-            BufferedWriter newContent = new BufferedWriter(new FileWriter(filePath));
-            newContent.write(dataService.buildXML());
-            newContent.close();
-        } catch (IOException e) {
-            e.printStackTrace();
+    if (serviceName != null) {    	
+        String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+        ConfigurationContext configContext =
+                (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+        String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+        DataServiceAdminClient client = new DataServiceAdminClient(cookie,backendServerURL,configContext);
+        try{
+            client.saveDataService(serviceName,dataService.buildXML());        	
+        }catch(AxisFault e){
+        	%>
+<script type="text/javascript">
+    location.href = "../admin/error.jsp";
+</script>        	
+        	<%        	
         }
     }
 %>



More information about the Carbon-dev mailing list