]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
Download and upload operations from server to client (from client to server) are...
authormka <mka@opencascade.com>
Sat, 17 Nov 2012 15:00:25 +0000 (15:00 +0000)
committermka <mka@opencascade.com>
Sat, 17 Nov 2012 15:00:25 +0000 (15:00 +0000)
Workspace/Siman-Stub/service_wsdl/service/salome/SimanSalomeService.wsdl
Workspace/Siman-Stub/src/org/splat/ws_client/service/salome/SimanSalomeServiceCallbackHandler.java
Workspace/Siman-Stub/src/org/splat/ws_client/service/salome/SimanSalomeServiceStub.java
Workspace/Siman-Stub/test/org/splat/ws_client/service/salome/SimanSalomeServiceTest.java
Workspace/Siman-Stub/test/org/splat/ws_client/service/salome/SimanSalomeServiceTestDownloadFile.java
Workspace/Siman-Stub/test/org/splat/ws_client/service/salome/SimanSalomeServiceTestUploadFile.java
Workspace/Siman-WS/src/org/splat/ws_server/service/salome/SimanSalomeService.java
Workspace/Siman-WS/src/org/splat/ws_server/service/salome/SimanSalomeServiceImpl.java

index c31c09c5cfa7c5c77a70818adca69349676e307b..3831a723e77e8c893ac58fdb926ae2917bdfe8be 100644 (file)
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
+            <xs:element name="putFileResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
             <xs:element name="getFile">
                 <xs:complexType>
                     <xs:sequence>
@@ -58,6 +65,9 @@
     <wsdl:message name="putFileRequest">
         <wsdl:part name="parameters" element="ns:putFile"/>
     </wsdl:message>
+    <wsdl:message name="putFileResponse">
+        <wsdl:part name="parameters" element="ns:putFileResponse"/>
+    </wsdl:message>
     <wsdl:portType name="SimanSalomeServicePortType">
         <wsdl:operation name="getFile">
             <wsdl:input message="ns:getFileRequest" wsaw:Action="urn:getFile"/>
@@ -69,6 +79,7 @@
         </wsdl:operation>
         <wsdl:operation name="putFile">
             <wsdl:input message="ns:putFileRequest" wsaw:Action="urn:putFile"/>
+            <wsdl:output message="ns:putFileResponse" wsaw:Action="urn:putFileResponse"/>
         </wsdl:operation>
     </wsdl:portType>
     <wsdl:binding name="SimanSalomeServiceSoap11Binding" type="ns:SimanSalomeServicePortType">
             <wsdl:input>
                 <soap:body use="literal"/>
             </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:binding name="SimanSalomeServiceSoap12Binding" type="ns:SimanSalomeServicePortType">
             <wsdl:input>
                 <soap12:body use="literal"/>
             </wsdl:input>
+            <wsdl:output>
+                <soap12:body use="literal"/>
+            </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:binding name="SimanSalomeServiceHttpBinding" type="ns:SimanSalomeServicePortType">
             <wsdl:input>
                 <mime:content type="application/xml" part="parameters"/>
             </wsdl:input>
+            <wsdl:output>
+                <mime:content type="application/xml" part="parameters"/>
+            </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="SimanSalomeService">
index 1fd9dec77353c1a244f89683594650cd4941ccc2..2e9d7c892182e619e1227d47086ff0473223b23a 100644 (file)
             public void receiveErrorcreateConfigFile(java.lang.Exception e) {
             }
                 
-               // No methods generated for meps other than in-out
+           /**
+            * auto generated Axis2 call back method for putFile method
+            * override this method for handling normal response from putFile operation
+            */
+           public void receiveResultputFile(
+                    org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse result
+                        ) {
+           }
+
+          /**
+           * auto generated Axis2 Error handler
+           * override this method for handling error response from putFile operation
+           */
+            public void receiveErrorputFile(java.lang.Exception e) {
+            }
                 
            /**
             * auto generated Axis2 call back method for getFile method
index ae800a766ce6307279bd8cbd3f663c9e38c04374..ecf0a9328103569f7b33c04e123cdaa71c46bc2c 100644 (file)
@@ -58,7 +58,7 @@
             _operations[0]=__operation;
             
         
-                    __operation = new org.apache.axis2.description.OutOnlyAxisOperation();
+                   __operation = new org.apache.axis2.description.OutInAxisOperation();
                 
 
             __operation.setName(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org", "putFile"));
            _operationClient.execute(false);
 
                     }
-                 
                 
-                /**
-                  * Auto generated method signature
-                  * 
-                  */
-                public void  putFile(
-                 org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile putFile2
+                    /**
+                     * Auto generated method signature
+                     * 
+                     * @see org.splat.ws_client.service.salome.SimanSalomeService#putFile
+                     * @param putFile2
+                    
+                     */
+
+                    
+
+                            public  org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse putFile(
+
+                            org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile putFile2)
+                        
+
+                    throws java.rmi.RemoteException
+                    
+                    {
+              org.apache.axis2.context.MessageContext _messageContext = null;
+              try{
+               org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());
+              _operationClient.getOptions().setAction("urn:putFile");
+              _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+
+              
+              
+                  addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&");
+              
+
+              // create a message context
+              _messageContext = new org.apache.axis2.context.MessageContext();
+
+              
+
+              // create SOAP envelope with that payload
+              org.apache.axiom.soap.SOAPEnvelope env = null;
+                    
+                                                    
+                                                    env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
+                                                    putFile2,
+                                                    optimizeContent(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org",
+                                                    "putFile")), new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org",
+                                                    "putFile"));
+                                                
+        //adding SOAP soap_headers
+         _serviceClient.addHeadersToEnvelope(env);
+        // set the message context with that soap envelope
+        _messageContext.setEnvelope(env);
+
+        // add the message contxt to the operation client
+        _operationClient.addMessageContext(_messageContext);
 
