PHP talking to SAP - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

PHP talking to SAP

Description:

consuming web services in PHP. feedback (technical, documentation, missing functionality) ... Consume result types directly, no declaration. This is all the ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 11
Provided by: janmllerma
Category:
Tags: php | sap | consuming | talking

less

Transcript and Presenter's Notes

Title: PHP talking to SAP


1
PHP talking to SAP
  • Martin Probst

2
PHP / Outline
  • demo of leave request
  • desktop integration via Atom iCalendar
  • consuming web services in PHP
  • feedback (technical, documentation, missing
    functionality)

3
demo
4
PHP / consuming web services /iCalendar Atom
  • Web interfaces are location independent,
    lightweight etc.
  • But users prefer rich clients sometimes
  • Better interface
  • Integrate with other tools
  • Aggregate data from many sources
  • Support open iCalendar and Atom formats
  • easy to produce and consume
  • wide range of applications
  • open standards (RFCs)
  • Implementation read only, but not necessarily
    (WebCAL, APP)

5
PHP / consuming web services /the basic code
  • No real type system
  • Create SOAP client, dynamic methods on it added
  • Everything done at run time, but cached

wsdl 'http//www.sap.com/.../ECC_EMPLEAVEREQBYI
DQR.wsdl' soapclient new SoapClient(wsdl) m
essage array ( 'EmployeeLeaveRequestSelectionBy
ID' gt array ( 'EmployeeLeaveRequestID' gt
ID ) ) response soapclient-gt EmployeeLeaveR
equestByIDQueryResponse_In(message)
6
PHP / consuming web services /dynamic types
  • PHP has a dynamic (or no?) type system
  • Classes are constructed from WSDL/Schema on the
    fly
  • Can supply user implemented classes
  • Use hash maps/arrays to construct messages
  • Consume result types directly, no declaration
  • This is all the code necessary to query services
  • minimal LOC, but no static type check

leaverequest response-gtEmployeeLeaveRequest e
cho leaverequest-gtLifeCycleStatusCode,
leaverequest-gtStartDate
7
PHP / consuming web services /problems
  • Automatic type conversion error proneis it a
    number, a string, a bird?
  • Unstable language
  • 5.1 ? 5.2 _toString semantics change, Datetime
    class added
  • backwards incompatible changes, break code
  • Object oriented system strange at best
  • Field visibility not enforced
  • Types sometimes case insensitive

8
PHP / consuming web services /soap issues
  • SOAP API added in PHP5
  • Hash map syntax for messages? no support for
    namespaces in messages
  • Serialization into XML overly liberal
  • fails to detect many bugs
  • easy to send non-WSDL-conforming messages
  • Fehler bei der Konvertierung XML gt ABAP (
    FehlerId ( ) )

message array ( 'EmployeeLeaveRequestSelection
ByID' gt array ( 'EmployeeLeaveRequestID' gt
ID ) )
9
PHP / consuming web services /soap issues
  • Arrays weird - if its only one element, its not
    an array? need special case code everywhere
  • Difficult to manage types in non typed system
  • EmployeeLeaveRequest type different in services
  • PHP has no way to handle this
  • Create messages as hashmaps for each request

elr res-gtEmployeeLeaveRequest if
(is_array(elr)) elr array (elr)
10
conclusion
  • PHP
  • small server footprint
  • low complexity (2000 LOC, zipped 60KB)
  • quick development cycle
  • bad programming language
  • rather go for Ruby / Python
  • Services
  • see other feedback
  • last modified for service would be nice
Write a Comment
User Comments (0)
About PowerShow.com