사용자 가이드 (cxf, axis)

16
사용자 가이드 (CXF, AXIS) 인터페이스 라이브러리 내 CXF, AXIS 는 사용 방법이 동일합니다. 본 가이드는 CXF 기준으로 작성되었습니다. (현재 AXIS2는 임시적으로 지원 중지되었습니다.) 버전 변경 시 유의 사항 준비 사항 1. 전송 클래스 SendData.java 2. 수신 클래스 ReceiveData.java 3. WSDL 코드 <?xml version='1.0' encoding='UTF-8'?> <wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:n1="urn:sap-com:document:sap:rfc:functions" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style"> 1. smartsuite-ifproxy-1.0.8 이전 버전에서 1.0.8 버전으로 변경 시 테이블 수정 작업 필수 smartsuite-ifproxy 1.0.8 릴리즈 노트 확인 2. smartsuite-ifproxy-1.1.3 이전 버전에서 1.1.3 버전으로 변경 시 테이블 추가 작업 필수 smartsuite-ifproxy 1.1.3 릴리즈 노트 확인 3. smartsuite-ifproxy-1.1.8 이전 버전에서 1.1.8 버전으로 변경 시 mybatis-context.xml 내 mapper 경로 수정 필수 내부 query 가 mssql 과 oracle로 분기처리 되도록 수정 <bean id="sqlSessionFactory" class="smartsuite.mybatis.ReconfigurableSqlSessionFactoryBean" p:configurationProperties-ref="mybatisConfigurationProperties" p:configLocation="classpath:mybatis.xml" p:dataSource-ref="dataSource"> <property name="mapperLocations"> <array> ... <!--<value>classpath:smartsuite/ifproxy/mapper/*.xml</value>--> //기존 소스 삭제 <value>classpath:smartsuite/ifproxy/mapper/oracle/*.xml</value> <value>classpath:smartsuite/ifproxy/mapper/mssql/*.xml</value> ... mybatis-context.xml WSDL Code Expand source

Upload: others

Post on 02-Feb-2022

27 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 사용자 가이드 (CXF, AXIS)

사용자 가이드 (CXF, AXIS) 

인터페이스 라이브러리 내 CXF, AXIS 는 사용 방법이 동일합니다. 본 가이드는 CXF 기준으로 작성되었습니다. (현재 AXIS2는 임시적으로지원 중지되었습니다.)

※ 버전 변경 시 유의 사항

 

준비 사항

1. 전송 클래스

SendData.java

2. 수신 클래스

ReceiveData.java

3. WSDL 코드

<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style"xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:n1="urn:sap-com:document:sap:rfc:functions"xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style">

1. smartsuite-ifproxy-1.0.8 이전 버전에서 1.0.8 버전으로 변경 시 테이블 수정 작업 필수

smartsuite-ifproxy 1.0.8 릴리즈 노트 확인

2. smartsuite-ifproxy-1.1.3 이전 버전에서 1.1.3 버전으로 변경 시 테이블 추가 작업 필수

smartsuite-ifproxy 1.1.3 릴리즈 노트 확인

3. smartsuite-ifproxy-1.1.8 이전 버전에서 1.1.8 버전으로 변경 시 mybatis-context.xml 내 mapper 경로 수정 필수