-                ) throws java.rmi.RemoteException
+        //execute the operation client
+        _operationClient.execute(true);
+
+         
+               org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(
+                                           org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+                org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
                 
                 
-                {
-                org.apache.axis2.context.MessageContext _messageContext = null;
+                                java.lang.Object object = fromOM(
+                                             _returnEnv.getBody().getFirstElement() ,
+                                             org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse.class,
+                                              getEnvelopeNamespaces(_returnEnv));
 
-                
-                org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());
-                _operationClient.getOptions().setAction("urn:putFile");
-                _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+                               
+                                        return (org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse)object;
+                                   
+         }catch(org.apache.axis2.AxisFault f){
+
+            org.apache.axiom.om.OMElement faultElt = f.getDetail();
+            if (faultElt!=null){
+                if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"putFile"))){
+                    //make the fault by reflection
+                    try{
+                        java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"putFile"));
+                        java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
+                        java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);
+                        java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
+                        //message class
+                        java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"putFile"));
+                        java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
+                        java.lang.Object messageObject = fromOM(faultElt,messageClass,null);
+                        java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
+                                   new java.lang.Class[]{messageClass});
+                        m.invoke(ex,new java.lang.Object[]{messageObject});
+                        
 
+                        throw new java.rmi.RemoteException(ex.getMessage(), ex);
+                    }catch(java.lang.ClassCastException e){
+                       // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    } catch (java.lang.ClassNotFoundException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }catch (java.lang.NoSuchMethodException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    } catch (java.lang.reflect.InvocationTargetException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }  catch (java.lang.IllegalAccessException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }   catch (java.lang.InstantiationException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }
+                }else{
+                    throw f;
+                }
+            }else{
+                throw f;
+            }
+            } finally {
+                if (_messageContext.getTransportOut() != null) {
+                      _messageContext.getTransportOut().getSender().cleanup(_messageContext);
+                }
+            }
+        }
+            
+                /**
+                * Auto generated method signature for Asynchronous Invocations
+                * 
+                * @see org.splat.ws_client.service.salome.SimanSalomeService#startputFile
+                    * @param putFile2
                 
+                */
+                public  void startputFile(
+
+                 org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile putFile2,
+
+                  final org.splat.ws_client.service.salome.SimanSalomeServiceCallbackHandler callback)
+
+                throws java.rmi.RemoteException{
+
+              org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());
+             _operationClient.getOptions().setAction("urn:putFile");
+             _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+
+              
               
                   addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&");
               
-                org.apache.axiom.soap.SOAPEnvelope env = null;
-                 _messageContext = new org.apache.axis2.context.MessageContext();
 
-                
-                                                    //Style is Doc.
+
+              // create SOAP envelope with that payload
+              org.apache.axiom.soap.SOAPEnvelope env=null;
+              final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+
+                    
+                                    //Style is Doc.
+                                    
                                                     
-                                                                    
-                                                                    env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
-                                                                    putFile2,
-                                                                    optimizeContent(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org",
-                                                                    "putFile")),new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org",
-                                                                    "putFile"));
-                                                                
-
-              //adding SOAP soap_headers
+                                                    env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
+                                                    putFile2,
+                                                    optimizeContent(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org",
+                                                    "putFile")), new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org",
+                                                    "putFile"));
+                                                
+        // adding SOAP soap_headers
          _serviceClient.addHeadersToEnvelope(env);
-                // create message context with that soap envelope
+        // create message context with that soap envelope
+        _messageContext.setEnvelope(env);
 
-            _messageContext.setEnvelope(env);
+        // add the message context to the operation client
+        _operationClient.addMessageContext(_messageContext);
 
-            // add the message contxt to the operation client
-            _operationClient.addMessageContext(_messageContext);
 
-             _operationClient.execute(true);
+                    
+                        _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {
+                            public void onMessage(org.apache.axis2.context.MessageContext resultContext) {
+                            try {
+                                org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();
+                                
+                                        java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),
+                                                                         org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse.class,
+                                                                         getEnvelopeNamespaces(resultEnv));
+                                        callback.receiveResultputFile(
+                                        (org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse)object);
+                                        
+                            } catch (org.apache.axis2.AxisFault e) {
+                                callback.receiveErrorputFile(e);
+                            }
+                            }
 
-           
-              if (_messageContext.getTransportOut() != null) {
-                      _messageContext.getTransportOut().getSender().cleanup(_messageContext);
-              }
-           
-             return;
-           }
-            
+                            public void onError(java.lang.Exception error) {
+                                                               if (error instanceof org.apache.axis2.AxisFault) {
+                                                                       org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;
+                                                                       org.apache.axiom.om.OMElement faultElt = f.getDetail();
+                                                                       if (faultElt!=null){
+                                                                               if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"putFile"))){
+                                                                                       //make the fault by reflection
+                                                                                       try{
+                                                                                                       java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"putFile"));
+                                                                                                       java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
+                                                                                                       java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);
+                                                    java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
+                                                                                                       //message class
+                                                                                                       java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"putFile"));
+                                                                                                               java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
+                                                                                                       java.lang.Object messageObject = fromOM(faultElt,messageClass,null);
+                                                                                                       java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
+                                                                                                                       new java.lang.Class[]{messageClass});
+                                                                                                       m.invoke(ex,new java.lang.Object[]{messageObject});
+                                                                                                       
+                                       
+                                                                                           callback.receiveErrorputFile(new java.rmi.RemoteException(ex.getMessage(), ex));
+                                            } catch(java.lang.ClassCastException e){
+                                                // we cannot intantiate the class - throw the original Axis fault
+                                                callback.receiveErrorputFile(f);
+                                            } catch (java.lang.ClassNotFoundException e) {
+                                                // we cannot intantiate the class - throw the original Axis fault
+                                                callback.receiveErrorputFile(f);
+                                            } catch (java.lang.NoSuchMethodException e) {
+                                                // we cannot intantiate the class - throw the original Axis fault
+                                                callback.receiveErrorputFile(f);
+                                            } catch (java.lang.reflect.InvocationTargetException e) {
+                                                // we cannot intantiate the class - throw the original Axis fault
+                                                callback.receiveErrorputFile(f);
+                                            } catch (java.lang.IllegalAccessException e) {
+                                                // we cannot intantiate the class - throw the original Axis fault
+                                                callback.receiveErrorputFile(f);
+                                            } catch (java.lang.InstantiationException e) {
+                                                // we cannot intantiate the class - throw the original Axis fault
+                                                callback.receiveErrorputFile(f);
+                                            } catch (org.apache.axis2.AxisFault e) {
+                                                // we cannot intantiate the class - throw the original Axis fault
+                                                callback.receiveErrorputFile(f);
+                                            }
+                                                                           } else {
+                                                                                   callback.receiveErrorputFile(f);
+                                                                           }
+                                                                       } else {
+                                                                           callback.receiveErrorputFile(f);
+                                                                       }
+                                                               } else {
+                                                                   callback.receiveErrorputFile(error);
+                                                               }
+                            }
+
+                            public void onFault(org.apache.axis2.context.MessageContext faultContext) {
+                                org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);
+                                onError(fault);
+                            }
+
+                            public void onComplete() {
+                                try {
+                                    _messageContext.getTransportOut().getSender().cleanup(_messageContext);
+                                } catch (org.apache.axis2.AxisFault axisFault) {
+                                    callback.receiveErrorputFile(axisFault);
+                                }
+                            }
+                });
+                        
+
+          org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
+        if ( _operations[1].getMessageReceiver()==null &&  _operationClient.getOptions().isUseSeparateListener()) {
+           _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
+          _operations[1].setMessageReceiver(
+                    _callbackReceiver);
+        }
+
+           //execute the operation client
+           _operationClient.execute(false);
+
+                    }
+                
                     /**
                      * Auto generated method signature
                      * 
                      * @see org.splat.ws_client.service.salome.SimanSalomeService#getFile
-                     * @param getFile3
+                     * @param getFile4
                     
                      */
 
 
                             public  org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFileResponse getFile(
 
-                            org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile getFile3)
+                            org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile getFile4)
                         
 
                     throws java.rmi.RemoteException
                     
                                                     
                                                     env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
-                                                    getFile3,
+                                                    getFile4,
                                                     optimizeContent(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org",
                                                     "getFile")), new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org",
                                                     "getFile"));
                 * Auto generated method signature for Asynchronous Invocations
                 * 
                 * @see org.splat.ws_client.service.salome.SimanSalomeService#startgetFile
-                    * @param getFile3
+                    * @param getFile4
                 
                 */
                 public  void startgetFile(
 
-                 org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile getFile3,
+                 org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile getFile4,
 
                   final org.splat.ws_client.service.salome.SimanSalomeServiceCallbackHandler callback)
 
                                     
                                                     
                                                     env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
-                                                    getFile3,
+                                                    getFile4,
                                                     optimizeContent(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org",
                                                     "getFile")), new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org",
                                                     "getFile"));
         }
            
     
