Adobe® Flash® Platform용 ActionScript® 3.0 참조 설명서
 |  패키지 및 클래스 목록 숨기기 |  패키지  |  클래스  |  새로운 내용  |  색인  |  부록  |  영어로 표시되는 이유
필터: 서버에서 데이터를 검색하는 중...
서버에서 데이터를 검색하는 중...
mx.rpc.soap.mxml 

WebService  - AS3 Flex

패키지mx.rpc.soap.mxml
클래스public dynamic class WebService
상속WebService Inheritance WebService Inheritance AbstractWebService Inheritance AbstractService Inheritance Proxy
구현 IMXMLSupport, IMXMLObject

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

The <mx:WebService> tag gives you access to the operations of SOAP-compliant web services.

MXML 구문expandedMXML 구문 숨기기

The <mx:WebService> tag accepts the following tag attributes:

 <mx:WebService
   Properties
   concurrency="multiple|single|last"
   destination="No default."
   id="No default."
   serviceName="No default."
   showBusyCursor="false|true"
   makeObjectsBindable="false|true"
   useProxy="false|true"
   wsdl="No default."
 
   Events
   fault="No default."
   result="No default."
 />
 

An <mx:WebService> tag can have multiple <mx:operation> tags, which have the following tag attributes:

 <mx:operation
   Properties
   concurrency="multiple|single|last"
   name=No default, required.
   resultFormat="object|xml|e4x"
   makeObjectsBindable="false|true"
 
   
   Events
   fault=No default.
   result=No default.
 />
 
An <mx:Operation> tag contains an <mx:request> tag. To specify an XML structure in an <mx:request> tag, you must set the value of the tag's format attribute to "xml". Otherwise, the body is converted into Objects.

예제 보기



공용 속성
 속성정의 주체
 InheritedchannelSet : ChannelSet
Provides access to the ChannelSet used by the service.
AbstractService
  concurrency : String
Value that indicates how to handle multiple calls to the same service.
WebService
 InheritedconvertParametersHandler : Function
An optional function, primarily intended for framework developers who need to install a function to get called with the parameters passed to each webservice operation invocation.
AbstractWebService
 InheritedconvertResultHandler : Function
An optional function, primarily intended for framework developers who need to install a hook to process the results of an operation before notifying the result handlers.
AbstractWebService
 Inheriteddescription : String
The description of the service for the currently active port.
AbstractWebService
 Inheriteddestination : String
[재정의] The destination of the service.
AbstractWebService
 InheritedendpointURI : String
The location of the WebService.
AbstractWebService
 Inheritedheaders : Array
[읽기 전용] Returns the array of SOAPHeaders registered for the WebService.
AbstractWebService
 InheritedhttpHeaders : Object
Custom HTTP headers to be sent to the SOAP endpoint.
AbstractWebService
 InheritedmakeObjectsBindable : Boolean
When this value is true, anonymous objects returned are forced to bindable objects.
AbstractWebService
 Inheritedmanagers : Array
The managers property stores a list of data managers which modify the behavior of this service.
AbstractService
 Inheritedoperations : Object
The Operations array is usually only set by the MXML compiler if you create a service using an MXML tag.
AbstractService
 Inheritedport : String
Specifies the port within the WSDL document that this WebService should use.
AbstractWebService
  protocol : String
사용되지 않음: 사용 channelSet
[쓰기 전용] Deprecated, use the appropriate destination instead, or if using a url, use DefaultHTTP or DefaultHTTPS.
WebService
 Inheritedready : Boolean
[읽기 전용] Specifies whether the WebService is ready to make requests.
AbstractWebService
 InheritedrequestTimeout : int
Provides access to the request timeout in seconds for sent messages.
AbstractService
 InheritedrootURL : String
The URL that the WebService should use when computing relative URLs.
AbstractWebService
 Inheritedservice : String
Specifies the service within the WSDL document that this WebService should use.
AbstractWebService
  serviceName : String
