Sei sulla pagina 1di 8

0   More    Next Blog» Create Blog   Sign In

PHP Web Services


PHP Web services: SOAP, REST, WS­*, SOA and WOA with PHP.

Popular Downloads: Source Tarball Windows Binary Source ZIP

WSO2 Con for all.


Saturday, September 3, 2011

Subscribe To
Posts

All Comments

Links
WSF/PHP
WSO2 Oxygen Tank
WSO2
WSO2 con is probably the biggest open source IT event happening in Sri Lanka. Apart from the other open source events that
Contributors took place in the past like FOSSSL and Apache Con Asia, WSO2 Con is the only IT conference that brings together industry
leaders from around the world to share their knowledge and experiences in Sri Lanka. 
Chintana Wilamuna
Dimuthu Modeled after Apache Con, WSO2 Con has added tutorial tracks to the conference this year in addition to speaker sessions and
Malinda Kaushalye key notes. Just like it was in last year, some greats in the industry will be delivering keynotes. Also some fantastic sessions have
Kapuruge been lined up to share experiences in building open source middleware and solving integration problems using those software.
Manjula
If you want to dive deep and learn stuff hands on , don’t miss the tutorial tracks. There is nothing like learning from someone
Milinda Lakmal
Pathirage who has actually been there and done it.

Nandika Jayawardana
Add to that the great food that will be served, you are in for an event you will remember.
Samisa Abeysinghe
Supun Find out more about WSo2 Con at http://wso2.com/events/wso2con-2011-colombo/
Kamburugamuve
Thilanga Pitigala  

Blog Archive Posted by Nandika Jayawardana at 10:53 PM 2 comments

▼   2011  (1)


