|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
public interface SOAPEnvelope
SOAPPart
객체의 SOAPHeader 와 SOAPBody 부분의 컨테이너입니다. 디폴트에서는,SOAPMessage
객체는 SOAPEnvelope
객체를 보관 유지하는 SOAPPart
객체로 작성됩니다. 디폴트의 SOAPEnvelope
객체는, 빈 상태(empty)의 SOAPBody
객체와 빈 상태(empty)의 SOAPHeader
객체를 보유하고 있습니다. SOAPBody
객체는 필수입니다. SOAPHeader
객체는 임의입니다만, 대부분의 경우에 사용되고 있습니다. SOAPHeader
객체가 필요하지 않은 경우, 삭제할 수 있습니다 (후술).
클라이언트는,SOAPEnvelope.getHeader
나 SOAPEnvelope.getBody
메소드를 호출하는 것으로,SOAPHeader
나 SOAPBody
객체에 액세스 할 수 있습니다. 다음의 코드에서는,SOAPMessage
객체의 message 로 SOAPPart
객체의 sp 를 취득한 뒤, 이러한 2 개의 메소드를 사용합니다. sp 는 다음의 SOAPEnvelope
객체의 se 의 취득에 사용합니다.
SOAPPart sp = message.getSOAPPart(); SOAPEnvelope se = sp.getEnvelope(); SOAPHeader sh = se.getHeader(); SOAPBody sb = se.getBody();
SOAPEnvelope
객체의 본체나 헤더는, 현행의 것을 취득하거나 삭제하거나 새로운 것을 추가하거나 하는 것으로 변경할 수 있습니다. javax.xml.soap.Node
의 메소드 deleteNode
는, 불려 간 XML 요소 (노드)를 삭제합니다. 예를 들어, 다음의 코드는,getBody
메소드로 취득한 SOAPBody
객체를 삭제합니다.
se.getBody(). detachNode();
SOAPHeader
객체를 작성해 삭제한 것과 옮겨놓는 경우, 클라이언트는,SOAPEnvelope.addHeader
메소드를 사용합니다. 이 메소드를 사용하면(자), 새로운 헤더를 작성해,SOAPEnvelope
객체에 추가할 수 있습니다. 같이addBody
메소드도 새로운 SOAPBody
객체를 작성해,SOAPEnvelope
객체에 추가합니다. 다음의 코드의 발췌에서는, 현재의 헤더를 취득해 그것을 삭제해, 새로운 것을 추가합니다. 계속되어, 현재의 본체를 취득해 그것을 삭제해, 새로운 것을 추가합니다.
SOAPPart sp = message.getSOAPPart(); SOAPEnvelope se = sp.getEnvelope(); se.getHeader(). detachNode(); SOAPHeader sh = se.addHeader(); se.getBody(). detachNode(); SOAPBody sb = se.addBody();벌써
SOAPBody
객체나 SOAPHeader
객체가 존재하고 있는 경우, 이것들을 추가하면(자) 에러가 됩니다.
SOAPEnvelope
인터페이스는,Name
객체를 작성하는 3 개의 메소드를 제공합니다. 1 개째의 메소드는, 로컬명, 이름 공간 접두사, 이름 공간 URI 를 사용해 Name
객체를 작성합니다. 2 개째의 메소드는, 로컬명과 이름 공간의 접두사를 사용해 Name
를 작성합니다. 3 개째의 메소드는, 로컬명만을 사용해 Name
를 작성합니다. 다음의 코드 (se 는 SOAPEnvelope
객체)에, 3 개(살) 모든 인수를 사용해 새로운 Name
객체를 작성하는 예를 나타냅니다.
Name name = se.createName("GetLastTradePrice", "WOMBAT", "http://www.wombat.org/trader");
필드의 개요 |
---|
메소드의 개요 | |
---|---|
SOAPBody |
addBody ()
SOAPBody 객체를 작성해, 이 SOAPEnvelope 객체의 SOAPBody 객체로서 설정합니다. |
SOAPHeader |
addHeader ()
SOAPHeader 객체를 작성해, 이 SOAPEnvelope 객체의 SOAPHeader 객체로서 설정합니다. |
Name |
createName (String localName)
지정의 로컬명으로 초기화된 Name 객체를 새롭게 작성합니다. |
Name |
createName (String localName,
String prefix,
String uri)
지정의 로컬명, 이름 공간 접두사, 이름 공간 URI 로 초기화된 Name 객체를 새롭게 작성합니다. |
SOAPBody |
getBody ()
이 SOAPEnvelope 객체에 관련한 SOAPBody 객체를 돌려줍니다. |
SOAPHeader |
getHeader ()
이 SOAPEnvelope 객체의 SOAPHeader 객체를 돌려줍니다. |
인터페이스 javax.xml.soap. Node 로부터 상속된 메소드 |
---|
detachNode , getParentElement , getValue , recycleNode , setParentElement , setValue |
인터페이스 org.w3c.dom. Element 로부터 상속된 메소드 |
---|
getAttribute , getAttributeNode , getAttributeNodeNS , getAttributeNS , getElementsByTagName , getElementsByTagNameNS , getSchemaTypeInfo , getTagName , hasAttribute , hasAttributeNS , removeAttribute , removeAttributeNode , removeAttributeNS , setAttribute , setAttributeNode , setAttributeNodeNS , setAttributeNS , setIdAttribute , setIdAttributeNode , setIdAttributeNS |
인터페이스 org.w3c.dom. Node 로부터 상속된 메소드 |
---|
appendChild , cloneNode , compareDocumentPosition , getAttributes , getBaseURI , getChildNodes , getFeature , getFirstChild , getLastChild , getLocalName , getNamespaceURI , getNextSibling , getNodeName , getNodeType , getNodeValue , getOwnerDocument , getParentNode , getPrefix , getPreviousSibling , getTextContent , getUserData , hasAttributes , hasChildNodes , insertBefore , isDefaultNamespace , isEqualNode , isSameNode , isSupported , lookupNamespaceURI , lookupPrefix , normalize , removeChild , replaceChild , setNodeValue , setPrefix , setTextContent , setUserData |
메소드의 상세 |
---|
Name createName(String localName, String prefix, String uri) throws SOAPException
Name
객체를 새롭게 작성합니다.
이 팩토리 메소드는, SOAP/XML 문서로 사용하는 Name
객체를 작성합니다.
localName
- 로컬명을 제공하는 String
prefix
- 이름 공간의 접두사를 제공하는 String
uri
- 이름 공간의 URI 를 제공하는 String
Name
객체
SOAPException
- SOAP 에러가 발생했을 경우Name createName(String localName) throws SOAPException
Name
객체를 새롭게 작성합니다.
이 팩토리 메소드는, SOAP/XML 문서로 사용하는 Name
객체를 작성합니다.
localName
- 로컬명을 제공하는 String
Name
객체
SOAPException
- SOAP 에러가 발생했을 경우SOAPHeader getHeader() throws SOAPException
SOAPEnvelope
객체의 SOAPHeader
객체를 돌려줍니다.
디폴트에서는, 새로운 SOAPMessage
객체의 작성에, 빈 상태(empty)의 SOAPHeader
객체를 보관 유지하는 SOAPEnvelope
객체를 사용합니다. 그 때문에,getHeader
메소드는, 헤더를 삭제해 새로운 것이 추가되지 않았던 경우를 제외해, 항상 SOAPHeader
객체를 돌려줍니다.
SOAPHeader
객체,
존재하지 않는 경우는 null
SOAPException
- SOAPHeader
객체의 취득에
문제가 발생했을 경우
SOAPBody getBody() throws SOAPException
SOAPEnvelope
객체에 관련한 SOAPBody
객체를 돌려줍니다.
디폴트에서는, 새로운 SOAPMessage
객체의 작성에, 빈 상태(empty)의 SOAPBody
객체를 보관 유지하는 SOAPEnvelope
객체를 사용합니다. 그 때문에,getBody
메소드는, 본체를 삭제해 새로운 것이 추가되지 않았던 경우를 제외해, 항상 SOAPBody
객체를 돌려줍니다.
SOAPEnvelope
객체의
SOAPBody
객체,
존재하지 않는 경우는 null
SOAPException
- SOAPBody
객체의 취득에
문제가 발생했을 경우
SOAPHeader addHeader() throws SOAPException
SOAPHeader
객체를 작성해, 이 SOAPEnvelope
객체의 SOAPHeader
객체로서 설정합니다. 포락선에 벌써 헤더가 포함되어 있는 경우, 헤더를 추가할 수 없습니다. 그 때문에, 이 메소드는 기존의 헤더를 삭제하고 나서 호출해 주세요.
SOAPHeader
객체
SOAPException
- 이
SOAPEnvelope
객체가 벌써
유효한SOAPHeader
객체를 보유하고 있는 경우SOAPBody addBody() throws SOAPException
SOAPBody
객체를 작성해, 이 SOAPEnvelope
객체의 SOAPBody
객체로서 설정합니다. 포락선에 벌써 본체가 포함되어 있는 경우, 본체를 추가할 수 없습니다. 그 때문에, 이 메소드는 기존의 본체를 삭제하고 나서 호출해 주세요.
SOAPBody
객체
SOAPException
- 이
SOAPEnvelope
객체가 벌써
유효한 SOAPBody
객체를 보유하고 있는 경우
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.