-        public static class CreateConfigFileResponse
+        public static class PutFileResponse
         implements org.apache.axis2.databinding.ADBBean{
         
                 public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
                 "http://salome.service.ws_server.splat.org",
-                "createConfigFileResponse",
+                "putFileResponse",
                 "ns2");
 
             
                    java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://salome.service.ws_server.splat.org");
                    if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
                        writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
-                           namespacePrefix+":createConfigFileResponse",
+                           namespacePrefix+":putFileResponse",
                            xmlWriter);
                    } else {
                        writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
-                           "createConfigFileResponse",
+                           "putFileResponse",
                            xmlWriter);
                    }
 
         * Postcondition: If this object is an element, the reader is positioned at its end element
         *                If this object is a complex type, the reader is positioned at the end element of its outer element
         */
-        public static CreateConfigFileResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
-            CreateConfigFileResponse object =
-                new CreateConfigFileResponse();
+        public static PutFileResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
+            PutFileResponse object =
+                new PutFileResponse();
 
             int event;
             java.lang.String nillableValue = null;
 
                     java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
                     
-                            if (!"createConfigFileResponse".equals(type)){
+                            if (!"putFileResponse".equals(type)){
                                 //find namespace for the prefix
                                 java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
-                                return (CreateConfigFileResponse)ExtensionMapper.getTypeObject(
+                                return (PutFileResponse)ExtensionMapper.getTypeObject(
                                      nsUri,type,reader);
                               }
                         
         }
            
     
-        public static class GetFile
+        public static class CreateConfigFileResponse
         implements org.apache.axis2.databinding.ADBBean{
         
                 public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
                 "http://salome.service.ws_server.splat.org",
-                "getFile",
+                "createConfigFileResponse",
                 "ns2");
 
             
 
                         /**
-                        * field for Args0
+                        * field for _return
                         */
 
                         
-                                    protected java.lang.String localArgs0 ;
+                                    protected java.lang.String local_return ;
                                 
                            /*  This tracker boolean wil be used to detect whether the user called the set method
                           *   for this attribute. It will be used to determine whether to include this field
                            *   in the serialized XML
                            */
-                           protected boolean localArgs0Tracker = false ;
+                           protected boolean local_returnTracker = false ;
 
-                           public boolean isArgs0Specified(){
-                               return localArgs0Tracker;
+                           public boolean is_returnSpecified(){
+                               return local_returnTracker;
                            }
 
                            
                            * Auto generated getter method
                            * @return java.lang.String
                            */
-                           public  java.lang.String getArgs0(){
-                               return localArgs0;
+                           public  java.lang.String get_return(){
+                               return local_return;
                            }
 
                            
                         
                             /**
                                * Auto generated setter method
-                               * @param param Args0
+                               * @param param _return
                                */
-                               public void setArgs0(java.lang.String param){
-                            localArgs0Tracker = true;
+                               public void set_return(java.lang.String param){
+                            local_returnTracker = true;
                                    
-                                            this.localArgs0=param;
+                                            this.local_return=param;
                                     
 
                                }
                    java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://salome.service.ws_server.splat.org");
                    if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
                        writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
-                           namespacePrefix+":getFile",
+                           namespacePrefix+":createConfigFileResponse",
                            xmlWriter);
                    } else {
                        writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
-                           "getFile",
+                           "createConfigFileResponse",
+                           xmlWriter);
+                   }
+
+               
+                   }
+                if (local_returnTracker){
+                                    namespace = "http://salome.service.ws_server.splat.org";
+                                    writeStartElement(null, namespace, "return", xmlWriter);
+                             
+
+                                          if (local_return==null){
+                                              // write the nil attribute
+                                              
+                                                     writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
+                                                  
+                                          }else{
+
+                                        
+                                                   xmlWriter.writeCharacters(local_return);
+                                            
+                                          }
+                                    
+                                   xmlWriter.writeEndElement();
+                             }
+                    xmlWriter.writeEndElement();
+               
+
+        }
+
+        private static java.lang.String generatePrefix(java.lang.String namespace) {
+            if(namespace.equals("http://salome.service.ws_server.splat.org")){
+                return "ns2";
+            }
+            return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+        }
+
+        /**
+         * Utility method to write an element start tag.
+         */
+        private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart,
+                                       javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
+            java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
+            if (writerPrefix != null) {
+                xmlWriter.writeStartElement(namespace, localPart);
+            } else {
+                if (namespace.length() == 0) {
+                    prefix = "";
+                } else if (prefix == null) {
+                    prefix = generatePrefix(namespace);
+                }
+
+                xmlWriter.writeStartElement(prefix, localPart, namespace);
+                xmlWriter.writeNamespace(prefix, namespace);
+                xmlWriter.setPrefix(prefix, namespace);
+            }
+        }
+        
+        /**
+         * Util method to write an attribute with the ns prefix
+         */
+        private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
+                                    java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+            if (xmlWriter.getPrefix(namespace) == null) {
+                xmlWriter.writeNamespace(prefix, namespace);
+                xmlWriter.setPrefix(prefix, namespace);
+            }
+            xmlWriter.writeAttribute(namespace,attName,attValue);
+        }
+
+        /**
+         * Util method to write an attribute without the ns prefix
+         */
+        private void writeAttribute(java.lang.String namespace,java.lang.String attName,
+                                    java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+            if (namespace.equals("")) {
+                xmlWriter.writeAttribute(attName,attValue);
+            } else {
+                registerPrefix(xmlWriter, namespace);
+                xmlWriter.writeAttribute(namespace,attName,attValue);
+            }
+        }
+
+
+           /**
+             * Util method to write an attribute without the ns prefix
+             */
+            private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
+                                             javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
+
+                java.lang.String attributeNamespace = qname.getNamespaceURI();
+                java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
+                if (attributePrefix == null) {
+                    attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
+                }
+                java.lang.String attributeValue;
+                if (attributePrefix.trim().length() > 0) {
+                    attributeValue = attributePrefix + ":" + qname.getLocalPart();
+                } else {
+                    attributeValue = qname.getLocalPart();
+                }
+
+                if (namespace.equals("")) {
+                    xmlWriter.writeAttribute(attName, attributeValue);
+                } else {
+                    registerPrefix(xmlWriter, namespace);
+                    xmlWriter.writeAttribute(namespace, attName, attributeValue);
+                }
+            }
+        /**
+         *  method to handle Qnames
+         */
+
+        private void writeQName(javax.xml.namespace.QName qname,
+                                javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
+            java.lang.String namespaceURI = qname.getNamespaceURI();
+            if (namespaceURI != null) {
+                java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
+                if (prefix == null) {
+                    prefix = generatePrefix(namespaceURI);
+                    xmlWriter.writeNamespace(prefix, namespaceURI);
+                    xmlWriter.setPrefix(prefix,namespaceURI);
+                }
+
+                if (prefix.trim().length() > 0){
+                    xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
+                } else {
+                    // i.e this is the default namespace
+                    xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
+                }
+
+            } else {
+                xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
+            }
+        }
+
+        private void writeQNames(javax.xml.namespace.QName[] qnames,
+                                 javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
+
+            if (qnames != null) {
+                // we have to store this data until last moment since it is not possible to write any
+                // namespace data after writing the charactor data
+                java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
+                java.lang.String namespaceURI = null;
+                java.lang.String prefix = null;
+
+                for (int i = 0; i < qnames.length; i++) {
+                    if (i > 0) {
+                        stringToWrite.append(" ");
+                    }
+                    namespaceURI = qnames[i].getNamespaceURI();
+                    if (namespaceURI != null) {
+                        prefix = xmlWriter.getPrefix(namespaceURI);
+                        if ((prefix == null) || (prefix.length() == 0)) {
+                            prefix = generatePrefix(namespaceURI);
+                            xmlWriter.writeNamespace(prefix, namespaceURI);
+                            xmlWriter.setPrefix(prefix,namespaceURI);
+                        }
+
+                        if (prefix.trim().length() > 0){
+                            stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
+                        } else {
+                            stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
+                        }
+                    } else {
+                        stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
+                    }
+                }
+                xmlWriter.writeCharacters(stringToWrite.toString());
+            }
+
+        }
+
+
+        /**
+         * Register a namespace prefix
+         */
+        private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
+            java.lang.String prefix = xmlWriter.getPrefix(namespace);
+            if (prefix == null) {
+                prefix = generatePrefix(namespace);
+                javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
+                while (true) {
+                    java.lang.String uri = nsContext.getNamespaceURI(prefix);
+                    if (uri == null || uri.length() == 0) {
+                        break;
+                    }
+                    prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+                }
+                xmlWriter.writeNamespace(prefix, namespace);
+                xmlWriter.setPrefix(prefix, namespace);
+            }
+            return prefix;
+        }
+
+
+  
+        /**
+        * databinding method to get an XML representation of this object
+        *
+        */
+        public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
+                    throws org.apache.axis2.databinding.ADBException{
+
+
+        
+                 java.util.ArrayList elementList = new java.util.ArrayList();
+                 java.util.ArrayList attribList = new java.util.ArrayList();
+
+                 if (local_returnTracker){
+                                      elementList.add(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org",
+                                                                      "return"));
+                                 
+                                         elementList.add(local_return==null?null:
+                                         org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));
+                                    }
+
+                return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
+            
+            
+
+        }
+
+  
+
+     /**
+      *  Factory class that keeps the parse method
+      */
+    public static class Factory{
+
+        
+        
+
+        /**
+        * static method to create the object
+        * Precondition:  If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
+        *                If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
+        * Postcondition: If this object is an element, the reader is positioned at its end element
+        *                If this object is a complex type, the reader is positioned at the end element of its outer element
+        */
+        public static CreateConfigFileResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
+            CreateConfigFileResponse object =
+                new CreateConfigFileResponse();
+
+            int event;
+            java.lang.String nillableValue = null;
+            java.lang.String prefix ="";
+            java.lang.String namespaceuri ="";
+            try {
+                
+                while (!reader.isStartElement() && !reader.isEndElement())
+                    reader.next();
+
+                
+                if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
+                  java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
+                        "type");
+                  if (fullTypeName!=null){
+                    java.lang.String nsPrefix = null;
+                    if (fullTypeName.indexOf(":") > -1){
+                        nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
+                    }
+                    nsPrefix = nsPrefix==null?"":nsPrefix;
+
+                    java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
+                    
+                            if (!"createConfigFileResponse".equals(type)){
+                                //find namespace for the prefix
+                                java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
+                                return (CreateConfigFileResponse)ExtensionMapper.getTypeObject(
+                                     nsUri,type,reader);
+                              }
+                        
+
+                  }
+                
+
+                }
+
+                
+
+                
+                // Note all attributes that were handled. Used to differ normal attributes
+                // from anyAttributes.
+                java.util.Vector handledAttributes = new java.util.Vector();
+                
+
+                
+                    
+                    reader.next();
+                
+                                    
+                                    while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
+                                
+                                    if (reader.isStartElement() && new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org","return").equals(reader.getName())){
+                                
+                                       nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
+                                       if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){
+                                    
+
+                                    java.lang.String content = reader.getElementText();
+                                    
+                                              object.set_return(
+                                                    org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
+                                            
+                                       } else {
+                                           
+                                           
+                                           reader.getElementText(); // throw away text nodes if any.
+                                       }
+                                      
+                                        reader.next();
+                                    
+                              }  // End of if for expected property start element
+                                
+                                    else {
+                                        
+                                    }
+                                  
+                            while (!reader.isStartElement() && !reader.isEndElement())
+                                reader.next();
+                            
+                                if (reader.isStartElement())
+                                // A start element we are not expecting indicates a trailing invalid property
+                                throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName());
+                            
+
+
+
+            } catch (javax.xml.stream.XMLStreamException e) {
+                throw new java.lang.Exception(e);
+            }
+
+            return object;
+        }
+
+        }//end of factory class
+
+        
+
+        }
+           
+    
+        public static class GetFile
+        implements org.apache.axis2.databinding.ADBBean{
+        
+                public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
+                "http://salome.service.ws_server.splat.org",
+                "getFile",
+                "ns2");
+
+            
+
+                        /**
+                        * field for Args0
+                        */
+
+                        
+                                    protected java.lang.String localArgs0 ;
+                                
+                           /*  This tracker boolean wil be used to detect whether the user called the set method
+                          *   for this attribute. It will be used to determine whether to include this field
+                           *   in the serialized XML
+                           */
+                           protected boolean localArgs0Tracker = false ;
+
+                           public boolean isArgs0Specified(){
+                               return localArgs0Tracker;
+                           }
+
+                           
+
+                           /**
+                           * Auto generated getter method
+                           * @return java.lang.String
+                           */
+                           public  java.lang.String getArgs0(){
+                               return localArgs0;
+                           }
+
+                           
+                        
+                            /**
+                               * Auto generated setter method
+                               * @param param Args0
+                               */
+                               public void setArgs0(java.lang.String param){
+                            localArgs0Tracker = true;
+                                   
+                                            this.localArgs0=param;
+                                    
+
+                               }
+                            
+
+     
+     
+        /**
+        *
+        * @param parentQName
+        * @param factory
+        * @return org.apache.axiom.om.OMElement
+        */
+       public org.apache.axiom.om.OMElement getOMElement (
+               final javax.xml.namespace.QName parentQName,
+               final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
+
+
+        
+               org.apache.axiom.om.OMDataSource dataSource =
+                       new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME);
+               return factory.createOMElement(dataSource,MY_QNAME);
+            
+        }
+
+         public void serialize(final javax.xml.namespace.QName parentQName,
+                                       javax.xml.stream.XMLStreamWriter xmlWriter)
+                                throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
+                           serialize(parentQName,xmlWriter,false);
+         }
+
+         public void serialize(final javax.xml.namespace.QName parentQName,
+                               javax.xml.stream.XMLStreamWriter xmlWriter,
+                               boolean serializeType)
+            throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
+            
+                
+
+
+                java.lang.String prefix = null;
+                java.lang.String namespace = null;
+                
+
+                    prefix = parentQName.getPrefix();
+                    namespace = parentQName.getNamespaceURI();
+                    writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter);
+                
+                  if (serializeType){
+               
+
+                   java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://salome.service.ws_server.splat.org");
+                   if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
+                       writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
+                           namespacePrefix+":getFile",
+                           xmlWriter);
+                   } else {
+                       writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
+                           "getFile",
                            xmlWriter);
                    }
 
                         }
                     
 
