XMLFMCallBackPOA.java 4.95 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.xmlformcallback;

import com.adobe.xmlformcallback.*;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Object;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.portable.*;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.Servant;

import java.util.HashMap;

public abstract class XMLFMCallBackPOA
extends Servant
implements InvokeHandler,
XMLFMCallBackOperations {
    private static final HashMap<String, Integer> m_opsHash = new HashMap();
    private String[] ids = new String[]{"IDL:com/adobe/xmlformcallback/XMLFMCallBack:1.0"};

    public XMLFMCallBack _this() {
        Object __o = this._this_object();
        XMLFMCallBack __r = XMLFMCallBackHelper.narrow(__o);
        if (__o != null && __o != __r) {
            ((ObjectImpl)__o)._set_delegate(null);
        }
        return __r;
    }

    public XMLFMCallBack _this(ORB orb) {
        Object __o = this._this_object(orb);
        XMLFMCallBack __r = XMLFMCallBackHelper.narrow(__o);
        if (__o != null && __o != __r) {
            ((ObjectImpl)__o)._set_delegate(null);
        }
        return __r;
    }

    public OutputStream _invoke(String method, InputStream _input, ResponseHandler handler) throws SystemException {
        OutputStream _out = null;
        Integer opsIndex = m_opsHash.get(method);
        if (null == opsIndex) {
            throw new BAD_OPERATION(method + " not found");
        }
        switch (opsIndex) {
            case 0: {
                try {
                    String _arg0 = _input.read_wstring();
                    _out = handler.createReply();
                    WSUsernamePasswordHelper.write(_out, this.getUsernamePasswordCredential(_arg0));
                }
                catch (WSXMLFMCallBackException _ex0) {
                    _out = handler.createExceptionReply();
                    WSXMLFMCallBackExceptionHelper.write(_out, _ex0);
                }
                break;
            }
            case 1: {
                try {
                    String _arg0 = _input.read_wstring();
                    String _arg1 = _input.read_wstring();
                    _out = handler.createReply();
                    ByteArrayHelper.write(_out, this.getP12Credential(_arg0, _arg1));
                }
                catch (WSXMLFMCallBackException _ex0) {
                    _out = handler.createExceptionReply();
                    WSXMLFMCallBackExceptionHelper.write(_out, _ex0);
                }
                break;
            }
            case 2: {
                try {
                    String _arg0 = _input.read_wstring();
                    String _arg1 = _input.read_wstring();
                    _out = handler.createReply();
                    WSUsernamePasswordHelper.write(_out, this.getUsernamePasswordCredentialBatch(_arg0, _arg1));
                }
                catch (WSXMLFMCallBackException _ex0) {
                    _out = handler.createExceptionReply();
                    WSXMLFMCallBackExceptionHelper.write(_out, _ex0);
                }
                break;
            }
            case 3: {
                byte[] _arg0 = ByteArrayHelper.read(_input);
                _out = handler.createReply();
                this.setInvocationContext(_arg0);
                break;
            }
            case 4: {
                try {
                    String _arg0 = _input.read_wstring();
                    String _arg1 = _input.read_wstring();
                    String _arg2 = _input.read_wstring();
                    _out = handler.createReply();
                    ByteArrayHelper.write(_out, this.getP12CredentialBatch(_arg0, _arg1, _arg2));
                }
                catch (WSXMLFMCallBackException _ex0) {
                    _out = handler.createExceptionReply();
                    WSXMLFMCallBackExceptionHelper.write(_out, _ex0);
                }
                break;
            }
            case 5: {
                byte[] _arg0 = ByteArrayHelper.read(_input);
                WSPair[][] _arg1 = WSPairListArrayHelper.read(_input);
                _out = handler.createReply();
                this.setContextAndRequestInfo(_arg0, _arg1);
                break;
            }
            case 6: {
                WSPair[][] _arg0 = WSPairListArrayHelper.read(_input);
                _out = handler.createReply();
                this.setServiceRequestInfo(_arg0);
                break;
            }
        }
        return _out;
    }

    public String[] _all_interfaces(POA poa, byte[] obj_id) {
        return this.ids;
    }

    static {
        m_opsHash.put("getUsernamePasswordCredential", 0);
        m_opsHash.put("getP12Credential", 1);
        m_opsHash.put("getUsernamePasswordCredentialBatch", 2);
        m_opsHash.put("setInvocationContext", 3);
        m_opsHash.put("getP12CredentialBatch", 4);
        m_opsHash.put("setContextAndRequestInfo", 5);
        m_opsHash.put("setServiceRequestInfo", 6);
    }
}