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 2537 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_string() 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;
-
for example i have that also on $Getresults - object(stdClass)[101]
-
public 'any' => string '<GROUPS xmlns=""><GROUP seq="342"><FIN seq="422"><VAL>1</VAL><ATT seq="732"><LINE>0</LINE><VAL/></ATT><ATT seq="726"><VAL>200</VAL></ATT><ATT seq="426"><VAL>35</VAL></ATT><ATT seq="423"><LINE>0</LINE><VAL>1</VAL></ATT><ATT seq="733"><LINE>0</LINE><VAL/></ATT><ATT seq="727"><VAL>0</VAL></ATT><ATT seq="731"><VAL>0</VAL></ATT><ATT seq="728"><LINE>0</LINE><VAL>3</VAL></ATT><ATT seq="2534"><LINE>0</LINE><VAL/></ATT><ATT seq="8967"><LINE>1</LINE><VAL>1</VAL></ATT><TEXT>Reliure wire'o 200 exemplaires de 35 feuil'... (length=6349)
-
public 'Components' =>
-
object(stdClass)[105]
-
public 'Component' =>
-
array (size=3)
-
0 =>
-
object(stdClass)[104]
-
...
-
1 =>
-
object(stdClass)[113]
how can i do to get :GlobtechData->GROUPS->GROUP->GROUP seq=290@REM
Thanks in advance
Dormilich 8,658
Recognized Expert Moderator Expert - simplexml_load_string($Getresults->any);
i write - $xml=simplexml_load_string($Getresults->any);
Have this error Notice:Undefined property :stdClass::$any in c:\wamp\www\classtest.php
Thanks in advance
Dormilich 8,658
Recognized Expert Moderator Expert
doesn’t make sense with the code you have given. unless the output above was a subresult of the response.
best you check var_dump($Getresults); for the property you want.
Dormilich 8,658
Recognized Expert Moderator Expert
as suspected, it was a subresult.
with that you should find the way to access the XML string you want.
how can i do please
Thanks
Dormilich 8,658
Recognized Expert Moderator Expert
look at the structure of your result object as presented in the output.
yes i look ,can you please tell me by code script to understand
Thanks in advance
Dormilich 8,658
Recognized Expert Moderator Expert
you only understand if you try it yourself.
so now o have this error Undefined property and what i do simple xml or what can you please tell me what can i do to resolve this issue i waste 2 week on that
Thanks in advance
Dormilich 8,658
Recognized Expert Moderator Expert
so, which property is undefined?
Have this error Notice:Undefined property :stdClass::$any in c:\wamp\www\classtest.php
Dormilich 8,658
Recognized Expert Moderator Expert
sounds sensible if you look at the dump.
i don't understand what's you mean,but i have this issue i don't know what can i do simple xml or not to get this information attribute from the balise
so i have not luck
Thanks
Dormilich 8,658
Recognized Expert Moderator Expert
i don't know what can i do
read the d*** object structure.
i am not understand you can you explain please or give me the script code to understand
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...
|
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...
|
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: 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: 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.
...
|
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...
|
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).
...
|
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: 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,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |
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,...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
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...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
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...
| |