+            }
+        
+            private  org.apache.axiom.om.OMElement  toOM(org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse param, boolean optimizeContent)
+            throws org.apache.axis2.AxisFault {
+
+            
+                        try{
+                             return param.getOMElement(org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse.MY_QNAME,
+                                          org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+                        } catch(org.apache.axis2.databinding.ADBException e){
+                            throw org.apache.axis2.AxisFault.makeFault(e);
+                        }
+                    
+
             }
         
             private  org.apache.axiom.om.OMElement  toOM(org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile param, boolean optimizeContent)
                            return org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile.Factory.parse(param.getXMLStreamReaderWithoutCaching());
                     
 
+                }
+           
+                if (org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse.class.equals(type)){
+                
+                           return org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching());
+                    
+
                 }
            
                 if (org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile.class.equals(type)){
index 8942d635bd09cef645d444893fb6d8dfb64cc97a..fb95334c88c3e7403206f351058ffe40d0d0ec3c 100644 (file)
         org.splat.ws_client.service.salome.SimanSalomeServiceStub stub =
                     new org.splat.ws_client.service.salome.SimanSalomeServiceStub();//the default implementation should point to the right endpoint
 
-           org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile createConfigFile10=
+           org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile createConfigFile12=
                                                         (org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile)getTestObject(org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile.class);
-                    // TODO : Fill in the createConfigFile10 here
+                    // TODO : Fill in the createConfigFile12 here
                 
                         assertNotNull(stub.createConfigFile(
-                        createConfigFile10));
+                        createConfigFile12));
                   
 
 
          */
         public  void testStartcreateConfigFile() throws java.lang.Exception{
             org.splat.ws_client.service.salome.SimanSalomeServiceStub stub = new org.splat.ws_client.service.salome.SimanSalomeServiceStub();
-             org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile createConfigFile10=
+             org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile createConfigFile12=
                                                         (org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile)getTestObject(org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile.class);
-                    // TODO : Fill in the createConfigFile10 here
+                    // TODO : Fill in the createConfigFile12 here
                 
 
                 stub.startcreateConfigFile(
-                         createConfigFile10,
+                         createConfigFile12,
                     new tempCallbackN65548()
                 );
               
 
         }
       
