All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.axis2.wsdl.template.java.PolicyExtensionTemplate.xsl Maven / Gradle / Ivy

There is a newer version: 1.8.2
Show newest version





    
        
        
        /**
         * Starts a reliabel message sequence
         */
        public void startSequence() {
            _getServiceClient().getOptions().setProperty("START_RM_SEQUENCE", "true");            
        }
        
        
        
        /**
         * Marks the last message for the sequence
         */
         public void setLastMessage() {
             _getServiceClient().getOptions().setProperty("Sandesha2ClientAPIPropertyWSRMLastMessage", "true");
         }
        
        
        
        /**
         * Terminates the reliabel message sequence
         */
        public void endSequence() {
            _getServiceClient().getOptions().setProperty("END_RM_SEQUENCE", "true");
        }
        
        
        
            
        
        
        
        
    // auto genenrated stub methods 
    
    public void setUsername(java.lang.String username) {
        _serviceClient.getOptions().setProperty(org.apache.ws.security.handler.WSHandlerConstants.USER, username);
    }

    public void setPassword(java.lang.String password) {
        _UTCallback pwCallback = new _UTCallback();
        pwCallback.setPassword(password);
    _serviceClient
                .getOptions()
                .setProperty(
                        org.apache.ws.security.handler.WSHandlerConstants.PASSWORD_TYPE,
                        "PasswordText");
        _serviceClient
                .getOptions()
                .setProperty(
                        org.apache.ws.security.handler.WSHandlerConstants.PW_CALLBACK_REF,
                        pwCallback);    }

    private class _UTCallback implements
            javax.security.auth.callback.CallbackHandler {

        private java.lang.String password;

        public _UTCallback() {
        }

        public void setPassword(java.lang.String password) {
            this.password = password;
        }

        public void handle(javax.security.auth.callback.Callback[] callbacks)

        throws java.io.IOException,
                javax.security.auth.callback.UnsupportedCallbackException {

            for (int i = 0; i < callbacks.length; i++) {

                if (callbacks[i] instanceof org.apache.ws.security.WSPasswordCallback) {

                    org.apache.ws.security.WSPasswordCallback pc = (org.apache.ws.security.WSPasswordCallback) callbacks[i];

                    if (pc.getIdentifer().equals(getUsername())) {
                        pc.setPassword(password);

                    } else {
                        pc.setPassword(password);
                    }

                } else {

                    throw new javax.security.auth.callback.UnsupportedCallbackException(
                            callbacks[i], "Unrecognized Callback");
                }
            }
        }

        private java.lang.String getUsername() {
            return (String) _serviceClient.getOptions().getProperty(
                    org.apache.ws.security.handler.WSHandlerConstants.USER);
        }
    }
        
        

        
            
            private void setOpNameArray(){
            opNameArray = new javax.xml.namespace.QName[] {
            
                ,
                new javax.xml.namespace.QName("","")
            
            };
           }
           
            
            private void setOpNameArray(){
            opNameArray = null;
            }
           
        
    




© 2015 - 2024 Weber Informatics LLC | Privacy Policy