내부 query 가 mssql 과 oracle로 분기처리 되도록 수정

 <bean id="sqlSessionFactory" class="smartsuite.mybatis.ReconfigurableSqlSessionFactoryBean" p:configurationProperties-ref="mybatisConfigurationProperties" p:configLocation="classpath:mybatis.xml" p:dataSource-ref="dataSource"> <property name="mapperLocations"> <array> ... <!--<value>classpath:smartsuite/ifproxy/mapper/*.xml</value>--> //기존 소스 삭제 <value>classpath:smartsuite/ifproxy/mapper/oracle/*.xml</value> <value>classpath:smartsuite/ifproxy/mapper/mssql/*.xml</value> ...

mybatis-context.xml

WSDL Code Expand

source

Page 2: 사용자 가이드 (CXF, AXIS)

<wsdl:types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style"xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:n1="urn:sap-com:document:sap:rfc:functions"xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:rfc:functions"> <xsd:simpleType name="char1"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="1"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="char10"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="10"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="char20"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="20"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="char200"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="200"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="char4"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="4"/> </xsd:restriction> </xsd:simpleType> </xsd:schema> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style"xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:n1="urn:sap-com:document:sap:rfc:functions"xmlns:n0="urn:sap-com:document:sap:rfc:functions" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" attributeFormDefault="qualified"targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style"> <xsd:import namespace="urn:sap-com:document:sap:rfc:functions"/> <xsd:complexType name="Zsmmp0001"> <xsd:sequence> <xsd:element name="Bukrs" type="n0:char4"/> <xsd:element name="Kostl" type="n0:char10"/> <xsd:element name="Ktext" type="n0:char20"/> <xsd:element name="Bkzkp" type="n0:char1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="TableOfZsmmp0001"> <xsd:sequence> <xsd:element maxOccurs="unbounded" minOccurs="0" name="item"type="tns:Zsmmp0001"/> </xsd:sequence> </xsd:complexType> <xsd:element name="ZEmmpCostCenterList"> <xsd:complexType> <xsd:sequence> <xsd:element name="EtList" type="tns:TableOfZsmmp0001"/>

Page 3: 사용자 가이드 (CXF, AXIS)

<xsd:element name="IBukrs" type="n0:char4"/> <xsd:element minOccurs="0" name="IKostl" type="n0:char10"/> <xsd:element minOccurs="0" name="IKtext" type="n0:char20"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="ZEmmpCostCenterListResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="EMsg" type="n0:char200"/> <xsd:element name="EResult" type="n0:char1"/> <xsd:element name="EtList" type="tns:TableOfZsmmp0001"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> <wsdl:message name="ZEmmpCostCenterList"> <wsdl:part element="tns:ZEmmpCostCenterList" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:message name="ZEmmpCostCenterListResponse"> <wsdl:part element="tns:ZEmmpCostCenterListResponse" name="parameter"> </wsdl:part> </wsdl:message> <wsdl:portType name="ZSCPES_COST_CENTER_LIST"> <wsdl:operation name="ZEmmpCostCenterListOper"> <wsdl:input message="tns:ZEmmpCostCenterList"> </wsdl:input> <wsdl:output message="tns:ZEmmpCostCenterListResponse"> </wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="ZSCPWSB_COST_CENTER_LIST" type="tns:ZSCPES_COST_CENTER_LIST"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsp:Policy> <wsp:PolicyReference URI="#BN__binding"/> </wsp:Policy> <wsdl:operation name="ZEmmpCostCenterListOper"> <soap:operation soapAction="" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="ZSCPWS_COST_CENTER_LIST"> <wsdl:port binding="tns:ZSCPWSB_COST_CENTER_LIST" name="ZSCPWSB_COST_CENTER_LIST"> <soap:address location=""/> </wsdl:port> </wsdl:service> <wsp:UsingPolicy required="true"/> <wsp:Policy wsu:Id="BN__binding"> <wsp:ExactlyOne> <wsp:All> <sp:TransportBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"> <wsp:Policy> <sp:TransportToken> <wsp:Policy> <sp:HttpsToken> <wsp:Policy>

Page 4: 사용자 가이드 (CXF, AXIS)

<wsp:ExactlyOne> <sp:HttpBasicAuthentication/> <sp:RequireClientCertificate/> </wsp:ExactlyOne> </wsp:Policy> </sp:HttpsToken> </wsp:Policy> </sp:TransportToken> <sp:AlgorithmSuite> <wsp:Policy> <wsp:ExactlyOne> <sp:Basic256/> <sp:Basic192/> <sp:Basic128/> <sp:TripleDes/> <sp:Basic256Rsa15/> <sp:Basic192Rsa15/> <sp:Basic128Rsa15/> <sp:TripleDesRsa15/> <sp:Basic256Sha256/> <sp:Basic192Sha256/> <sp:Basic128Sha256/> <sp:TripleDesSha256/> <sp:Basic256Sha256Rsa15/> <sp:Basic192Sha256Rsa15/> <sp:Basic128Sha256Rsa15/> <sp:TripleDesSha256Rsa15/> </wsp:ExactlyOne> </wsp:Policy> </sp:AlgorithmSuite> <sp:Layout> <wsp:Policy> <sp:Strict/> </wsp:Policy> </sp:Layout> </wsp:Policy> </sp:TransportBinding> </wsp:All>

Page 5: 사용자 가이드 (CXF, AXIS)

</wsp:ExactlyOne> </wsp:Policy></wsdl:definitions>

실제 업무에서 사용된 wsdl 이므로 address 는 공란으로 두었음

   메인 화면

    

                                                                              그림1. 인터페이스 관리 내 CXF-Soap 메인 화면

 

   

  : 등록된 인터페이스 목록을 조회합니다.인터페이스 목록 조회 버튼

   

: 등록된 WSDL 목록을 조회합니다. WSDL 목록 조회 버튼

   

  : 인터페이스를 생성합니다.인터페이스 생성 버튼

   

: WSDL 관련 정보를 설정합니다.   생성 버튼WSDL

 

1. WSDL 생성

 1.1. WSDL 기본 정보 입력

  

Page 6: 사용자 가이드 (CXF, AXIS)

                                            . WSDL 설정 팝업그림 2

   

  : WSDL 을 저장합니다.저장 버튼

   

: WSDL 을 삭제합니다. 삭제 버튼

   

  : WSDL 기본 정보를 입력합니다.기본 정보 필드

 

   

 기본 정보 필드에 WSDL 관련 정보를 이름, Address, Username, Password 순서로 입력한 뒤, 

 저장 버튼을 클릭하여 저장합니다.

    - 이름: 사용자가 구분하기 위한 이름

    - Address: WSDL 주소

    - Username: 인증이 필요한 경우의 username

    - Password: 인증이 필요한 경우의 password

 

Page 7: 사용자 가이드 (CXF, AXIS)

 1.2. WSDL 업데이트

  

                              그림 3. WSDL 설정 팝업 (WSDL 코드 추가)

   

  : WSDL 코드를 입력합니다.WSDL 코드 입력 필드

   

: WSDL 코드를 업데이트 합니다. 업데이트 버튼

 

   

 WSDL 코드 입력 필드에 WSDL 코드를 입력한 뒤 

업데이트 버튼 클릭 시 해당 WSDL 코드를 컴파일하여 jar 파일을 생성합니다. 

2. 인터페이스 생성

WSDL 코드 입력시 주의사항

WSDL의 내용 중 operation name과 input message name이 중복될 경우 데이터 관계설정이 불가능 할 수 있습니다.WSDL의 내용 중 complexType name과 operation name이 동일할 경우 input/output class 생성이 안되는 이유로 인해데이터 관계설정이 불가능 할 수 있습니다. operation name을 다른 값으로 변경해서 사용해야 합니다.

Page 8: 사용자 가이드 (CXF, AXIS)

 2.1. 인터페이스 설정

   

                                         그림 4. 인터페이스 설정 팝업

   

  : 입력된 인터페이스 설정 정보를 저장합니다.  저장 버튼

    

    인터페이스 아이디, 설명, 전송 클래스, 수신 클래스, 실행 기록 최대 보관일 정보 입력 후 

저장 버튼으로 설정 정보를 저장합니다.

    - 아이디: 사용자가 구분하기 위한 인터페이스 아이디

    - 설명: 해당 인터페이스에 대한 설명

    - 전송 클래스: 서버로 데이터를 전송하기 위한 클라이언트 쪽 전송 클래스

    - 수신 클래스: 서버에서 받은 데이터를 저장하는 클라이언트 쪽 수신 클래스

    - 실행기록 최대 보관일: 실행 기록 보관일수 지정

 

 2.2. Cxf 기술 설정

   

Page 9: 사용자 가이드 (CXF, AXIS)

                            그림 5. 인터페이스 설정 팝업 (WSDL 설정)

   

  : 전송 클래스, 수신 클래스 각각에 대하여 관계 설정을 진행합니다.데이터 관계 설정 버튼

   

: 입력된 WSDL 설정 정보를 저장합니다. 저장 버튼

 

    WSDL 선택 후 해당 WSDL 내 Interface 및 method 를 선택한 후 

저장 버튼을 클릭하여 해당 내용을 저장합니다.

    그 후, 

데이터 관계 설정 버튼을 클릭하여 전송/수신 데이터에 대한 관계 설정을 진행합니다.

 

 

3. 데이터 관계 설정

 3.1. 전송 데이터 설정

   

Page 10: 사용자 가이드 (CXF, AXIS)

                                      . 데이터 관계 설정 팝업 내 전송 탭그림 6

    

  : 매핑할 데이터를 조회합니다.매핑 대상 조회 버튼

    

  : 해당 데이터의 매핑 여부를 나타냅니다.매핑 여부

    

   버튼: 매핑할 데이터를 선택합니다.매핑 대상 선택

    

  : 관계 설정된 데이터 매핑 정보를 저장합니다.데이터 관계 설정 저장 버튼

    

  : 관계 설정된 데이터 매핑 정보를 초기화합니다.데이터 관계 설정 초기화 버튼

    

  : 관계 설정된 데이터 매핑 정보를 조회합니다.데이터 관계 매핑 보기 버튼

 

   화면 우측 클라이언트 전송 클래스는 앞서 지정한 전송 클래스이고, 좌측 서버 데이터는 CXF 서버에 전송할 데이터입니다.

  

버튼과  

버튼으로 매핑하고자 하는 데이터 설정 후 

버튼으로 저장합니다. 

Page 11: 사용자 가이드 (CXF, AXIS)

 필드는 해당 행 데이터의 매핑 여부를 보여줍니다.

  

버튼 클릭 시 매핑된 데이터 정보가 초기화되고, 

 버튼 클릭 시 매핑된 데이터 정보를 조회할 수 있습니다.

 3.2. 수신 데이터 설정

   

                                      . 데이터 관계 설정 팝업 내 수신 탭그림 7

    

  : 매핑할 데이터를 조회합니다.매핑 대상 조회 버튼

    

  : 해당 데이터의 매핑 여부를 나타냅니다.매핑 여부

    

   버튼: 매핑할 데이터를 선택합니다.매핑 대상 선택

    

  : 관계 설정된 데이터 매핑 정보를 저장합니다.데이터 관계 설정 저장 버튼

    

  : 관계 설정된 데이터 매핑 정보를 초기화합니다.데이터 관계 설정 초기화 버튼

    

Page 12: 사용자 가이드 (CXF, AXIS)

  : 관계 설정된 데이터 매핑 정보를 조회합니다.데이터 관계 매핑 보기 버튼

 

   화면 좌측 클라이언트 수신 클래스는 앞서 지정한 수신 클래스이고, 우측 서버 데이터는 CXF 서버에 전송할 데이터입니다.

  

버튼과  

버튼으로 매핑하고자 하는 데이터 설정 후 

버튼으로 저장합니다. 

 필드는 해당 행 데이터의 매핑 여부를 보여줍니다.

  

 버튼 클릭 시 매핑된 데이터 정보가 초기화되고, 

 버튼 클릭 시 매핑된 데이터 정보를 조회할 수 있습니다.

 

4. 인터페이스 실행

  

                                                                                              그림 8. 메인 화면 내 실행 버튼

   

  : 실행하고자 하는 인터페이스의 실행 팝업이 생성됩니다.실행 버튼

 

   

 버튼을 클릭하여 실행하고자 하는 인터페이스를 실행합니다. 버튼 클릭 시 아래와 같이 실행 기록 팝업이 생성됩니다.

 

Page 13: 사용자 가이드 (CXF, AXIS)

  

                                                                                                그림 9. 실행 기록 팝업

    

  : 해당 인터페이스를 실행합니다.실행 버튼

    

: 검색 조건으로 실행 이력을 조회합니다. 조회 버튼

 

    

조회 버튼 클릭 시, 검색 조건에 맞는 실행 기록을 조회합니다.  

 실행 버튼 클릭 시 아래의 실행 팝업이 생성됩니다.

 

  

Page 14: 사용자 가이드 (CXF, AXIS)

                                           그림 10. 실행 팝업

   

  : 전송할 데이터 입력 필드입니다.전송 데이터

   

: 인터페이스 실행 버튼입니다.실행 버튼 

 

   

 전송 데이터 필드에 전송하고자 하는 데이터 값을 입력 후, 

 실행 버튼을 클릭하여 입력한 전송 데이터를 CXF 서버에 전송합니다.

 

 

5. 실행 결과

  

Page 15: 사용자 가이드 (CXF, AXIS)

  

.                                  그림 11 실행 결과 팝업 - 전송                    실                                                                       . 그림 12행 결과 팝업 - 수신

 

   실행 후 성공 시 위와 같이 전송/수신 결과를 확인할 수 있습니다.

   실패 시 아래와 같이 오류 내용을 확인할 수 있습니다.

 

  

Page 16: 사용자 가이드 (CXF, AXIS)

                                   그림 13. 실행 결과 - 오류내용