473,387 Members | 1,493 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.

PHP SOAP client and tag attributes

I have a SOAP service returning this to me

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://
www.w3.org/1999/XMLSchema-instance">
<soapenv:Body>
<ns1:exportStationCodesXMLResponse soapenv:encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://uri.not">
<exportStationCodesXMLReturn xsi:type="ns2:Document"
xmlns:ns2="http://xml.apache.org/xml-soap">
<nds>
<data>
<r>
<c v="NERR_Site_ID"/>
<c v="Station_Code"/>
<c v="Station_Name"/>
<c v="Lat_Long"/>
<c v="Latitude"/>
<c v="Longitude"/>
<c v="Status"/>
<c v="Active_Dates"/>
<c v="Params_Reported"/>
</r>
<r>
<c v="ace "/>
<c v="acebbnut "/>
<c v="Big Bay "/>
<c v="32&#xB0; 29' 22.92 N, 80&#xB0; 19' 12.72 W"/>
<c v="32.4897"/>
<c v="80.3202"/>
<c v="Active "/>
<c v="Feb 2002-"/>
<c v="PO4F,NH4F,NO2F,NO3F,NO23F,DIN,CHLA_N"/>.....

I wrote a small php sample call like so:

<?php
$wsdl=new SoapClient('http://cdmo.baruch.sc.edu/webservices/
xmldatarequest.cfc?wsdl', array('trace' =1));
$result = $wsdl->exportStationCodesXML();
var_dump($result);

//echo "RESPONSE:\n" . $wsdl->__getLastResponse() . "\n";

?>

But what I get back are a bunch of arrays of empty strings like so

object(stdClass)#2 (1) { ["nds"]= object(stdClass)#3 (1)
{ ["data"]= object(stdClass)#4 (1) { ["r"]= array(301) { [0]=>
object(stdClass)#5 (1) { ["c"]= array(10) { [0]= string(0)
"" [1]= string(0) "" [2]= string(0) "" [3]= string(0) "" [4]=>
string(0) "" [5]= string(0) "" [6]= string(0) "" [7]= string(0)
"" [8]= string(0) "" [9]= string(0) "" } } [1]=>
object(stdClass)#6 (1) { ["c"]= array(10) { [0]= string(0)
"" [1]= string(0) "" [2]= string(0) "" [3]= string(0) "" [4]=>
string(0) "" [5]= string(0) "" [6]= string(0) "" [7]= string(0)
"" [8]= string(0) "" [9]= string(0) "" } } [2]=>
object(stdClass)#7 (1) { ["c"]= array(10) { [0]= string(0)
"" [1]= string(0) "" [2]= string(0)....

(I dont think you will be able to run my code, as my ip is trusted to
execute the WS only)

My question is I NEED to get to those attributes (the 'v=') and I
would rather not do it by reparsing the response (from
__getLastResponse). What am I missing??!?!?
Aug 3 '08 #1
0 1441

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Glauco | last post by:
I'm trying to use SOAPpy 0.10.1 for a client but is difficult to handle easly Is this library in use or i'm using an OLD death library ? I'm alone in find a lot of problem in a SOAP Client ?...
4
by: Christian Wilhelm | last post by:
Hi! I have a Problem understanding the deserialisation of SOAP-Responses. The "normal" way, calling a XML WebService is to use WSDL 1) Send Request 2) Get SOAP-Response 3) With Informations...
0
by: Kaimar Seljamäe | last post by:
Hi, I have to create a web service client which uses SOAP encoding but does not use "multi-reference" values (see http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383513 item 10). If I...
8
by: Dave A | last post by:
I have a class called 'PrimaryKey' that represents the primary key of a table. PrimaryKeys can only be created and the class only implements .ToString(). The PrimaryKey class internally stores...
16
by: MR | last post by:
my soap messages to a remote site are failing. as far as i can tell the only differences between what my SOAP message looks liek and what they want are in the SOAP envelope SInce they don't have a...
0
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project, it gives me following error: Custom tool error: Unable to import...
0
by: kim123 | last post by:
I got to write a c# client will ask a SOAP::Lite server for a list of data. In the request I have to send the following attributes: string, string, array, string, string The SOAP:Lite server is...
0
by: HolmerJohn | last post by:
When calling a .Net web service from an Axis client on an AS400, the parameters are not being passed correctly. When the proxy is built in C#, the soap envelope below is sent, which works: ...
1
by: klerik123456 | last post by:
I try set soap extension attributes on client side. For example: Implementation in web service: public class EncryptMessageAttribute : SoapExtensionAttribute { private string...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.