I was not able to find same problem,Ihave Issue below.The Target is to show xml attributes values using soap message.PHP code looks like: - $client = new SoapClient("https://domain.com/xml/listener.asmx?WSDL");
-
$Getresults = $client->GetFab(array('Username' => "anyuser", 'Password' => "anypassword", 'code' => "1108324"));
-
print_r($Getresults);
The XML I get from SOAP UI using same request has different structure: - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">GetJobResponse xmlns="http://www....>
-
<GetJobResult>
-
<Number>79593</JobNumber>
-
<Status>INVOICED</JobStatus>
-
<Code>CB0071</ThirdPartyCode>
I get Warning: simplexml_load_ string() expects parameter 1 to be string, object given in.? - <pre class='xdebug-var-dump' dir='ltr'>
-
<b>object</b>(<i>stdClass</i>)[<i>94</i>]
-
<i>public</i> 'JobNumber' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>79593</font>
-
<i>public</i> 'JobStatus' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'INVOICED'</font> <i>(length=8)</i>
-
<i>public</i> 'ThirdPartyCode' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'CB0071'</font> <i>(length=6)</i>
-
<i>public</i> 'CustomerName' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'BECK CRESPEL'</font> <i>(length=12)</i>
-
<i>public</i> 'CustomerName_' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>''</font> <i>(length=0)</i>
-
<i>public</i> 'Reference' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>1169910</font>
-
<i>public</i> 'ContactSeq' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'106798'</font> <i>(length=6)</i>
-
<i>public</i> 'Date' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'2015-04-08T00:00:00'</font> <i>(length=19)</i>
-
<i>public</i> 'DateCompleted' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'0001-01-01T00:00:00'</font> <i>(length=19)</i>
-
<i>public</i> 'Title' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'E : LIVRET D ACCUEIL - WIREO - 70 PAGES (35 FEUILLETS) - 21 X 14.8 CM - Q RV'</font> <i>(length=76)</i>
-
<i>public</i> 'Quantity' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>200</font>
-
<i>public</i> 'Product' <font color='#888a85'>=></font>
Thanks for you help
26 2556 Dormilich 8,658
Recognized Expert Moderator Expert
your soap call does not return you an XML but an already parsed result object. SOAP would be quite pointless if you had to parse the XML each time yourself.
Thanks how can i resolve this issue
Thanks in advance
Dormilich 8,658
Recognized Expert Moderator Expert
just use the object you get. it holds the same information as the XML.
i don't know how can i do with simple xml i do that - $xml=simple_load_string($GetJobresult);
i have this warning simple_load_str ing() expects parameter 1 to be string ,object given
Thanks for you help
Dormilich 8,658
Recognized Expert Moderator Expert
scrap that line, you don’t need it.
so please can you tell by code what i put because i need parse with simple xml
Thanks in advance
Dormilich 8,658
Recognized Expert Moderator Expert
i need parse with simple xml
no you don’t.
i am not understand please can you tell me what can i do so if possible by code script
Thanks in advance
Dormilich 8,658
Recognized Expert Moderator Expert
here’s the code: - $Getresults = $client->GetFab(array('Username' => "anyuser", 'Password' => "anypassword", 'code' => "1108324"));
-
-
$JobNumber = $Getresults->JobNumber;
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Charles Law |
last post by:
Does anyone have a regex pattern to parse HTML from a stream?
I have a well structured file, where each line is of the form
<sometag someattribute='attr'>text</sometag>
for example
<SPAN CLASS='myclass'>A bit of text</SPAN>, or
Just some text, without tags
|
by: Chris Bower |
last post by:
Reposted from aspnet.buildingcontrols:
Ok, I've got a bunch of derived controls that all have a property Rights of
type Rights (Rights is an Enumerator). I wrote a custom TypeConverter so
that I can use comma separated values in design-time. The TypeConverter
works great in design-time. It converts to and from just fine... However,
when I try to load any page in the site now I get the following error
(Following the error is code for the...
|
by: gs |
last post by:
let say I have to deal with various date format and I am give format string
from one of the following
dd/mm/yyyy
mm/dd/yyyy
dd/mmm/yyyy
mmm/dd/yyyy
dd/mm/yy
mm/dd/yy
dd/mmm/yy
mmm/dd/yy
|
by: Buddy Home |
last post by:
Hello,
I'm trying to upload a file programatically and occasionally I get the
following error message.
Unable to write data to the transport connection: An established connection
was aborted by the software in your host machine.
Stack Trace
at System.Net.Sockets.NetworkStream.Write(Byte buffer, Int32 offset, Int32
|
by: Buddy Home |
last post by:
Hello,
I'm trying to upload a file programatically and occasionally I get the
following error message.
Unable to write data to the transport connection: An established connection
was aborted by the software in your host machine.
Stack Trace
at System.Net.Sockets.NetworkStream.Write(Byte buffer, Int32 offset, Int32
| |
by: sandeepsangshetty |
last post by:
Hi Friends,
I'm unable find check box control in my webpage.
When building the page I'm getting "checkbox null" and "false".
Can any help me to find the solution.
I'm pasting the code here.
-------------------------------------------------------------------------------
_BigCart.ascx
|
by: JJMcClaw |
last post by:
Hi All,
Wonder if anyone can shed any light on this error I am getting.
I have the following error when trying to access my site:
"Parse error: syntax error, unexpected '(', expecting T_STRING in /dev/lookatme/_config/config.php on line 145"
I've looked at the code again but I can't figure out what is wrong... Here is the code.
|
by: J4Nch |
last post by:
Hi,
I've two network cards(ethernet). They have their own sub-network.
I've to do some discovery on those subnetwork. This discovery will be made with a c# implementation of DNS-SD(Bonjour).
I've currently an issue with socket/UdpClient of c#: If I bind the socket or udpClient on IPAddress.Any, I receive only messages coming from one network card.
Here is a small example of what I tried:
|
by: oll3i |
last post by:
I am trying to run hello world app
but i get an error
Error: Unable to parse SDK content
Please help
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |