'XML'에 해당되는 글 2건

  1. 2012.07.30 [펌]XML 특수문자/예약문자
  2. 2011.04.05 Soap이란?
JAVA & Open Framework2012. 7. 30. 14:42

XML 예약문자

<, >, &는 XML tag 표시와 entity를 표시하는 XML 예약문자로, XML 문서에 그대로 사용할 수 없다.

< (less-than sign) &lt;
> (greater-than sign) &gt;
& (ampersand) &amp;


그리스문자

그리스 문자는 풀어서 사용한다.

α alpha
β beta
γ gamma
δ,Δ delta
ε epsilon
ζ zeta
η eta
θ theta
ι iota
κ kappa
λ lambda
μ micron
ν nu
ξ xi
ο omicron
π pi
ρ rho
σ, Σ sigma
τ tau
υ upsilon
φ phi
χ chi
ψ psi
ω, Ω omega


기호 & 부호

&lt; or =
&gt; or =
± +/-
˚ degrees
degrees C
--&gt;
㎍, μG microgram
㎕, μL microliter
㎛, μM micrometer
® (R)
(TM)
χ2 chi─square


화학기호

화학기호는 윗첨자나 아랫첨자를 지정하지 않고 그대로 입력한다.

K+ K+
Cl- Cl-
Mg2+ Mg2+
CO2 CO2
H2O H2O


수학기호

수학기호는 윗첨자나 아랫첨자를 괄호 "( )" 안에 넣어서 입력한다.

102 10(2)
10-2 10(-2)
height2.239 height(2.239)

 

출처 : http://www.kamje.or.kr/special.html

Posted by 아로나
SOAP2011. 4. 5. 14:17

1. Soap이란?

 

-SOAP(Simple Object Access Protocol)은 일반적으로 널리 알려진 HTTP,HTTPS,SMTP등을 사용하여 XML기반의 메시지를 컴퓨터 네트워크 상에서 교환하는 형태의 프로토콜

 

-SOAP은 웹 서비스(Web Service)에서 기본적인 메시지를 전달하는 기반

 

2. Soap 작동원리

 대다수의 방화벽이 웹 포트인 80 포트만 허용하기 때문에 SOAP은 대부분 HTTP에 의존하여 메시징 처리가 이루어진다. SOAP이 인터넷을 통한 메시징 처리의 표준으로 자리 잡을 수 있었던 이유는 HTTP 위에 SOAP이 올라갈 수 있기 때문이다. HTTP위에 SOAP이 올라간다는 것은 HTTP의 요청과 응답에 메시지에 SOAP 메시지가 포함될 수 있다는 것을 의미한다.

 SOAP 스펙은 SOAP 메시지들이 단방향(one-way)이 아니라 양방향(two-way)이라고 말하고 있다 서버뿐 아니라 클라이언트도 SOAP메시지를 해석할 수 있어야 한다.

 

SOAP에 HTTP를 이용하는 이유
·          HTTP는 이미 널리 구현되어 있으며, 이해하기 쉬운 프로토콜이다.
·          그 자체가 가지고 있는 요청/응답 패러다임이 RPC와 잘 들어 맞는다.
·          이미 대부분의 방화벽이 HTTP에서 작업할 수 있도록 설정되어 있다.
·          HTTP보안 소켓 레이어(Secure Sockets Layer, SSL)를 이용하여 쉽게 보안을 구축 할 수 있다.
·        현재의 주 컴포넌트 기술로 일컬어지는 JAVA, CORBA, COM 등은 목적은 비슷하지만 목적을 구현하는 방법은 매우 다르므로 호환성을 기대하기 어렵다.
 
SOAP TCP HTTP뿐만 아니라 SMTP 같은 다양한 프로토콜과도 함께 사용할 수 있는 것이다. 메시징 서버를 사용해서 메시지 처리를 할 때와 마찬가지로, SOAP은 기본적으로 단방향으로 메시지를 보낸다. 송신자는 메시지를 보내지만, 수신자로부터 메시지를 받지는 않는다. 하지만 송신자가 메시지를 보내고 그 결과로 다시 SOAP 프로토콜을 통해 메시지를 받는 것은 가능하다.
 

 

 
3. Soap 메시지 구조
 SOAP 메시지는 크게 SOAP Envelope, SOAP Header, SOAP Body, SOAP Fault로 구성되어있다.
 

 

