![]() ![]() ![]()
|
BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1 |

SFXSOAPServiceProxy is the class for accessing the Web service using the WSDL document.
![]() |
About Web Services Description Language ( WSDL ) |
|---|---|
W3C WSDL 1.1 : Web Services Description Language ( WSDL ) 1.1 ( WSDL 1.1 is supported) | |
Example 489. The method to call the web service using the SFXSOAPServiceProxy class for WSDL
SFXSOAPServiceProxy _wsdl; // variable for creating proxy and performing dynamic binding using the WSDL document // set callback function to be notified of having received result from web server _wsdl.SetNotifyHandler(OnResultSHP, this); // set WSDL document if (_wsdl.SetWSDLDocument("weatherbycity2.xml") == SFERR_NO_ERROR) { // set name of web service _wsdl.SetServiveName("WeatherByCity"); // set port name of web service _wsdl.SetPortName("WeatherByCitySoap"); // set method name of web service _wsdl.SetMethodName("GetWeatherByCity"); // set values to parameters of web service // set user properties for web service _wsdl.SetParameterValue("UserID", SFXBuffer(SFXAnsiString("sophia@s-cradle.com"))); _wsdl.SetParameterValue("Password", SFXBuffer(SFXAnsiString("*******"))); // set parameters for web service _wsdl.SetParameterValue("CityName", SFXBuffer(SFXAnsiString("Washington"))); _wsdl.SetParameterValue("StateAbbreviationORCountryName", SFXBuffer(SFXAnsiString("PA"))); // call web service _wsdl.Invoke(); }
| Constructor/Destructor |
|---|
|
SFXSOAPServiceProxy( Void ) Constructor of SFXSOAPServiceProxy class.
|
|
SFXSOAPServiceProxy(
SFXAnsiStringConstRef wsdl
) Constructor of SFXSOAPServiceProxy class.
|
|
SFXSOAPServiceProxy(
SFXAnsiStringConstRef wsdl
, SFXAnsiStringConstRef service
, SFXAnsiStringConstRef port
, SFXAnsiStringConstRef method
) Constructor of SFXSOAPServiceProxy class.
|
|
~SFXSOAPServiceProxy( Void ) Desctructor of SFXSOAPServiceProxy.
|
| Public Functions | |
|---|---|
| Void |
Cancel( Void ) Cancel the SOAP communication.
|
| ACharConstPtr |
GetMethodName( Void ) Get the method name of the web service.
|
| ACharConstPtr |
GetPortName( Void ) Get the port name of the web service.
|
| const SFXSOAPRPC::LPPARAMETER |
GetResultValueByName(
SFXAnsiStringConstRef name
) Get the return value of a specified parameter.
|
| ACharConstPtr |
GetServiceName( Void ) Get the name of the web service.
|
| UInt32 |
GetTrustMode( Void ) Get the SSL trust mode
|
| SFCError |
Invoke( Void ) Call the method of the web service.
|
| Bool |
IsConnecting( Void ) Check whether or not to be connected to the server.
|
| Void |
Reset( Void ) Reset all the internal variables.
|
| SFCError |
SetMethodAttribute(
SFXAnsiStringConstRef name
, SFXAnsiStringConstRef value
) Set the attribute to the method of the web service.
|
| Void |
SetMethodName(
SFXAnsiStringConstRef method
) Set the method name of the web service .
|
| Void |
SetNotifyHandler(
SFXSOAPRPC::NotifySPP spp
, VoidPtr reference
) Set the callback function to be notified of the return value.
|
| SFCError |
SetParameterValue(
SFXAnsiStringConstRef name
, SFXBufferConstRef value
, SFXPropertyConstRef attribute = SFXProperty::EmptyInstance()
) Set the content of the parameter and its attributes.
|
| Void |
SetPortName(
SFXAnsiStringConstRef port
) Set the port name of the web service.
|
| Void |
SetServiceName(
SFXAnsiStringConstRef service
) Set the name of the web service.
|
| Void |
SetTrustMode(
UInt32 param
) Set the SSL trust mode.
|
| SFCError |
SetWSDLDocument(
SFXAnsiStringConstRef wsdl
) SetWSDLDocument( SFXPathConstRef wsdl ) Set the WSDL document.
|
[ public, explicit ] SFXSOAPServiceProxy(Void);
[ public, explicit ]
SFXSOAPServiceProxy(
SFXAnsiStringConstRef wsdl
);
[ public, explicit ]
SFXSOAPServiceProxy(
SFXAnsiStringConstRef wsdl // name of the WSDL document
SFXAnsiStringConstRef service // name of web service
SFXAnsiStringConstRef port // port name
SFXAnsiStringConstRef method // method name
);
[ public ] ~SFXSOAPServiceProxy(Void);
[ public ] Void Cancel(Void);
[ public, const ] ACharConstPtr GetMethodName(Void);
[ public, const ] ACharConstPtr GetPortName(Void);
[ public, const ]
const SFXSOAPRPC::LPPARAMETER GetResultValueByName(
SFXAnsiStringConstRef name // name of parameter
);[ public, const ] ACharConstPtr GetServiceName(Void);
[ public, const ] UInt32 GetTrustMode(Void);
The SSL trust mode can be one of the following values.
![]() |
Note |
|---|---|
| Detailed information: ISSL_NegotiateV in the BREW API Reference | |
[ public ] SFCError Invoke(Void);
The errors on the WSDL document is as follows:
Detailed Information: SFCErrorEnum
[ public, const ] Bool IsConnecting(Void);
[ public ] Void Reset(Void);
[ public ] SFCError SetMethodAttribute( SFXAnsiStringConstRef name // name of attribute SFXAnsiStringConstRef value // value of attribute );
[ public ] Void SetMethodName( SFXAnsiStringConstRef method // method name );
[ public ] Void SetNotifyHandler( SFXSOAPRPC::NotifySPP spp // callback function VoidPtr reference // data passed to callback function );
[ public ] SFCError SetParameterValue( SFXAnsiStringConstRef name // name of parameter SFXBufferConstRef value // value of parameter SFXPropertyConstRef attribute = SFXProperty::EmptyInstance() // attributes(pairs of an attribute name and its value) );
[ public ] Void SetPortName( SFXAnsiStringConstRef port // port name );
[ public ] Void SetServiceName( SFXAnsiStringConstRef service // name of the web service );
One of the following values are available for the SSL trust mode:
![]() |
Note |
|---|---|
| Detailed information: ISSL_NegotiateV in the BREW API Reference | |
[ public ] SFCError SetWSDLDocument( SFXAnsiStringConstRef wsdl // WSDL document );
[ public ] SFCError SetWSDLDocument( SFXPathConstRef wsdl // file path );
The error codes that may occur when parsing a SOAP document are as follows.
Detailed Information: SFCErrorEnum
|
Copyright (C) 2002 - 2009 Sophia Cradle, Inc. All Rights Reserved. |
![]() ![]() ![]()
|