PHPEveryday.com PHP and Web Development Tutorial
What are you looking for?


Web Services .NET Grid: Create WSDL Document


Web Services PHP - Grid .NET Step By Step Tutorial - Part 1: One of my friend ask me how to catch php web service and show in grid at vb.net. Ok, in this series tutorial, I will show how to catch data array and show use grid. I use PHP 5 and Ms Visual Studio 2003.

We use WSDL and SOAP to transmit data. But there is limited that we must know. VS 2003 don't know xsd:restriction and soapenc at WSDL document (if you still don't know about this, you can read before this). Without this element, we can not transmit array data. So, how can we solve this problem?

We can still use string to transport array. How? Example, we have array like this:

array(array('id'=>1,'title'=>'PHP API')
      array('id'=>2,'title'=>'PHP Web 2.0')
     )

We can manipulate become string such as:

1|PHP API#2|PHP Web 2.0

Each row is separated with # character, then each item is separated with #. This is basic idea.

Below, our WSDL:

<?xml version="1.0"?>
<definitions name="Library" targetNamespace="urn:Library" xmlns:tns="urn:Library"  xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
  <types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Library">
	</xsd:schema>			
  </types>
    
  <message name="doLibraryRequest">
    <part name="name" type="xsd:string" />
  </message>

  <message name="doLibraryResponse">
    <part name="return" type="xsd:string" />
  </message>  
  
  <portType name="LibraryPort">
    <operation name="doLibrary">
	  <input message="tns:doLibraryRequest" />
	  <output message="tns:doLibraryResponse" />
	</operation>
  </portType>
 
  
<binding name="LibraryBinding" type="tns:LibraryPort">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
	<operation name="doLibrary">
    <soap:operation soapAction="urn:Library#doLibrary" style="rpc"/>
	<input>
      <soap:body use="encoded" namespace="urn:Library" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </input>
	<output>
      <soap:body use="encoded" namespace="urn:Library" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </output>
</operation>
</binding>  
  
  <service name="LibraryService">
    <port name="LibraryPort" binding="tns:LibraryBinding">
	  <soap:address location="http://localhost/test/wsdl/library_server.php" />
	</port>
  </service>
    
</definitions>

Create a file named "library.wsdl" within www/test/wsdl. Enter above code.



Series this article:
Web Services .NET Grid: Create WSDL Document
Web Services .NET Grid: Preparing Database
Web Services .NET Grid: Create SOAP Server
Web Services .NET Grid: Testing with SOAP client
Web Services .NET Grid: Creating User Interface for VB.NET
Web Services .NET Grid: Retrieve Data and Show to Data Grid


Tag: wsdl, web services, .net, grid, wsdl, array Category: PHP Application Post : April 15th 2008 Read: 1,934 Bookmark and Share

blog comments powered by Disqus


Database Tutorial
  • Learn PHP MySQL
  • Learn PHP ADOdb
  • Learn PHP Data Object/PDO
  • Learn PHP XML
  • Learn PHP SimpleXML
Security Tutorial
  • Learn PHP Security
  • Learn HTTP Authentication
  • Learn PHPSecureSite
Framework Tutorial
  • Learn CodeIgniter
  • Learn Joomla
  • Learn Smarty
  • Learn Zend Framework
Template Tutorial
  • Learn Joomla Template
  • Learn WordPress Template
API Tutorial
  • Learn Facebook
JS Framework Tutorial
  • Learn MooTools
  • Learn JQuery
AJAX Tutorial
  • Learn AJAX in 10 Minutes
  • Learn AJAX Client Side
  • Learn AJAX PHP
  • Learn AJAX Remote Server
  • Learn AJAX Repetitive
  • Learn AJAX MySQL
  • Learn AJAX Grid
Web Services Tutorial
  • Learn Web Services NuSOAP
  • Learn Web Services WSDL
  • Learn Web Services WSDL Array
  • Learn Web Services .NET Grid
  • Learn Web Services WDDX
Package Post
  • Joomla Intro
  • Joomla Component
  • Joomla Module
  • Joomla MVC
  • Joomla MVC Backend
  • PostNuke Intro
  • Zend Framework Intro
  • Zend Framework Action
  • Zend Framework Database
  • Zend Framework Registry
  • Zend Framework Config
  • Zend Framework Login
  • Zend Framework Session
  • PHP Array Tips
  • PHP File Tips
  • PHP Email
  • PHP Ms Excel
  • PHP Pattern
  • PHP SMS
  • Flash Database
  • PHP Multitier
  • jQuery Introduction
  • jQuery Selectors
  • Portable Web Server
  • Web Mobile Intro
  • Drupal Installation
  • Drupal Configuration