▼   September (1)
WSO2 Con for all.
?xsd option added to WSF/PHP
►   2010  (6)
Friday, December 31, 2010
►   2009  (9)
►   2008  (210) ?xsd is an standard option to serve an xsd file imported within a wsdl. This was a missing feature in WSF/PHP. In WSF/PHP
►   2007  (1) automatic wsdl generation, it does not generate additional xsds which are imported by the wsdl and hence this option would not
Labels be required. However, with wsdl mode, you could have additional xsds imported in the wsdl. Now you can obtain these xsds
with the option ?xsd=xsdfilename.xsd.
.NET (8)
$_SERVER["REMOTE_
ADDR"] (1)
$_SERVER["REMOTE_
HOST"] (1)
1.3.* (3)
1.3.0 (3)
1.3.2 (4)
action (2)
Adoption (1)
advanced types (1)
Amazon (4)
Amazon Web Services
(8)
annotations (1)
anyType (1)
apache (1) Posted by Nandika Jayawardana at 12:22 AM 1 comments
API (7) Labels: WSDL, WSDL mode
Array (2)
array based API (1)
Article (3) How to statically serve a wsdl with WSF/PHP.
article. (1)
article. (1) Thursday, December 30, 2010
Attachments (1)
WSF/PHP has two modes of operations. When using wsdl mode, you will always start with a wsdl and hence, that wsdl will be
attributes (1)
served for ?wsdl request. On the other hand, you can write a service with annotations and the corresponding wsdl will be
authentication (2) generated for you. However, when using the xml-in-out mode with WSMessage object as the input and output parameter for the
axis2.xml (1) operation, its better to be able to serve a wsdl that is saved in the server since auto generated wsdl’s schema might not match the
Axis2/C (1) operation accepted xml.
BAM (1)
base64 (2) Getting this done is quite simple. all you need to do is to set the option “omitProcesswsdl” in WSService operations array to
Best Practices (2) true. 
best practises (1)
Binary (3) $opParams = array("testFunction"=>"WSMESSAGE");
business (1)
CACert (3) $service = new WSService(array(  "wsdl"=>"mystaticwsdl.wsdl",
cacheWSDL (1)         "omitProcesswsdl"=>TRUE,
Caching (1)         "opParams"=>$opParams,
caching wsdl (1)         "operations" => $operations,
        "actions"=>$actions );
Calculator (1)
Calendar (1)
By specifying omitProcesswsdl, you can prevent WSF/PHP from trying to process the operation as a WSDL Mode operation. Also
case study (1)
note that you would need to set your function as of type WSMESSAGE by using opParams. This is a work about which is not
certificate (3)
required for current svn trunk.
clasmap (1)
 
class based API (1)
Class Map (3) Posted by Nandika Jayawardana at 11:15 PM 0 comments
class names (1)
Client (6)
Code first (2) WSO2 Web Services Framework for PHP 2.1.0 Released
Code Generation (3)
Monday, July 5, 2010
compexType (1)
complexContent (1) We are pleased to announce the release of v2.1.0 of  wso2 wsf/php. This release comes after quite some time since the 2.0.0
Consulting (1) release was back in late 2008. Since then a lot of changes have token place in the underlying code base of WSF/PHP. The WS-
Contract first (3) Security handling has been improved and updated and that functionality is now available with this release of WSF/PHP. In
coupling (1) addition to that, this release is built and tested for PHP 5.3. Many users have been querying about a PHP 5.3 compatible release
CRUD (1) for a while and with this release, all the issues users had with installing and running on php 5.3 will be solved.
custom headers (2)
You can download the release from http://wso2.org/downloads/wsf/php.
Data (3)
Data Services (18)
You can find the complete release note here.
Database (4)
databases (1) https://svn.wso2.org/repos/wso2/branches/wsf/php/2.1.0/NEWS
Databse (1)
dataservices (3) Enjoy WSO2 WSF/PHP 2.1.0.
dbs2php (1)
deb (1) Posted by Nandika Jayawardana at 2:12 AM 10 comments
debian (1)
Debugging (2)
Demo (9)
Configure https with WS-Security
Demo Site (6) Friday, May 21, 2010
Dispatching (1)
Using WS-Security Username Token alone with Transport level security, HTTPS, is quite common. By default, Username token
Doc­lit (1)
is used with WS-Security Signature. Lets look at how to configure WS-Security Username Token with WSF/PHP.
Doc­lit bare (1)
Documents (1) Since, by default, WSF/PHP tries to sign the username token credentials, you would need to specify client certificate and the
dreamhost (1) private key for configuring Username Token.
drupal (1)
echo (1) e.g
Encryption (3)
enterprise (1)
$security_options = array("useUsernameToken" => TRUE );
Example (2)
Extension (2) $policy = new WSPolicy(array("security" => $security_options));
facets (1)
faq (1) $security_token = new WSSecurityToken(array("user" => "Raigama", 
fault (1)                                             "password" => "RaigamaPW", 
Fault Reason (1)                                             "passwordType" => "Digest", 
Features (5)                                             "privateKey" => $my_key, 
Feedback (1)                                               "certificate" => $my_cert));
Flickr (3)
FREE (1)
granularity (1) I have copied a code snippet from the username token sample. As you can see, we are only configuring username token by using
guide (8) the option useUsernameToken in the policy configuration. However, for the WSSecurityToken configuration, I have passed
Hello World (2) both the “privateKey” option and “certificate” option. The private key refer to the client’s private key and certificate refer to
How to (1) client’s certificate which contains the public key of the client.  This is because, by default, UsernameToken uses signature to
howto (2) enhance security of username token.

Http (1)
Http (1) Often you would need to use https transport and plaintext username password instead of a signed username token.  You can
Http Basic easily enable this option by specifying a policy file and an empty transportBinding element within it as follows.
Authentication (6)
https (5)
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
IIS (1)
    xmlns:sp="http://docs.oasis­open.org/ws­sx/ws­securitypolicy/200702"> 
install (6)
    <wsp:ExactlyOne> 
installation (2)
        <wsp:All> 
Integration (1)
            <sp:TransportBinding> 
Interoperability (5)                 <wsp:Policy> 
Interoperable (4)                 </wsp:Policy> 
Java (4)             </sp:TransportBinding> 
LAMP (1)             <sp:SignedSupportingTokens> 
libraries (1)                 <wsp:Policy> 
library (1)                     <sp:UsernameToken 
linux (2)                         sp:IncludeToken="http://docs.oasis­open.org/ws­sx/ws­
list (1) securitypolicy/200702/IncludeToken/AlwaysToRecipient"> 
mashup (1)                         <wsp:Policy> 
mashup server (1)                             <sp:WssUsernameToken10 /> 
Mashups (3)                         </wsp:Policy> 
message level security                     </sp:UsernameToken> 
(5)                 </wsp:Policy> 
Messages (1)             </sp:SignedSupportingTokens> 
MIXED (1)         </wsp:All> 
modules (1)     </wsp:ExactlyOne> 
MSSQL (1) </wsp:Policy>

MTOM (7)
News (1)
NuSOAP (3) Now create the WSPolicy object by using the policy file.
online (1)
Open Source (5) $policy = new WSPolicy($policy_string);
openssl (2)
operations (1) In the WSClient options change “to” endpoint from “http” to “https” and specify the “CACert” option.
opParams (1)
Posted by Nandika Jayawardana at 11:09 AM 10 comments
OSCON (1)
Payload (1)
pecl (1) How to configure https for Apache2.2 and consume PHP web services
perfomance test (1)
pgsql (1) over https
Photos (1)
PHP (68) Step 1.
PHP 5.3 (1)
php.ini (1) Create a Certificate Authority, CA.
php2wsdl (2)
phpt (1) openssl genrsa ­des3 ­out ca.key 4096
Plugin (1) openssl req ­new ­x509 ­days 365 ­key ca.key ­out ca.crt
policy (2)
polymorphism (1)
portName (1) Now we have a certificate authority certificate to sign the certificate for the server.
postgresql (1)
Step 2.
Proxy Authentication
(2)
proxyHost (1) Generate a key for the server.
proxyPort (1)
Public Web Servies (2) openssl genrsa ­des3 ­out server.key 4096
relative dir (1)
Release 1.2.1 (4)
Release 1.3.0 (2)
Generate a certificate signing request
release 1.3.1 (1)
replay attack (1)
response time (1) openssl req ­new ­key server.key ­out server.csr

REST (21)
RESTful (4)
restrictinon (1) Optional step : remove the passphrase from the key
RIA (1)
RM (1)
Rename server.key to server.key.bac.
RPC Encoded (1)
RPC­Enc (1) openssl rsa ­in server.key.bac ­out server.key
rpm (1)
Sample (1)
Samples (3)
Step3.
schema (3)
schema types (1)
schema types (1)
Sign the generated key with certificate authority
scratch (1)
screencast (1) openssl x509 ­req ­days 365 ­in server.csr ­CA ca.crt ­CAkey ca.key ­set_serial 01 ­out server.crt
Security (6)
Serialization (1)
serviceName (1)
short note (1) Now we have the necessary keys and certificates to configure Apache2.2 server to enable https
signing (3)
Step4.
simple types (2)
simpleContent (1)
simpleType (1) copy the generated keys, certificates to a directory named keys under the conf directory.
simplexml (1)
SOA (20) Uncomment ssl module and ssl configuration file in httpd.conf.

SOAP (18)
LoadModule ssl_module modules/mod_ssl.so
SOAP 1.1 (1)
SOAP 1.2 (1)
Include conf/extra/httpd­ssl.conf
SOAP Action (1)
SOAP Fault (1)
soap headers (3)
SoapParam (1) Step 5.
SoapVar (1)
configure https in httpd-ssl.conf file located in conf/extra directory. Use the default settings and specify the following Files to
solutions (1)
match your local settings.
sql query (1)
SQLite (1)
steps (1) SLCertificateFile "F:/Apache2.2/conf/keys/server.crt"
Stock Trader (3)
Support (1) SSLCertificateKeyFile "F:/Apache2.2/conf/keys/server.key"

SWA (5)
SSLCACertificateFile "F:/Apache2.2/conf/keys/ca.crt"
TechEd (1)
test­cases (2)
#SSLVerifyClient require
test­suit (1)
The Uniform Server (1) SSLVerifyDepth 1
third party hosting (1)
timestamp (1)
tools (3)
Training (2) SSLVerifyClient and SSLVerifyDepth options would only be required, if you want the client to authenticate to the server using a
certificate and a passphrase.
transport security (2)
traversing (1)
Now you have successfully configured https for your server.
troubleshooting (1)
Tutorial (6) When connecting to the server, you can obtain the servers certificate by using openssl.
ubuntu (3)
union (1) openssl s_client –connect localhost:443 > scert.pem
URL Mapping (1)
usernameToken (4) Now open the scert.pem and remove the unnecessary. Only the content within the -----BEGIN CERTIFICATE----- and -----END
video (1) CERTIFICATE----- needed for the certificate. You certificate would look like
WAMP (2)
WampServer (3) ­­­­­BEGIN CERTIFICATE­­­­­
Web Service
Framework for PHP (3) ­­­­­END CRETIFICATE­­­­­
Web Services (52)
Webinar (1) Step 6.
webservices (5)
Now we can connect to a service deployed in Apache server using https and consume it.
windows (1)
WOA (1)
wordpress (1) $client = new WSClient(array(“to”=>”https://localhost/webservices/service1.php”,
WS­* (1)
WS­Addressing (1)                                                 “CACert”=>”cert.pem”));

WS­Policy (3)
$response = $client->request($input);
WS­Security (10)
WSA­Action (1)
WSAS (3)
WSClient (12) Much more detailed discussion on implementing https alone with Axis2/C is available here.
WSDL (21)
WSDL Generation (7) Posted by Nandika Jayawardana at 10:45 AM 1 comments

WSDL mode (19)
wsdl1.1 (1)
wsdl2.0 (1)
BAM Tool for PHP
wsdl2php (9) Thursday, February 25, 2010
wsf­security policy (1)
Business Activity Monitoring (BAM), open source tool, can be used to monitor PHP Web services as well.
wsf.home (1)

WSF/Perl (2)
WSF/Perl (2) You can use the generic mode of the tool and monitor Web services as well as all PHP deployments in general.
WSF/PHP (75)
WSF/PHP 1.2.2 (1) Here is an article on Business Activity Monitoring ­ An Introduction to learn more about BAM
wsf/php 2.0.0 (5) Posted by Samisa Abeysinghe at 8:18 AM 7 comments
WSF/Python (1) Labels: BAM, SOA, Web Services
WSF/Ruby (1)
WSF/Spring (1)
WSFault (3)
SOA Workshop
WSHeader (1) Monday, October 12, 2009
WSMessage (4)
WSMessasge (1) Here is an opportunity to
WSO WSF/PHP (8) get hands on experience
WSO2 (6) on implementing SOA.
WSO2 Oxygen Tank (3)
WSO2 WSAS (1)  
WSO2 WSF/PHP (11)
WSService (3)  
x509 (2)
 
XAMPP (2)
XML (4)
 
XML in­out (1)
xml schema (4)  
XML Signature (2)
xpath (1)  
xsi:type (1)
Yahoo (2)  
Zend (1)
Zend Core (2)  
Zend Framework (2)
 

You can find more details


here.
http://ww2.wso2.org/~n
andika/soa-
workshop.pdf. and of
course visit
http://wso2.com to
register.

Posted by Nandika Jayawardana at 11:18 AM 0 comments

Common Issue with Certificates created on Windows


Tuesday, September 1, 2009
One of the common issues faced when dealing with certificates for doing SSL communication or WS-Security is that the
certificates created on windows does not work on Linux. This is due to the addition of Windows Specific characters to the
certificate. I have seen so many users struggle to get SSL/HTTPS working due to this problem.

So easiest thing to do, if you want to run a client with HTTPS on Linux with a certificate created on windows, just do a dos2unix
on the certificate.  :)

This should help you save a lot of time.

Posted by Nandika Jayawardana at 10:25 AM 1 comments
Labels: certificate, https

Building WSF/PHP with PHP 5.3.0


Since the release of PHP5.3.0 number of requests were there inquiring the compatibility of WSF/PHP with PHP 5.3.0.  I tried it
out on windows and I only encountered minor issues. These issues are now fixed on the svn trunk. Here is how you can build
WSF/PHP from the svn source to use with PHP 5.3.0.

First download both PHP 5.3.0 source and binary distributions from php.net. You will also need to download the binary tools
such as bison.exe which are required to build the PHP source.
Next you need to run the buildconf.bat contained with the php source in order to build the windows specific headers.

Now you are ready to build wsf/php for php 5.3.0.

Get the svn source of wsf/php from  https://wso2.org/repos/wso2/trunk/wsf/php.

svn co http://wso2.org/repos/wso2/trunk/wsf/php wsfphp

Now cd to wsfphp directory and open the configure.in file and set php configurations as follows.

PHP_SRC_DIR = E:\php\php-5.3.0
PHP_BIN_DIR = E:\php\php-5.3.0-Win32
BINDLIB_DIR = E:\php\bindlib-cvs-vc8

Of course you need to set the other dependencies according to your machine configurations.

Now run the build.bat file. This will build wsf/php binary for php 5.3.0

Posted by Nandika Jayawardana at 10:04 AM 7 comments
Labels: PHP 5.3

Servey: Tools for PHP Web Services?


Saturday, August 22, 2009
This is a servery to find out, what PHP progremmers need the most when it comes to dealing with Web services.

Please feel free to comment on this blog post.

What is your wishlist when it comes to PHP Web servies? What tools are you looking for?

How about something similar to PHP MyAdmin for PHP Web services? Point to the service, and just use it?

What about hosting? Do you have trhoube consuming services from hosted PHP instances?

What about IDE integration? Would you like it to be intergated with, say, Eclipse?

Feel free to let us know.


Posted by Samisa Abeysinghe at 10:35 AM 5 comments
Labels: PHP, tools, Web Services

WSO2 WSF/CPP 2.0.0 Released


Thursday, July 23, 2009
WSO2 WSF/CPP 1.0.0 was released sometime back with the intention of providing a C++ API for C++ developers while
leveraging the capabilities of WSF/C Web Services Stack. It only had the Client API. With this new release,the product has been
significantly enhanced with the addition of a Service API, Code Generation support for C++, and Many WS-Security features.
WSF/C++ can be deployed on both Apache2, and IIS. Also it has the stand alone http server as well. You can download
WSF/C++ from http://wso2.org/downloads/wsf/cpp.

Here is the complete release note.

WSO2 Web Services Framework for C++ (WSO2 WSF/C++) 2.0.0 Released

=================================================================

WSO2 WSF/C++ team is pleased to announce the release of WSO2 WSF/C++ 2.0.0.

You can download this release from: http://wso2.org/downloads/wsf/cpp

WSO2 Web Services Framework for C++ (WSO2 WSF/C++) is a standards compliant, enterprise

grade, open source, C++ library for providing and consuming Web services in C++, based on the popular,

WSO2 WSF/C library.

Project home page:

http://wso2.org/projects/wsf/cpp

-------------
Key Features

=============

1. Client API to consume Web services

      * ServiceClient class with one-way and two-way service invocation support

        for SOAP 1.1, and SOAP 1.2.

      * Options class to facilitate configuring the client for both SOAP and REST options.

2. Service API to provide Web Services

      * ServiceSkeleton class to extend from to implement services.

2. Attachments with MTOM

      * Binary optimized

      * Non-optimized (Base64 binary)

      * Attachment Caching Support

3. WS-Addressing

      * Version 1.0

      * Submission

4. WSPolicy

5. WS-Security

      * Username Token

      * Timestamp Token

      *  Signing

      *  Encryption

      * WS-SecurityPolicy based configuration 

      * Reply detection

      * WS-Trust

      * WS-Secure Conversation  

6. Code generation Tool

      * By providing a wsdl and options, generate client stubs and service skeletons

        in C++ using the code generation tool.

7. SSL enabled transport layer

8. WS-Reliable Messaging

9. Has all the capabilities available from WSF/C library.

--------------------------------

Major Changes Since Last Release

================================

1. Service API which enable implementing services in C++.

2. Code Generation tool for C++.

3. Documentation Improved.

4. WS-Security Additions including


    * WS-Secure Conversation

    * Replay Detection

5. Many bug fixes.

-------------------

Known Issues

-------------------

Dual channel scenarios could cause crash issues.

-------------------

Reporting Problems

===================

Issues can be reported using the public JIRA available at:

https://wso2.org/jira/browse/WSFCPP

----------------------

Contact Us

===========

Please subscribe to our user or developer mailing lists. For details on how

to subscribe please visit: http://wso2.org/mail

We welcome your early feedback on this implementation.

Thank you for your interest in WSO2 WSF/C++.

-- WSO2 WSF/C++ Team --

Posted by Nandika Jayawardana at 10:46 PM 2 comments

Free Live Online Training


Sunday, March 15, 2009
WOS2 is offering a live online training session for WSF/PHP free of charge this week. This is a one time offer. So hurry up and
register now if you are willing to participate.

To register , visit www.wso2.com

Posted by Nandika Jayawardana at 5:33 AM 5 comments

Older Posts

© PHP Web Services | Back to top


Design by Milinda Pathirage

Potrebbero piacerti anche