THE ZEPINT NETWORK

programmer assist

PHP PHP XML Feeds

PHP Questions PHP Solutions PHP Articles

PHP is a popular open-source programming language used primarily for developing server-side applications and dynamic web content, and more recently, other software. The name is a recursive acronym for "PHP: Hypertext Preprocessor".

Request for Login/ Registration Token

DiggBlinkRedditDeliciousTechnorati

question by Nasreen | Moderate

Hi,

I?m working on project where I have two webservices and PHP client.
PHP client has to request for security Token (RegisterToken or LoginToken) from 1 webservice and has to send that token to other webservice to get the service. For security I?m using ws-security (ws-trust). I?m also doing encryption and decryption of php client.
Now the problem I?m having is how can I authenticate with webservice? I have ws-trust code which I will be needed to authenticate but that is in XML and I?m confuse in handling PHP with XML.
I mean I?m not clear how to do authentication using php and webservices.

Could Any one please help in easy steps as I?m newbie in php and xml

Desperate

Nasreen

Post reply Subscriptions

Re: Request for Login/ Registration Token

reply by Srirangan

Nasreen,

Web Services Trust is a massive topic in itself. You will have to do some research. I can point you towards the following: http://specs.xmlsoap.org/ws/2005/02/trust/WS-Trust.pdf

Check out 10.9, that has the code samples you need. If you are using Php 5, the standard Soap Classes/Objects can be used.

Good luck,
Sri

Post reply Subscriptions

Re: Request for Login/ Registration Token

reply by Nasreen

Thanks for that Link. I have already been looking on this document.
The problem is how can I apply all this via PHP or in other words how can I manage XML with PHP because Tokens coding is in XML and I have to implements Tokens before XML encryption and signature.
I have manage to call webservice by PHP using SoapClient()

I?m a newbie in PHP +XML


Thanks for your help

Post reply Subscriptions

Re: Request for Login/ Registration Token

reply by param

Hello Nasreen

one way is to use a xml parsing script in order to manipulate the xml the way you want to do it

Xpath is a good way to go about it ...

you'll need to give me some idea of the XML you have right now ...

Xpath works with both xml document as well as xml string and is fairly easy to use

http://www.builderau.com.au/program/php/soa/Running-XPath-queries-in-PHP/0,339028448,339180263,00.htm

this should give you a fairly good idea on how to use XPath with an XML string.

I have written a simple class to do so myself. Let me know if you would need it.

Post reply Subscriptions

Got a PHP Question?

Just Sign Up and ask the top PHP experts!

Search via Google

User Login

Email Address

Password

PHP Experts

Rank Expert Points
#1 Srirangan 2650
#2 Anurag 600
#3 mastercomputers 100
This a list of the Top PHP experts, how many points do you have?

Leading Experts

Rank Expert Points
#1 frankzzsword 4600
#2 Bejaan 2900
#3 csfreak 1100
#4 Anurag 700
#5 keyvez 700
#6 nnarasimha 600
#7 Nakata 600
#8 martinig 600
#9 mastercomputers 400
#10 Huntress 150
#11 Adkron 150
#12 Yogesh 100
#13 lexxwern 100
#14 Mustan Khan 100
#15 poizn 100
This is a list of overall best performing experts, how many points do you have?