사용되지 않음: 사용 destination
WebService
  showBusyCursor : Boolean
If true, a busy cursor is displayed while a service is executing.
WebService
 InheriteduseProxy : Boolean
Specifies whether to use the Flex proxy service.
AbstractWebService
 Inheritedwsdl : String
The location of the WSDL document for this WebService.
WebService
 InheritedxmlSpecialCharsFilter : Function
Custom function to be used to escape XML special characters before encoding any simple content.
AbstractWebService
공용 메서드
 메서드정의 주체
  
WebService(destination:String = null)
Creates a new WebService component.
WebService
 Inherited
Adds a header that will be applied to all operations of this web service.
AbstractWebService
 Inherited
addSimpleHeader(qnameLocal:String, qnameNamespace:String, headerName:String, headerValue:String):void
Add a header that will be applied to all operations of this WebService.
AbstractWebService
 Inherited
Returns a Boolean value that indicates whether the WebService is ready to load a WSDL (does it have a valid destination or wsdl specified).
WebService
 Inherited
Clears the headers that applied to all operations.
AbstractWebService
 Inherited
Disconnects the service's network connection and removes any pending request responders.
AbstractService
 Inherited
getHeader(qname:QName, headerName:String = null):SOAPHeader
Returns a header if a match is found based on QName, localName, and URI.
AbstractWebService
  
[재정의] Returns an Operation of the given name.
WebService
 Inherited
Called to initialize the service.
AbstractService
  
Called automatically by the MXML compiler if the WebService is setup using a tag.
WebService
 Inherited
loadWSDL(uri:String = null):void
Instructs the WebService to download the WSDL document.
WebService
 Inherited
Logs the user out of the destination.
AbstractService
 Inherited
removeHeader(qname:QName, headerName:String = null):void
Removes the header with the given QName from all operations.
AbstractWebService
 Inherited
setCredentials(username:String, password:String, charset:String = null):void
Sets the credentials for the destination accessed by the service when using Data Services on the server side.
AbstractService
 Inherited
setRemoteCredentials(remoteUsername:String, remotePassword:String, charset:String = null):void
[재정의] The username and password to authenticate a user when accessing the webservice.
AbstractWebService
 Inherited
Represents an instance of WebService as a String, describing important properties such as the destination id and the set of channels assigned.
WebService
보호 메서드
 메서드정의 주체
 Inherited
Initializes a new Operation.
WebService
이벤트
 이벤트 요약 정의 주체
 InheritedThe fault event is dispatched when a service call fails and isn't handled by the Operation itself.AbstractService
 InheritedThe invoke event is dispatched when a service Operation is invoked so long as an Error is not thrown before the Channel attempts to send the message.AbstractService
 InheritedThe LoadEvent.LOAD is dispatched when the WSDL document has loaded successfully.WebService
 InheritedThe result event is dispatched when a service call successfully returns and isn't handled by the Operation itself.AbstractService
속성 세부 정보

concurrency

속성
concurrency:String

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

Value that indicates how to handle multiple calls to the same service. The default value is multiple. The following values are permitted:

  • multiple - Existing requests are not cancelled, and the developer is responsible for ensuring the consistency of returned data by carefully managing the event stream. This is the default.
  • single - Making only one request at a time is allowed on the method; additional requests made while a request is outstanding are immediately faulted on the client and are not sent to the server.
  • last - Making a request causes the client to ignore a result or fault for any current outstanding request. Only the result or fault for the most recent request will be dispatched on the client. This may simplify event handling in the client application, but care should be taken to only use this mode when results or faults for requests may be safely ignored.



구현
    public function get concurrency():String
    public function set concurrency(value:String):void

protocol

속성 
protocol:String  [쓰기 전용]
사용되지 않음: 사용 channelSet

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

Deprecated, use the appropriate destination instead, or if using a url, use DefaultHTTP or DefaultHTTPS. The deprecated behavior will simply update the destination if the default is being used.



