package cokr.xit.interfaces.sntris.buga; import java.net.URL; import java.rmi.RemoteException; import java.util.Enumeration; import java.util.List; import java.util.Vector; import javax.xml.namespace.QName; import org.apache.axis.AxisEngine; import org.apache.axis.AxisFault; import org.apache.axis.NoEndPointException; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import org.apache.axis.client.Stub; import org.apache.axis.description.OperationDesc; import org.apache.axis.encoding.DeserializerFactory; import org.apache.axis.encoding.SerializerFactory; import org.apache.axis.encoding.ser.BeanDeserializerFactory; import org.apache.axis.encoding.ser.BeanSerializerFactory; import org.apache.axis.soap.SOAPConstants; import org.apache.axis.utils.JavaUtils; /** * @Class Name : BugaWSSoapBindingStub.java * @Description : 세외수입웹서비스 * @Version 1.0 * @Since 2019. 09. 03 * @Author 박영수 *
 *   수정일      수정자           수정내용
 *  -------    -------------    ----------------------
 * 
*/ public class BugaWSSoapBindingStub extends Stub implements BugaWS { private Vector cachedSerQNames = new Vector<>(); private Vector> cachedSerClasses = new Vector<>(); private Vector cachedSerFactories = new Vector<>(); private Vector cachedDeserFactories = new Vector<>(); private static final OperationDesc[] _operations = new OperationDesc[14]; static { _operations[0] = Descriptor.operation( "getUserInfo", Bu04UserInfoWSDTO.class, Descriptor.parameter("in0", String.class, true) ); _operations[1] = Descriptor.operation( "isCheckBugaUpdate", boolean.class, Descriptor.parameter("in0", String.class, true), Descriptor.parameter("in1", String.class, true), Descriptor.parameter("in2", String.class, true), Descriptor.parameter("in3", String.class, true), Descriptor.parameter("in4", String.class, true), Descriptor.parameter("in5", String.class, true) ); _operations[2] = Descriptor.operation( "getNewTaxNo", String.class, Descriptor.parameter("in0", String.class, true), Descriptor.parameter("in1", String.class, true), Descriptor.parameter("in2", String.class, true), Descriptor.parameter("in3", String.class, true) ); _operations[3] = Descriptor.operation( "getSemokInfo", Bu04SemokWSDTO.class, Descriptor.parameter("in0", String.class, true), Descriptor.parameter("in1", String.class, true), Descriptor.parameter("in2", String.class, true) ); _operations[4] = Descriptor.operation( "getListSemokInfo", Bu04SemokWSDTO[].class, Descriptor.parameter("in0", String.class, true), Descriptor.parameter("in1", String.class, true) ); _operations[5] = Descriptor.operation( "insertBugaRegist", StatusCodeWSDTO.class, Descriptor.parameter("in0", Bu04BugaWSDTO.class, true) ); _operations[6] = Descriptor.operation( "insertBugaRegistExt", StatusCodeWSDTO.class, Descriptor.parameter("in0", Bu04BugaExtWSDTO.class, true) ); _operations[7] = Descriptor.operation( "deleteBuga", StatusCodeWSDTO.class, Descriptor.parameter("in0", String.class, true), Descriptor.parameter("in1", String.class, true), Descriptor.parameter("in2", String.class, true), Descriptor.parameter("in3", String.class, true), Descriptor.parameter("in4", String.class, true), Descriptor.parameter("in5", String.class, true), Descriptor.parameter("in6", String.class, true), Descriptor.parameter("in7", String.class, true) ); _operations[8] = Descriptor.operation( "getListSimpleBuga", Bu04SimpleBugaWSDTO[].class, Descriptor.parameter("in0", String.class, true), Descriptor.parameter("in1", String.class, true), Descriptor.parameter("in2", String.class, true) ); _operations[9] = Descriptor.operation( "getSimpleBuga", Bu04SimpleBugaETCWSDTO.class, Descriptor.parameter("in0", String.class, true), Descriptor.parameter("in1", String.class, true), Descriptor.parameter("in2", String.class, true), Descriptor.parameter("in3", String.class, true), Descriptor.parameter("in4", String.class, true), Descriptor.parameter("in5", String.class, true), Descriptor.parameter("in6", String.class, true) ); _operations[10] = Descriptor.operation( "getSemokInfoRACS", Bu04SemokWSRACSDTO.class, Descriptor.parameter("in0", String.class, true), Descriptor.parameter("in1", String.class, true), Descriptor.parameter("in2", String.class, true) ); _operations[11] = Descriptor.operation( "getGyuljeInfo", Bu04GyuljeInfoDTO.class, Descriptor.parameter("in0", String.class, true), Descriptor.parameter("in1", String.class, true), Descriptor.parameter("in2", String.class, true), Descriptor.parameter("in3", String.class, true), Descriptor.parameter("in4", String.class, true), Descriptor.parameter("in5", String.class, true), Descriptor.parameter("in6", String.class, true) ); _operations[12] = Descriptor.operation( "BiGwaSeRegistWS", StatusCodeWSDTO.class, Descriptor.parameter("in0", String.class, true), Descriptor.parameter("in1", String.class, true), Descriptor.parameter("in2", String.class, true), Descriptor.parameter("in3", String.class, true), Descriptor.parameter("in4", String.class, true), Descriptor.parameter("in5", String.class, true), Descriptor.parameter("in6", String.class, true) ); _operations[13] = Descriptor.operation( "updateNapgiYmd", StatusCodeWSDTO.class, Descriptor.parameter("in0", Bu04BugaWSDTO.class, true) ); } public BugaWSSoapBindingStub() throws AxisFault { this(null); } public BugaWSSoapBindingStub(URL endpointURL, javax.xml.rpc.Service service) throws AxisFault { this(service); super.cachedEndpoint = endpointURL; } public BugaWSSoapBindingStub(javax.xml.rpc.Service service) throws AxisFault { if (service == null) { super.service = new Service(); } else { super.service = service; } ((Service)super.service).setTypeMappingVersion("1.2"); List.of( Bu04BugaExtWSDTO.class, Bu04BugaWSDTO.class, Bu04GyuljeInfoDTO.class, Bu04SemokWSDTO.class, Bu04SemokWSRACSDTO.class, Bu04SimpleBugaETCWSDTO.class, Bu04SimpleBugaWSDTO.class, Bu04UserInfoWSDTO.class, StatusCodeWSDTO.class ).forEach(klass -> { cachedSerQNames.add(Descriptor.ofName(klass.getSimpleName())); cachedSerClasses.add(klass); cachedSerFactories.add(BeanSerializerFactory.class); cachedDeserFactories.add(BeanDeserializerFactory.class); }); } protected Call createCall() throws RemoteException { try { Call _call = super._createCall(); if (super.maintainSessionSet) { _call.setMaintainSession(super.maintainSession); } if (super.cachedUsername != null) { _call.setUsername(super.cachedUsername); } if (super.cachedPassword != null) { _call.setPassword(super.cachedPassword); } if (super.cachedEndpoint != null) { _call.setTargetEndpointAddress(super.cachedEndpoint); } if (super.cachedTimeout != null) { _call.setTimeout(super.cachedTimeout); } if (super.cachedPortName != null) { _call.setPortName(super.cachedPortName); } Enumeration keys = super.cachedProperties.keys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); _call.setProperty(key, super.cachedProperties.get(key)); } // All the type mapping information is registered // when the first call is made. // The type mapping information is actually registered in // the TypeMappingRegistry of the service, which // is the reason why registration is only needed for the first call. synchronized (this) { if (firstCall()) { // must set encoding style before registering serializers _call.setEncodingStyle(null); for (int i = 0; i < cachedSerFactories.size(); ++i) { Class cls = cachedSerClasses.get(i); QName qName = cachedSerQNames.get(i); Object x = cachedSerFactories.get(i); if (x instanceof Class sf) { Class df = (Class)cachedDeserFactories.get(i); _call.registerTypeMapping(cls, qName, sf, df, false); } else if (x instanceof SerializerFactory sf) { DeserializerFactory df = (DeserializerFactory)cachedDeserFactories.get(i); _call.registerTypeMapping(cls, qName, sf, df, false); } } } } return _call; } catch (Throwable _t) { throw new AxisFault("Failure trying to get the Call object", _t); } } private T execute(OperationDesc oper, String soapActionURI, Object[] params) throws RemoteException { if (super.cachedEndpoint == null) throw new NoEndPointException(); Call _call = createCall(); _call.setOperation(oper); _call.setUseSOAPAction(true); _call.setSOAPActionURI(soapActionURI); _call.setEncodingStyle(null); _call.setProperty(Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setProperty(AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(Descriptor.ofName(oper.getName())); setRequestHeaders(_call); setAttachments(_call); Object _resp = _call.invoke(params); if (_resp instanceof RemoteException re) throw re; extractAttachments(_call); Class returnType = oper.getReturnClass(); try { return returnType.cast(_resp); } catch (Exception _exception) { return returnType.cast(JavaUtils.convert(_resp, returnType)); } } @Override public Bu04UserInfoWSDTO getUserInfo(String in0) throws RemoteException { return execute(_operations[0], "", new Object[] {in0}); } @Override public boolean isCheckBugaUpdate(String in0, String in1, String in2, String in3, String in4, String in5) throws RemoteException { return execute(_operations[1], "BugaSoapAction", new Object[] {in0, in1, in2, in3, in4, in5}); } @Override public String getNewTaxNo(String in0, String in1, String in2, String in3) throws RemoteException { return execute(_operations[2], "BugaSoapAction", new Object[] {in0, in1, in2, in3}); } @Override public Bu04SemokWSDTO getSemokInfo(String in0, String in1, String in2) throws RemoteException { return execute(_operations[3], "BugaSoapAction", new Object[] {in0, in1, in2}); } @Override public Bu04SemokWSDTO[] getListSemokInfo(String in0, String in1) throws RemoteException { return execute(_operations[4], "", new Object[] {in0, in1}); } @Override public StatusCodeWSDTO insertBugaRegist(Bu04BugaWSDTO in0) throws RemoteException { return execute(_operations[5], "BugaSoapAction", new Object[] {in0}); } @Override public StatusCodeWSDTO insertBugaRegistExt(Bu04BugaExtWSDTO in0) throws RemoteException { return execute(_operations[6], "", new Object[] {in0}); } @Override public StatusCodeWSDTO deleteBuga(String in0, String in1, String in2, String in3, String in4, String in5, String in6, String in7) throws RemoteException { return execute(_operations[7], "", new Object[] {in0, in1, in2, in3, in4, in5, in6, in7}); } @Override public Bu04SimpleBugaWSDTO[] getListSimpleBuga(String in0, String in1, String in2) throws RemoteException { return execute(_operations[8], "", new Object[] {in0, in1, in2}); } @Override public Bu04SimpleBugaETCWSDTO getSimpleBuga(String in0, String in1, String in2, String in3, String in4, String in5, String in6) throws RemoteException { return execute(_operations[9], "", new Object[] {in0, in1, in2, in3, in4, in5, in6}); } @Override public Bu04SemokWSRACSDTO getSemokInfoRACS(String in0, String in1, String in2) throws RemoteException { return execute(_operations[10], "", new Object[] {in0, in1, in2}); } @Override public Bu04GyuljeInfoDTO getGyuljeInfo(String in0, String in1, String in2, String in3, String in4, String in5, String in6) throws RemoteException { return execute(_operations[11], "", new Object[] {in0, in1, in2, in3, in4, in5, in6}); } @Override public StatusCodeWSDTO biGwaSeRegistWS(String in0, String in1, String in2, String in3, String in4, String in5, String in6) throws RemoteException { return execute(_operations[12], "", new Object[] {in0, in1, in2, in3, in4, in5, in6}); } @Override public StatusCodeWSDTO updateNapgiYmd(Bu04BugaWSDTO in0) throws RemoteException { return execute(_operations[13], "", new Object[] {in0}); } }