·           SOAP Envelope : EnvelopeSOAP 메시지를 감싸는 가장 상위의 요소이다. EnvelopeHeaderBody를 가질 수 있다.
 
·           SOAP Header : Header는 메시지에서 필수적인 요소는 아니지만 SOAP 메시지에 기능을 추가 하는 역할을 담당한다. 여러 가지 정보를 헤더에 담기 위해 여러 개의 블록으로 구성되어 있으며, HeaderEnvelope 태그 다음에 가장 먼저 나오는 항목이어야 한다. 보통 Header는 인코딩, 인증, 트랜잭션 같은 관리적인 문제에 사용된다.
 
·           SOAP Body : BodySOAP을 통해 전송할 데이터로 채워진다. 여러 개의 블록으로 구성될 수 있으며, 요청할 때 요청할 웹 서비스의 이름과 매개변수로 채워지고, 응답할 때는 결과로 채워진다.
 
·           SOAP Fault : SOAP 처리를 한 후 발생하는 에러 처리 메시지가 이 영역에 채워진다. SOAP Fault는 에러에 대한 자세한 내용을 기술할 수 있도록 다음과 같이 여러 개의 요소를 지원한다.
 
-         <faultcode> : 에러의 종류를 코드로 구분할 수 있도록 해준다. 웹 서비스 소비자는 이 코드를 보고 어떤 종류의 에러가 발생했는지 알 수 있다. SOAP에는 SOAP 메시징에서 일어날 수 있는 기본 코드를 정의하고 있고 웹 서비스 제공자가 별도로 정의할 수도 있다.
-         <faultstring> : 코드가 기계적인 내용인 데 반해, 스트링은 사람이 에러에 대한 내용을 읽고 이해할 수 있도록 해준다.
-         <faultactor> : 메시징 처리를 하는 중에 어떤 부분에서 에러가 발생했는지 알릴 때 사용된다.
-         <detail> : Body에 관련된 데이터 때문에 SOAP 메시징이 성공하지 못했을 경우에 사용된다. 만약 에러가 발생했는데 <detail> 부분이 없다면, Body와 관련된 부분에서 에러가 발생하지 않았다는 것을 알 수 있다.
 
 
 4. Soap의 데이터베이스 접근방법
 
         The SOAP developer's approach to such a problem is to encapsulate the database request logic for the service in a method (or function) in C or VB or Java etc, then set up a process that listens for requests to the service; such requests being in SOAP format and containing the service name and any required parameters. As mentioned, the transport layer might be HTTP though it could just as easily be SMTP or something else. Now, the listener process, which for simplicity is typically written in the same language as the service method, decodes the incoming SOAP request and transforms it into an invocation of the method. It then takes the result of the method call, encodes it into a SOAP message (response) and sends it back to the requester. Conceptually, this arrangement looks like the following:
 
 
 
예 ) ORACLE 

 

 

5. Soap Message Packet

 

 

Client code makes a service call by invoking the appropriate method in the SOAP package (1). The

SOAP package's SOAP serializer converts this invocation into a SOAP request and sends that to t

e HTTP encoder (2). The HTTP encoder wraps the SOAP message in a HTTP request and sends it

o the SOAP server (3). The response is received from the SOAP server by the HTTP encoder/deco

er module(4) which decodes it and extracts the SOAP response which it hands to the SOAP deser

alizer(5). The SOAP deserializer deserializes the message and passes the result to the client code

(6) as the return value to the orginal invocation (1).

 

 

 

 

 

 Appserver process receives a HTTP request from the SOAP Client at the SOAP service's URL (1) and passes it accordingly to the SOAP servlet (2). The SOAP servlet uses the package-supplied HTTP and SOAP decoding functionality to extract the details of the services call (3 and 4), ie. the method name and method parameters. Once armed with these the SOAP servlet can invoke the method (5 and 6), encode the response (7 and 8) and supply the HTTP response to the HTTP Request handler (9) which in turn replies to the SOAP Client (10). Note that the Servlet Thread box simply indicates what is running in the Servlet's VM.

'SOAP' 카테고리의 다른 글

JAVA로 SOAP 구축하기(2)  (0) 2011.04.05
JAVA로 SOAP 구축하기(1)  (0) 2011.04.05
[SOAP강좌] Java 서버 - Delphi 클라이언트  (0) 2011.04.05
기본 XML Web Services - MSDN  (0) 2011.04.05
JAVA로 SOAP을 구현하려면?  (0) 2011.04.05
Posted by 아로나