구현
    public function set protocol(value:String):void

serviceName

속성 
serviceName:String
사용되지 않음: 사용 destination



구현
    public function get serviceName():String
    public function set serviceName(value:String):void

showBusyCursor

속성 
showBusyCursor:Boolean

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

If true, a busy cursor is displayed while a service is executing. The default value is false.



구현
    public function get showBusyCursor():Boolean
    public function set showBusyCursor(value:Boolean):void
생성자 세부 정보

WebService

()생성자
public function WebService(destination:String = null)

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

Creates a new WebService component.

매개 변수
destination:String (default = null) — The destination of the WebService, which should match a destination name in the services-config.xml file. If unspecified, the WebService component uses the DefaultHTTP destination.
메서드 세부 정보

getOperation

()메서드
override public function getOperation(name:String):AbstractOperation

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

Returns an Operation of the given name. If the Operation wasn't created beforehand, a new mx.rpc.soap.mxml.Operation is created during this call. Operations are usually accessible by simply naming them after the service variable (myService.someOperation), but if your Operation name happens to match a defined method on the service (like setCredentials), you can use this method to get the Operation instead.

매개 변수

name:String — Name of the Operation.

반환값
AbstractOperation — Operation that executes for this name.

initialized

()메서드 
public function initialized(document:Object, id:String):void

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

Called automatically by the MXML compiler if the WebService is setup using a tag. If you create the WebService through ActionScript you may want to call this method yourself as it is useful for validating any arguments.

매개 변수

document:Object — the MXML document on which this WebService lives
 
id:String — the id of this WebService within the document

WebServiceExample.mxml
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the WebService tag. -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
     xmlns:s="library://ns.adobe.com/flex/spark" 
     xmlns:mx="library://ns.adobe.com/flex/mx">

    <!--  Make sure the Flex Data Services proxy-config.xml file contains 
          the following definition: 

        <destination id="DefaultHTTP">
            <properties>
                <dynamic-url>http://ws.invesbot.com</dynamic-url>
            </properties>
        </destination>
    -->

    <fx:Script>
        <![CDATA[
            import mx.controls.Alert;        
        ]]>    
    </fx:Script>

    <fx:Declarations>
        <mx:WebService id="WS" wsdl="http://ws.invesbot.com/stockquotes.asmx?WSDL"
            useProxy="true"
            fault="Alert.show(event.fault.faultString), 'Error'">
            <mx:operation name="GetQuote" resultFormat="object">
                <mx:request>
                    <symbol>{stockSymbol.text}</symbol>
                </mx:request>
            </mx:operation>
        </mx:WebService>
    </fx:Declarations>

    <mx:Panel title="WebService Example" height="75%" width="75%" 
        paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
    
        <mx:Label width="100%"  color="blue"
            text="Enter a stock symbol to obtain a quote."/>
    
        <mx:TextInput id="stockSymbol" text="ADBE"/>
        <mx:Button label="Get Quote" click="WS.GetQuote.send()"/>
    
        <mx:Text htmlText="Company: {WS.GetQuote.lastResult.GetQuoteResult.StockQuote.Company}"/>
        <mx:Text htmlText="Current price: ${WS.GetQuote.lastResult.GetQuoteResult.StockQuote.Price}"/>
    </mx:Panel>    
</s:Application>




[ X ]영어로 표시되는 이유
ActionScript 3.0 참조 설명서의 내용이 영어로 나타납니다.

ActionScript 3.0 참조 설명서 중 일부는 전체 언어로 번역되지 않았습니다. 언어 요소가 번역되지 않은 경우 영어로 나타납니다. 예를 들어 ga.controls.HelpBox 클래스는 어떤 언어로도 번역되지 않았습니다. 그러므로 한국어 버전의 참조 설명서에서 ga.controls.HelpBox 클래스는 영어로 나타납니다.