WSO2::WSF::WSClient - Perl interface to consume Web services using WSF/C.


WSO2-WSF-Perl documentation  | view source Contained in the WSO2-WSF-Perl distribution.

Index


NAME

Top

WSO2::WSF::WSClient - Perl interface to consume Web services using WSF/C.

SYNOPSIS

Top

  use WSO2::WSF::WSClient;

  my $client = new WSO2::WSF::WSClient();

  my $client = new WSO2::WSF::WSClient( { WSCLIENT_OPTIONS } );

  my $response = $client->request( { 'payload' => 'your payload in XML' } );

  my $message = new WSO2::WSF::WSMessage( { WSMESSAGE_OPTIONS } );
  my $response = $client->request( $message );

DESCRIPTION

Top

This module provide a simple interface in Perl to WSO2 WSF/C. It's based on Apache Axis2/C project and bundle several other related projects (Sandesha2/C, Rampart/C, Savan ...) in to a single distribution.

You could give options to WSClient contructor when creating a new client or you could construct a WSMessage object and pass it to the request method after creating the client.

WSCLIENT_OPTIONS

Top

wsfc_home

This should hold the absolute path name where you have installed WSF/C. If you don't provide this, WSF/Perl look for an environment variable called WSFC_HOME. If it cannot find the location where WSF/C is installed it'll exit giving an error message.

useSOAP

Valid options, 'TRUE', 'FALSE', '1.1', '1.2'. Default value is 'TRUE'. If this is set SOAP bindings will be used. Otherwise REST style invocation will be used along with the method given by HTTPMethod option. By default SOAP 1.2 message style will be used.

useMTOM

Valid options, 'TRUE', 'FALSE'. Indicates whether the attachments should be sent MTOM optimized or not. If 'TRUE', the attachments will be sent out of the SOAP message, optimized, with MIME headers in place. If 'FALSE', attachments will be sent within the SOAP payload, as base64 binary.

HTTPMethod

Specifies which HTTP method to use. Valid values are 'GET', 'get', 'POST' and 'post'. Defaults to 'POST'.

responseXOP

Controls whether XOP elements in a response with MTOM are resolved into the logically equivalent straight XML infoset or not. If 'TRUE', the member variable "attachments" of the message returned as a result of the calling request method would be set. If 'FALSE', the binary content will be present in the response payload in base64 format.

useWSA

Tell whether to use WS-Addressing. Valid values are 'TRUE', 'FALSE', '1.0' and 'submission'. If 'submission' is specified 'action' must be present.

policy

Should be a WSPolicy object.

securityToken

WSSecurityToken object which contain the security related options.

METHODS

Top

request( { 'payload' => 'payload in XML' } );
request( $message );

This is an instance method. You could either give the payload as an XML string or you could construct a WSMessage object and give that.

SEE ALSO

Top

Look at WSO2::WSF::WSMessage for how to construct a WSMessage object with various message related options.

Mailing list, bug tracker, svn info can be found on the project web site at http://wso2.org/projects/wsf/perl

AUTHOR

Top

WSO2 WSF/Perl Team

COPYRIGHT AND LICENSE

Top


WSO2-WSF-Perl documentation  | view source Contained in the WSO2-WSF-Perl distribution.