Solved

PHP & Web services

Posted on 2009-03-30
1
210 Views
Last Modified: 2012-05-06
Hi,

I'm trying to connect to server using some PHP and nusoap.

The link I'm trying to connect to is

https://demows.portal.com/supplier/documents.asmx

One function is DownloadDocumentList

...and there are a number of paramaters  i.e.

DocumentType(string): "ORD" or "INV"
StartDateTime(string):  e.g. "YYYY-MM-DD"
NewDocumentsOnly(integer): 1 or 0

My code so far is below is: (see code section)

I'm new to web services so would this be in the correct...or are there any glaring errors?

Thanks,

P.S.
If I use a proxy server would I need to specify this anywhere?

P.P.S
I have nusoap.php etc and tested using it locally on my web server ok.

<?php
require_once('lib/nusoap.php'); 
$wsdl="https://demows.portal.com/supplier/documents.asmx?wsdl";
$client=new soapclient($wsdl, true);
$param=array('DocumentType'=>'ORD', 'StartDateTime'=>'2006-01-25', 'NewDocumentsOnly'=>'0');
 
echo $client->call('DownloadDocumentList', $param);
 
?>

Open in new window

0
Comment
Question by:thegunner
1 Comment
 

Accepted Solution

by:
thegunner earned 0 total points
ID: 24019970
Also....my calling app must pass through a client certificate when calling the web services.
This is already installed on my web server, do I need to pass details of this through in my code and if so how?

If I connect to the web services server .asmx page (thorugh the browser) it asks me about this and I click ok etc etc...and finally comes up with wsdl page....how can I send this through in the code if required?

Thanks,
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now