Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7932017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:53:18+00:00 2026-06-03T20:53:18+00:00

I am working with Soap for the first time today. But know i need

  • 0

I am working with Soap for the first time today. But know i need to get all brands in an array. Soap gives it back in string form.

The code i’m using i:

<?php
 $soapClient = new SoapClient("http://getmoxecure.com:5454/ProductService.asmx?wsdl"); 

     $result = $soapClient->getHandsetBrands();
     print_r($result->getHandsetBrandsResult);
     ?>

The result of this is:

    stdClass Object
(

        [schema] => <xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet"><xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"><xs:complexType><xs:choice minOccurs="0" maxOccurs="unbounded"><xs:element name="HandsetBrandTable"><xs:complexType><xs:sequence><xs:element name="handset_brand" type="xs:string" minOccurs="0"/></xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema>
        [any] => <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"><NewDataSet xmlns=""><HandsetBrandTable diffgr:id="HandsetBrandTable1" msdata:rowOrder="0"><handset_brand>Android</handset_brand></HandsetBrandTable><HandsetBrandTable diffgr:id="HandsetBrandTable2" msdata:rowOrder="1"><handset_brand>BlackBerry</handset_brand></HandsetBrandTable><HandsetBrandTable diffgr:id="HandsetBrandTable3" msdata:rowOrder="2"><handset_brand>LG</handset_brand></HandsetBrandTable><HandsetBrandTable diffgr:id="HandsetBrandTable4" msdata:rowOrder="3"><handset_brand>Nokia</handset_brand></HandsetBrandTable><HandsetBrandTable diffgr:id="HandsetBrandTable5" msdata:rowOrder="4"><handset_brand>Samsung</handset_brand></HandsetBrandTable><HandsetBrandTable diffgr:id="HandsetBrandTable6" msdata:rowOrder="5"><handset_brand>Sony Ericsson</handset_brand></HandsetBrandTable></NewDataSet></diffgr:diffgram>
    )

I want to get all the Brands in the Any string. Does someone know how to get this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:53:19+00:00Added an answer on June 3, 2026 at 8:53 pm

    load the object into simplexml

    $xml = simplexml_load_string($result->getHandsetBrandsResult->any);
    

    save into an array:

    $hansets = array();
    foreach ($xml->NewDataSet->HandsetBrandTable as $handset) $handsets[] = $handset->handset_brand;
    
    print_r($handsets);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with SOAP::WSDL and another company's custom WSDL file. Every time they make
I asked another SOAP related question some time ago, which asks for a working
I've been working with C# and .NET for quite some time now, but am
I'm working with an application that needs to be make some time consuming SOAP
I'm struggling to get SOAP working on server locally. It's running on server and
I am struggling to get some SOAP request working using SOAP Ligth and PHP
I am working on an android application.I want to pass values to soap webservice.But
i'm trying to build a SOAP service with Zend_Soap. Everything is working great but
I've got a working SOAP::Lite client. It works against an established server, but so
I have a SOAP client in Ruby that I'm trying to get working with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.