Jump to content

Search the Community

Showing results for tags 'wsdl'.



More search options

  • 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 (Dreamweaver, Zend, 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 2 results

  1. I need create an abstact complexType in php with nusoap to create this type in wsdl: <xsd:complexType abstract="true" name="abstractClass"> <xsd:sequence> <xsd:element minOccurs="0" name="identifier" nillable="true" type="xsd:string"/> </xsd:sequence> </xsd:complexType> I don't know how to put it to be abstract. I'm using this in PHP: $server->wsdl->addComplexType( 'abstractClass', 'complexType', 'struct', 'sequence', '', array('identifier' => array('minOccurs' => '0','name' => 'identifier','type' => 'xsd:string')) ); Thanks.
  2. jimatcaledonia

    PHP WSDL Help Needed

    Hi all, I am a Junior Developer, I have taken over someone's implementation of a web service and am struggling. They used python to access the methods. I can access the web service via Python and connect it to our databases, but it is really slow. I believe that PHP would make it faster, but I am not able to make the right connections. Any help would be really appreciated. I have included some code snippets below, Thank you, Jim ###################################################################### Python ###################################################################### #!/usr/bin/python ###################################################################### # Module imports ###################################################################### from suds.client import Client from suds.wsse import * from xml.dom import minidom import MySQLdb ###################################################################### # Address Interface. ###################################################################### class Address(object): def __init__(self, ttl=600): # Constants. self._USERNAME = 'username' self._PASSWORD = 'password' self._address_search_url = 'https://jim.svc?wsdl' # SOAP security setup. self._security = Security() self._token = UsernameToken(self._USERNAME, self._PASSWORD) self._security.tokens.append(self._token) #print 'Starting Address Search.' self._address_search_client = Client(self._address_search_url) self._address_search_client.set_options(wsse=self._security) # Addresses. ######################################################## def address_search_by_postcode(self, postcode): RegsRegionType = self._address_search_client.factory.create('ns1:RegsRegionType') regs_region = RegsRegionType.Scotland address_data = self._address_search_client.service.SearchAddressByPostCode(regs_region, RegisterType.Domestic, postcode, '') addrs = [] for addr in address_data.keys.string: address_dom = minidom.parseString(addr.encode('utf-8')) ob = {} #Get addr details addrs.append(ob) return addrs ###################################################################### def get_data(d, t): try: return d.getElementsByTagName(t)[0].childNodes[0].data except: return None ###################################################################### PHP ###################################################################### <?php error_reporting(E_ALL); ini_set('display_errors', 'on'); $username = "username"; $password = 'password'; $wsdl = "https://jim.svc?wsdl"; // SOAP security setup $options = array( 'login' => $username, 'password' => $password, ); /////////////////////////////////////////////////////////////////////////////// Connect ////////////////////////////////////////////////////////////////////////////// $client = new SoapClient($wsdl, $options); ////////////////////////////////////////////////////////////////////////////// define wsse security ////////////////////////////////////////////////////////////////////////////// $securityNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; $headerContent = "<o:Security xmlns:o=\"$securityNamespace\"> <o:UsernameToken> <o:Username>USERNAME</o:Username> <o:Password>PASSWORD</o:Password> </o:UsernameToken> </o:Security>"; $headerVar = new SoapVar($headerContent, XSD_ANYXML, null, null, null); $header = new SoapHeader($securityNamespace, 'o:Security', $headerVar); ////////////////////////////////////////////////////////////////////////////// Authenticate ////////////////////////////////////////////////////////////////////////////// $client->__setSoapHeaders(array($header)); var_dump($client->__getFunctions()); try{ $result = $client->SearchAddressByPostCode($regsRegion, $registerType, $postCode, " "); print_r($result); }catch (SoapFault $exception){ var_dump($exception); } print('done'); ?> ////////////////////////////////////////////////////////////////////////////// END ////////////////////////////////////////////////////////////////////////////// Hope someone can help and point me in the right direction Thanks JIm
×

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.