473,387 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

soapclient. need to extract information in php from a webservice that was built in C#

soapclient. need to extract information in php from a webservice that was built in C# asp.net 2.0

I am new to php. Can someone help me with the code below.
I would like to learn how to manipulate the information so if the user would like to display
the contents of start_date on his/her web page. How would I go parsing this.
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="utf-8" ?> 
  2. - <Program xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
  3.   <ClassName>Program</ClassName> 
  4.   <intern_sql_code>I</intern_sql_code> 
  5.   <intern_timestamp>2007-06-08T09:27:03.640625-04:00</intern_timestamp> 
  6.   <intern_creation_date>0001-01-01T00:00:00</intern_creation_date> 
  7.   <program_id>108</program_id> 
  8.   <start_date>2007-05-24T00:00:00</start_date> 
  9.   <end_date>2008-05-24T00:00:00</end_date> 
  10.   <program_name>CIBC Frequent Flyer</program_name> 
  11.   <source_description>Ceci est un test pour le fun</source_description> 
  12.   <comm_id>0</comm_id> 
  13.   </Program>
  14.  
[Please use CODE tags when posting source code. Thanks! --pbmods]

How can I see the variables of the above in the below in php below.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>PHP test page </title>
  4. </head>
  5. <body>
  6. <?php
  7. require_once('lib/nusoap.php');
  8. $client = new soapclient('http://192.168.0.65/aircanada/WebSrvPrg/WebSrvPrg.asmx?wsdl','wsdl');
  9. $client->debug_flag = true;
  10. // Help here. I want to see the values.
  11. //$param = array('Program->ClassName');
  12. //$result = $client->call('ProgramService', array('parameters'=>$param));
  13. //echo "The message is: " . $result['Program'];
  14.  
  15. ?>
Jun 11 '07 #1
1 1760
ak1dnar
1,584 Expert 1GB
[PHP]<?php
require_once('lib/nusoap.php');
$client = new soapclient('http://192.168.0.65/aircanada/WebSrvPrg/WebSrvPrg.asmx?wsdl','wsdl');
$client->debug_flag = true;
$param = array('Program->ClassName');
$result = $client->call('ProgramService', array('parameters'=>$param));

# ProgramService => this is the function of your web service(server)
# parameters => this is the input parameter for the function
# but once you pass this using this way
# $param = array('Program->ClassName');
# value for the $param parameter will be like this
# $param[0] = 'Program->ClassName';
# so you are passing something like this to server
# $result = $client->call('ProgramService', array('parameters'=>'Program->ClassName'));
# if that parameter is correct ( I dont think so) Web service (server) genarate the response
# to the this client and output will assign to $result variable
# you can print it like this
echo "The message is: " . $result;
# but what is this ;
# echo "The message is: " . $result['Program'];

# So,change the input parameter value
# $param = array('Your_Input');

?>[/PHP]
Jun 11 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: brandonkirsch | last post by:
Hey guys, I recently lost hours to the PHP 5.2.1 SoapClient when trying to use a remote webservice. There are two methods I have to use, the first one worked like a charm and the second one has...
11
by: brandonkirsch | last post by:
Hey guys, I've posted a question on here before but I don't think I was very direct about the problem so I'll state it in a new way: How do I send CDATA to a webservice using the PHP SoapClient? ...
0
by: =?Utf-8?B?UHZkYl9CQQ==?= | last post by:
Hi all, I have a problem with accessing a webservice from Access2000 (=VBA). I hope I can place this question in this group. If no, please give me an better place it. So, i'm try to connect...
1
by: Taras_96 | last post by:
Hi everyone, I'm trying to use PHP's built in SoapClient class. It seems really easy to use, but am unsure of how to handle errors upon construction of the SoapClient object. If either the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.