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

getting an object from SoapClient


Hi there,

I'm new to the SOAP PHP5 extension. It works fine for web service
methods that returns basic types (string,int,...). However, for methods
that return an object of a class I defined, I can't access the object,
though the SOAP response looks correct.

Here the received SOAP message :

Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1=""
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body><SOAP-ENV:getOBjectResponse><return xsi:type="ns1:AUser">
<cn xsi:type="xsd:string">JACQUES LEBASTARD</cn>
<givenname xsi:type="xsd:string">Jacques</givenname>
<sn xsi:type="xsd:string">Lebastard</sn>
<mail xsi:type="xsd:string">ja***************@evidian.co m</mail>
</return></SOAP-ENV:getOBjectResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

The returned object looks as a SoapVar where I was expecting an object
of class 'User' (the 'AUser' given as enc_stype is the ComplexType
defined in the WSDL):

object(SoapVar)#3 (4) {
["enc_type"]=> int(0)
["enc_value"]=> object(stdClass)#2 (4) {
["cn"]=> string(17) "JACQUES LEBASTARD"
["givenname"]=> string(7) "Jacques"
["sn"]=> string(9) "Lebastard"
["mail"]=> string(29) "ja***************@evidian.com"
}
["enc_stype"]=> string(5) "AUser"
["enc_ns"]=> string(0) ""
}

What did I miss in the WSDL or web service definition?
Jun 20 '06 #1
0 1159

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

Similar topics

0
by: peter | last post by:
In run-time,is there any approach to add or revise the members,such as method or attribute ,of a class or object? As for the object of class soapclient30 in MS soap toolkit, after it executes the...
2
by: peter | last post by:
In run-time,is there any approach to add or revise the members,such as method or attribute ,of a class or object? As for the object of class soapclient30 in MS soap toolkit, after it executes the...
1
by: peter | last post by:
In run-time,is there any approach to add or revise the members,such as method or attribute ,of a class or object? As for the object of class soapclient30 in MS soap toolkit, after it executes the...
0
by: jib | last post by:
Hi, I am trying to send an Access database table containing a OLE field through ASP.NET (web services) to a client (being a Word Macro). The table consists of four columns with the first three...
3
by: PaulF | last post by:
Is it possible to use a SoapClient derived class to send a message to a Web Service (eg a .asmx file)? It it is, does anyone have any code they could point me at that actually does this ! ...
0
by: Florian Laws | last post by:
Hello, to work around an interoperability problem with the PHP5 SOAP extension, I'd like to modify the generate XML SOAP request. (as described in...
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? ...
2
by: oh.i.love.spam | last post by:
This is just an example... I don't have the access/ability to upload the actual code. Here is the meat in the XML that is returned from the $client- <VesselConfigurations...
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
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?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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.