If there are no objections, I'll start work on it. Regards,
Kieran On 3/4/07, Kieran James <[EMAIL PROTECTED]> wrote: > > Rob, > > Thanks for your input! > I've only had brief exposure to PHP's SOAP (I'm from the Java camp) and I > didn't find the documentation very clear (and for that matter, the book I > bought on "Pro PHP XML and Web Services" doesn't cover Headers except from > the consumers point of view). I'm amazed at the simplicity of it. > > > Everyone, > > My manager has approved me to work on SCA - specifically the > implementation of header support. > > I suggest we work on the semantics of how this should work. > > I think we should have an annotation above the class that defines which > function is going to process the header from the client, and annotations > above that function which defines the datatypes and such, for example: > > /** > * @service > * @binding.ws > * @header authinfo > */ > class service { > > /** > * @param username $username http://accounts/Account > * @return status http://accounts/Account > */ > function authinfo($username) { > > } > > } > > If you have any thoughts, please let me know as I'd like to start work on > this as soon as possible. > > Regards, > > Kieran > > On 3/2/07, Rob <[EMAIL PROTECTED]> wrote: > > > > > > On 1 Mar, 21:31, "Kieran James" <[EMAIL PROTECTED]> wrote: > > > I've only had a small amount of time to review the PHP SOAP extension. > > To > > > summarize from my brief exposure to it, I think that SoapHeader > > consumption > > > on the server side wouldn't be difficult to implement. I am still > > > investigating this, though time is scarce for me. > > > > > > If I've not been clear enough on anything, please let me know. > > > > I am not sure if I'm missing something or not, but a SoapServer does > > process the headers as long as they are defined in the WSDL. > > It also will fault if header set to mustUnderstand and the function > > not implemented or not defined in WSDL. > > The only times the raw XML needs to be processed to access the headers > > is in the case of it not defined. > > > > <?php > > $xmlinput = <<<EOXML > > <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/ > > envelope/" xmlns:ns1="urn::robTest"> > > <SOAP-ENV:Header> > > <ns1:AuthenticationInfo> > > <username>MYLOGINID</username> > > <password>MYPASSWORD</password> > > </ns1:AuthenticationInfo> > > </SOAP-ENV:Header> > > <SOAP-ENV:Body> > > <ns1:GetTestList>false</ns1:GetTestList> > > </SOAP-ENV:Body> > > </SOAP-ENV:Envelope> > > EOXML; > > > > function AuthenticationInfo($authinfo) > > { > > if ($authinfo->username != "MYLOGINID") { > > return new SoapFault("F998", "Invalid USername"); > > } else if ($authinfo->password != "MYPASSWORD") { > > return new SoapFault("F999", "Invalid Password"); > > } > > /* Return value here would be used to add header to response */ > > } > > > > function GetTestList($getAll) { > > return $getAll; > > } > > > > $server = new SoapServer(' > > http://www.cdatazone.org/files/rob.WSDL'<http://www.cdatazone.org/files/rob.WSDL%27> > > ); > > $server->addFunction("GetTestList"); > > $server->addFunction("AuthenticationInfo"); > > $server->handle($xmlinput); > > ?> > > > > Rob > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "phpsoa" group. To post to this group, send email to phpsoa@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en -~----------~----~----~----~------~----~------~--~---