Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP & Web services

Posted on 2009-03-30
1
Medium Priority
?
218 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

886 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