-          /**
-          * Auto generated test method
-          */
-          public  void testputFile() throws java.lang.Exception{
-
-          org.splat.ws_client.service.salome.SimanSalomeServiceStub stub =
-          new org.splat.ws_client.service.salome.SimanSalomeServiceStub();//the default implementation should point to the right endpoint
-          org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile putFile12=
-                  (org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile)getTestObject(org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile.class);
-                      // TODO : Fill in the putFile12 here
+        /**
+         * Auto generated test method
+         */
+        public  void testputFile() throws java.lang.Exception{
+
+        org.splat.ws_client.service.salome.SimanSalomeServiceStub stub =
+                    new org.splat.ws_client.service.salome.SimanSalomeServiceStub();//the default implementation should point to the right endpoint
+
+           org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile putFile14=
+                                                        (org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile)getTestObject(org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile.class);
+                    // TODO : Fill in the putFile14 here
+                
+                        assertNotNull(stub.putFile(
+                        putFile14));
                   
 
-                  //There is no output to be tested!
-                  stub.putFile(
-                  putFile12);
 
+
+        }
+        
+         /**
+         * Auto generated test method
+         */
+        public  void testStartputFile() throws java.lang.Exception{
+            org.splat.ws_client.service.salome.SimanSalomeServiceStub stub = new org.splat.ws_client.service.salome.SimanSalomeServiceStub();
+             org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile putFile14=
+                                                        (org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile)getTestObject(org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile.class);
+                    // TODO : Fill in the putFile14 here
+                
+
+                stub.startputFile(
+                         putFile14,
+                    new tempCallbackN65589()
+                );
               
-          }
+
+
+        }
+
+        private class tempCallbackN65589  extends org.splat.ws_client.service.salome.SimanSalomeServiceCallbackHandler{
+            public tempCallbackN65589(){ super(null);}
+
+            public void receiveResultputFile(
+                         org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse result
+                            ) {
+                
+            }
+
+            public void receiveErrorputFile(java.lang.Exception e) {
+                fail();
+            }
+
+        }
       
         /**
          * Auto generated test method
         org.splat.ws_client.service.salome.SimanSalomeServiceStub stub =
                     new org.splat.ws_client.service.salome.SimanSalomeServiceStub();//the default implementation should point to the right endpoint
 
-           org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile getFile13=
+           org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile getFile16=
                                                         (org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile)getTestObject(org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile.class);
-                    // TODO : Fill in the getFile13 here
+                    // TODO : Fill in the getFile16 here
                 
                         assertNotNull(stub.getFile(
-                        getFile13));
+                        getFile16));
                   
 
 
          */
         public  void testStartgetFile() throws java.lang.Exception{
             org.splat.ws_client.service.salome.SimanSalomeServiceStub stub = new org.splat.ws_client.service.salome.SimanSalomeServiceStub();
-             org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile getFile13=
+             org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile getFile16=
                                                         (org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile)getTestObject(org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile.class);
-                    // TODO : Fill in the getFile13 here
+                    // TODO : Fill in the getFile16 here
                 
 
                 stub.startgetFile(
-                         getFile13,
-                    new tempCallbackN65617()
+                         getFile16,
+                    new tempCallbackN65630()
                 );
               
 
 
         }
 
-        private class tempCallbackN65617  extends org.splat.ws_client.service.salome.SimanSalomeServiceCallbackHandler{
-            public tempCallbackN65617(){ super(null);}
+        private class tempCallbackN65630  extends org.splat.ws_client.service.salome.SimanSalomeServiceCallbackHandler{
+            public tempCallbackN65630(){ super(null);}
 
             public void receiveResultgetFile(
                          org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFileResponse result
index 656124615cadda8d54a5bcdd963d6919d07671b1..1a7e559be702a60da351275f7ddaf7ea4c8d8a99 100644 (file)
@@ -47,15 +47,15 @@ public class SimanSalomeServiceTestDownloadFile {
                
                org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile request = new org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFile();
                
-               request.setArgs0("W:/Eclipse workspace/SIMAN/Repository/vault/SimanSalome/100010018/siman-salome.conf");
-               //request.setArgs0("W:/testvideo/Requiem for a dream.avi");
+               //request.setArgs0("W:/Eclipse workspace/SIMAN/Repository/vault/SimanSalome/100010018/siman-salome.conf");
+               request.setArgs0("W:/testvideo/IMG_5792.JPG");
                
                org.splat.ws_client.service.salome.SimanSalomeServiceStub.GetFileResponse response;
                
                response = stub.getFile(request);
                
-               //File clientFile = new File("W:/client_temp2/Requiem for a dream_out.avi");
-               File clientFile = new File("W:/client_temp2/siman-salome.conf");
+               File clientFile = new File("W:/client_temp2/IMG_5792_out.JPG");
+               //File clientFile = new File("W:/client_temp2/siman-salome.conf");
                File clientFilePath = new File("W:/client_temp2");
                clientFilePath.mkdirs();
                clientFile.createNewFile();
index d770828c1d256d71c001e86f7a13807f918e39d1..669ceda3290a9ecfba2ad4cfc128561c5cc4b082 100644 (file)
@@ -32,6 +32,8 @@ public class SimanSalomeServiceTestUploadFile {
                
                org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile request = new org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFile();
                
+               org.splat.ws_client.service.salome.SimanSalomeServiceStub.PutFileResponse response;
+               
                String clientFile = "w:/client_temp2/MKA_test.txt";
                DataSource dataSource = new FileDataSource(clientFile);
                DataHandler requestDH = new DataHandler(dataSource);
@@ -41,9 +43,9 @@ public class SimanSalomeServiceTestUploadFile {
                request.setArgs0(requestDH);
                request.setArgs1(requestFilePath);
                
-               stub.putFile(request);
+               response = stub.putFile(request);
                        
-               System.out.print("See file on the server with path : " + requestFilePath);
+               System.out.print("See file on the server with path : " + response.get_return());
        }
 
 }
index b83d7ff28f373d7d01369de3435bb25262a69e5c..9f7b7798f383f23d8b4955db1f4cb5749cb7e65e 100644 (file)
@@ -1,7 +1,5 @@
 package org.splat.ws_server.service.salome;
 
-import java.io.IOException;
-
 import javax.activation.DataHandler;
 
 
@@ -28,7 +26,7 @@ public interface SimanSalomeService {
         * Put the file from client to server.
         * @param dataHandler the data handler
         * @param vaultURL the target URL in vault
-        * @throws IOException input/output error
+        * @return the result URL in vault
         **/
-       void /*DataHandler*/ putFile(final DataHandler dataHandler, final String vaultURL);
+       String /*DataHandler*/ putFile(final DataHandler dataHandler, final String vaultURL);
 }
index db1497f76819a770133b8cd748fac8aeb139882c..4d902285e40feb91268d3845651b0af92740c677 100644 (file)
@@ -185,7 +185,7 @@ public class SimanSalomeServiceImpl implements SimanSalomeService {
         * @see org.splat.ws_server.service.salome.SimanSalomeService#putFile(javax.activation.DataHandler, java.io.File)
         */
        @Override
-       public void /*DataHandler*/ putFile(final DataHandler dataHandler, final String vaultURL) {
+       public String /*DataHandler*/ putFile(final DataHandler dataHandler, final String vaultURL) {
                
                File vaultURLFile = new File(vaultURL);
                File serverFilePath = vaultURLFile.getParentFile();
@@ -211,6 +211,7 @@ public class SimanSalomeServiceImpl implements SimanSalomeService {
                        e.printStackTrace();
                }
                
+               return vaultURL;
                /*FileDataSource fileDataSource = new FileDataSource(vaultURL);
                DataHandler fileDataHandler = new DataHandler(fileDataSource);
                return fileDataHandler;*/