Thread: BIP Web Service Integration using PHP


Permlink Replies: 5 - Pages: 1 - Last Post: Mar 31, 2008 6:03 AM Last Post By: ssemrok
davematlock

Posts: 12
Registered: 12/06/07
BIP Web Service Integration using PHP
Posted: Dec 6, 2007 12:46 PM
Click to report abuse...   Click to reply to this thread Reply
I wanted to share this code with the community. I needed a way to integrate a PHP5 application with BIP Enterprise without sending the user to the BIP application. The answer was, of course, web services. Thankfully the BIP folks provided this interface. There is no error handling in the example below.

$wsdl = "http://hostname:8088/xmlpserver/services/ReportService?wsdl";
$client = new SoapClient($wsdl);

$params[] = array('name'=>'v_item', 'value'=>'NIW-TEST1', 'hasMultiValues'=>0);
$params[] = array('name'=>'v_item1', 'value'=>'NIW-TEST2', 'hasMultiValues'=>0);

$report = $client->getReportData('/Guest/Status/Status.xdo',
$params,
'uname', // 'Guest' can be used with a null pwd
'pwd',
'pdf',
'/Guest/Status/Status.rtf');

header('Content-type: application/pdf');
header('Pragma: no-cache');
header('Content-disposition: attachment; filename=Status.pdf');

echo $report;
Tim Dexter

Posts: 2,261
Registered: 01/10/01
Re: BIP Web Service Integration using PHP
Posted: Dec 6, 2007 12:59 PM   in response to: davematlock in response to: davematlock
Click to report abuse...   Click to reply to this thread Reply
Hi Dave
Thanks for the snippet - hope you dont mind, I wanted to get it out to a wider audience on the BIP blog ... would that be OK?
Tim
davematlock

Posts: 12
Registered: 12/06/07
Re: BIP Web Service Integration using PHP
Posted: Dec 6, 2007 1:04 PM   in response to: Tim Dexter in response to: Tim Dexter
Click to report abuse...   Click to reply to this thread Reply
That's funny - I tried to email it to you for inclusion but your Blog's "Email Tim" link doesn't seem to work...
Tim Dexter

Posts: 2,261
Registered: 01/10/01
Re: BIP Web Service Integration using PHP
Posted: Dec 6, 2007 1:34 PM   in response to: davematlock in response to: davematlock
Click to report abuse...   Click to reply to this thread Reply
Thats a feature of our **** blogging software :o)

Will be up on the blog tomorrow.

Thanks

Tim
ssemrok

Posts: 3
Registered: 09/17/07
Re: BIP Web Service Integration using PHP
Posted: Mar 31, 2008 5:46 AM   in response to: davematlock in response to: davematlock
Click to report abuse...   Click to reply to this thread Reply
Very nice tip and almoust the solution for our problem.

Is there any chance to send some additional parameter over the webservice, used in the report? I tried to use the array for more parameter, but the parameter couldn't be used in the report.

If we call the report over url we can put some additional parameters in the url for use in report, like

http:/...:9704...Lieferantensuche.xdo?param1=100&param2=200
ssemrok

Posts: 3
Registered: 09/17/07
Re: BIP Web Service Integration using PHP
Posted: Mar 31, 2008 6:03 AM   in response to: davematlock in response to: davematlock
Click to report abuse...   Click to reply to this thread Reply
OK I understand how it works and it works fine for me.

One parameter is set as array, a second example similar to the top

$params[] = array('name'=>'p_name', 'value'=>'p_value', 'hasMultiValues'=>0);

p_name is the name of the Parameter
p_value is the value for use in report

wonderful, what a day

Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums