Chintana Wilamuna > WSO2-WSF-Perl > WSO2::WSF::WSClient

Download:
WSO2-WSF-Perl-1.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

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

SYNOPSIS ^

  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 ^

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 ^

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 ^

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 ^

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 ^

WSO2 WSF/Perl Team

COPYRIGHT AND LICENSE ^

Copyright (C) 2007 by WSO2

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

syntax highlighting: