Jump to content

Search the Community

Showing results for tags 'xml asp.net web servic'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I'm trying to use a ASP.NET webservice and new to php I am unsure as how the XML segment required in the add CreatePurchase call gets turned into an object that the web service and php server can use? WSDL is at the top and code lower. <s:element name="CreatePurchase"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1" name="axCustomer"><s:complexType><s:sequence><s:any/></s:sequence></s:complexType></s:element></s:sequence></s:complexType></s:element> Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <CreatePurchase xmlns="http://xxx.xxx.com/webservices/"> <axCustomer>xml</axCustomer> </CreatePurchase> </soap12:Body> </soap12:Envelope <?php error_reporting(E_ALL); ini_set('display_errors', 1); $soapURL = "http://www.xxx.com/ActService/ActService.asmx?WSDL"; $client = new SoapClient($soapURL); $result = $client->Login(array( "asUserName" => "xxx", "asPasssword" => "xxx" )); var_dump($result); $name = "Ron Howard"; $email = "rh@xxx.com"; $firstname = "Ron"; $lastname = "Howard"; $salutation = "Mr."; $company = "RHP"; $address = "1313 Mockingbird Lane"; $address2 = ""; $city = "LA"; $statecode = "CA"; $countryISOcode = "USA"; $postcode = "99999"; $phone = "8888888"; $fax = "8888888"; $comments = "test 1"; $purchasedate = date("m/d/Y"); $writer = new XMLWriter(); $writer->openMemory(); $writer->setIndent(4); $writer->startElement('Customer'); $writer->writeAttribute('Name', $name); $writer->writeAttribute('EMail', $email); $writer->writeAttribute('FirstName', $firstname); $writer->writeAttribute('LastName', $lastname); $writer->writeAttribute('Salutation', $salutation); $writer->writeAttribute('Company', $company); $writer->writeAttribute('Address', $address); $writer->writeAttribute('Address2', $address2); $writer->writeAttribute('City', $city); $writer->writeAttribute('StateCode', $statecode); $writer->writeAttribute('CountryISOcode', $countryISOcode); $writer->writeAttribute('PostCode', $postcode); $writer->writeAttribute('Phone', $phone); $writer->writeAttribute('Fax', $fax); $writer->writeAttribute('Comments', $comments); $writer->startElement('Purchase'); $writer->writeAttribute('LicenseID', '0'); $writer->writeAttribute('PurchaseDate', $purchasedate); $writer->writeAttribute('Income', '0'); $writer->writeAttribute('Comments', 'Test'); $writer->endElement(); $writer->endElement(); $Customer1 = ($writer->outputMemory(True)); $xml = new xml($Customer1); <<<<<<<<<< ---- How do I turn this into the XML object that is needed in the call? $result2 = $client->CreatePurchase(array('xml' => $xml)); var_dump($result2); $result1 = $client->Logout(); var_dump($result1); ?> Regards...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.