View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Chintana Wilamuna > WSO2-WSF-Perl > WSO2::WSF::WSClient



Annotate this POD


New  2
Open  0
View/Report Bugs


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


  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 );


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.



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.


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.


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.


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


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.


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


Should be a WSPolicy object.


WSSecurityToken object which contain the security related options.


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.


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


WSO2 WSF/Perl Team


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

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: