Delphi Soap Web Services with xsd shema

Hi Everybody,

 First Of All sorry about my bad English :D and Thanks for your help...

I have to write a delphi web servis with xsd shema and the wsdl similar to wsdl at the bottom. Is it possible with delphi. I have to write a servis according to the existing web service client, the wsdl at  the bottom belongs to an php web service with nusoap librarry.

I seem to hear you write this web service with php nusoap, but as you know that delphi web service can be standalone exe and I need it's ability for our product. 

I can write this web servis with php no problem, but if it is posibble, I want to write this web service with delphi as a standalone.

Thanks again.    

{code}
<?xml version="1.0" encoding="windows-1252"?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:wnposwsdl2" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:wnposwsdl2">
<types>
<xsd:schema targetNamespace="urn:wnposwsdl2">
 <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
 <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
 <xsd:complexType name="wnposreply">
  <xsd:all>
   <xsd:element name="rtype" type="xsd:string"/>
   <xsd:element name="rid" type="xsd:string"/>
   <xsd:element name="rval1" type="xsd:string"/>
   <xsd:element name="rval2" type="xsd:string"/>
   <xsd:element name="rmessage1" type="xsd:string"/>
   <xsd:element name="rmessage2" type="xsd:string"/>
   <xsd:element name="rmessage3" type="xsd:string"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="posregister">
  <xsd:all>
   <xsd:element name="serialno" type="xsd:string"/>
   <xsd:element name="posid" type="xsd:string"/>
   <xsd:element name="siteid" type="xsd:string"/>
   <xsd:element name="sitename" type="xsd:string"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="customercard">
  <xsd:all>
   <xsd:element name="cctype" type="xsd:string"/>
   <xsd:element name="customercode" type="xsd:string"/>
   <xsd:element name="ccnumber" type="xsd:string"/>
   <xsd:element name="validfrom" type="xsd:string"/>
   <xsd:element name="validto" type="xsd:string"/>
   <xsd:element name="pin" type="xsd:string"/>
   <xsd:element name="ccstatus" type="xsd:string"/>
   <xsd:element name="total_d" type="xsd:float"/>
   <xsd:element name="total_c" type="xsd:float"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="customer">
  <xsd:all>
   <xsd:element name="code" type="xsd:string"/>
   <xsd:element name="name" type="xsd:string"/>
   <xsd:element name="address1" type="xsd:string"/>
   <xsd:element name="address2" type="xsd:string"/>
   <xsd:element name="county" type="xsd:string"/>
   <xsd:element name="city" type="xsd:string"/>
   <xsd:element name="zip" type="xsd:string"/>
   <xsd:element name="tel" type="xsd:string"/>
   <xsd:element name="gsm" type="xsd:string"/>
   <xsd:element name="email" type="xsd:string"/>
   <xsd:element name="web" type="xsd:string"/>
   <xsd:element name="listprice" type="xsd:string"/>
   <xsd:element name="defdiscount" type="xsd:string"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="payment">
  <xsd:all>
   <xsd:element name="id" type="xsd:int"/>
   <xsd:element name="val" type="xsd:float"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="ccard">
  <xsd:all>
   <xsd:element name="customercard" type="tns:customercard"/>
   <xsd:element name="customer" type="tns:customer"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="ccardarray">
  <xsd:complexContent>
   <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:ccard[]"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 <xsd:complexType name="customertrans">
  <xsd:all>
   <xsd:element name="ccnumber" type="xsd:string"/>
   <xsd:element name="posserialno" type="xsd:string"/>
   <xsd:element name="ftransid" type="xsd:string"/>
   <xsd:element name="ftype" type="xsd:string"/>
   <xsd:element name="ftm" type="xsd:string"/>
   <xsd:element name="fno" type="xsd:string"/>
   <xsd:element name="excode" type="xsd:string"/>
   <xsd:element name="genexp" type="xsd:string"/>
   <xsd:element name="sign" type="xsd:string"/>
   <xsd:element name="amount" type="xsd:float"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="customertransarray">
  <xsd:complexContent>
   <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:customertrans[]"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 <xsd:complexType name="payments">
  <xsd:complexContent>
   <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:payment[]"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 <xsd:complexType name="itemtrans">
  <xsd:all>
   <xsd:element name="ttype" type="xsd:string"/>
   <xsd:element name="subtype" type="xsd:string"/>
   <xsd:element name="code" type="xsd:string"/>
   <xsd:element name="quantity" type="xsd:float"/>
   <xsd:element name="bprice" type="xsd:float"/>
   <xsd:element name="itemgroupcode" type="xsd:string"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="itemtransarray">
  <xsd:complexContent>
   <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:itemtrans[]"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 <xsd:complexType name="receiptheader">
  <xsd:all>
   <xsd:element name="fno" type="xsd:string"/>
   <xsd:element name="ftm" type="xsd:string"/>
   <xsd:element name="siteid" type="xsd:string"/>
   <xsd:element name="customercard" type="tns:customercard"/>
   <xsd:element name="payments" type="tns:payments"/>
   <xsd:element name="nettotal" type="xsd:float"/>
   <xsd:element name="calculatedtotalpoint" type="xsd:float"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="receipt">
  <xsd:all>
   <xsd:element name="ftransid" type="xsd:int"/>
   <xsd:element name="serialno" type="xsd:string"/>
   <xsd:element name="ctranstype" type="xsd:string"/>
   <xsd:element name="header" type="tns:receiptheader"/>
   <xsd:element name="items" type="tns:itemtransarray"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="receiptarray">
  <xsd:complexContent>
   <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:receipt[]"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 <xsd:complexType name="spendingcheck">
  <xsd:all>
   <xsd:element name="ctrans" type="tns:customertrans"/>
   <xsd:element name="basket" type="tns:receipt"/>
  </xsd:all>
 </xsd:complexType>
</xsd:schema>
</types>
<message name="register_posRequest">
  <part name="posrecord" type="tns:posregister"/></message>
<message name="register_posResponse">
  <part name="return" type="tns:wnposreply"/></message>
<message name="query_cardRequest">
  <part name="customercard" type="tns:customercard"/></message>
<message name="query_cardResponse">
  <part name="return" type="tns:wnposreply"/></message>
<message name="register_customerRequest">
  <part name="ccardarray" type="tns:ccardarray"/></message>
<message name="register_customerResponse">
  <part name="return" type="tns:wnposreply"/></message>
<message name="check_receiptRequest">
  <part name="receipt" type="tns:receiptarray"/></message>
<message name="check_receiptResponse">
  <part name="return" type="tns:wnposreply"/></message>
<message name="add_ctransRequest">
  <part name="customertrans" type="tns:customertrans"/></message>
<message name="add_ctransResponse">
  <part name="return" type="tns:wnposreply"/></message>
<message name="update_ctransRequest">
  <part name="customertrans" type="tns:customertrans"/></message>
<message name="update_ctransResponse">
  <part name="return" type="tns:wnposreply"/></message>
<message name="add_spendingRequest">
  <part name="spendingcheck" type="tns:spendingcheck"/></message>
<message name="add_spendingResponse">
  <part name="return" type="tns:wnposreply"/></message>
<portType name="wnposwsdl2PortType">
  <operation name="register_pos">
    <documentation>Register pos...</documentation>
    <input message="tns:register_posRequest"/>
    <output message="tns:register_posResponse"/>
  </operation>
  <operation name="query_card">
    <documentation>Query customer card...</documentation>
    <input message="tns:query_cardRequest"/>
    <output message="tns:query_cardResponse"/>
  </operation>
  <operation name="register_customer">
    <documentation>Registers customer(s)/card(s)/giftcard(s) to be used by the server, approval required by the db manager....</documentation>
    <input message="tns:register_customerRequest"/>
    <output message="tns:register_customerResponse"/>
  </operation>
  <operation name="check_receipt">
    <documentation>Check receipt for gift or point collection..</documentation>
    <input message="tns:check_receiptRequest"/>
    <output message="tns:check_receiptResponse"/>
  </operation>
  <operation name="add_ctrans">
    <documentation>Add trans..</documentation>
    <input message="tns:add_ctransRequest"/>
    <output message="tns:add_ctransResponse"/>
  </operation>
  <operation name="update_ctrans">
    <documentation>Update added trans change stage...</documentation>
    <input message="tns:update_ctransRequest"/>
    <output message="tns:update_ctransResponse"/>
  </operation>
  <operation name="add_spending">
    <documentation>Add spending ..</documentation>
    <input message="tns:add_spendingRequest"/>
    <output message="tns:add_spendingResponse"/>
  </operation>
</portType>
<binding name="wnposwsdl2Binding" type="tns:wnposwsdl2PortType">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="register_pos">
    <soap:operation soapAction="urn:wnposwsdl2#register_pos" style="rpc"/>
    <input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="query_card">
    <soap:operation soapAction="urn:wnposwsdl2#query_card" style="rpc"/>
    <input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="register_customer">
    <soap:operation soapAction="urn:wnposwsdl2#register_customer" style="rpc"/>
    <input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="check_receipt">
    <soap:operation soapAction="urn:wnposwsdl2#check_receipt" style="rpc"/>
    <input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="add_ctrans">
    <soap:operation soapAction="urn:wnposwsdl2#customertrans" style="rpc"/>
    <input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="update_ctrans">
    <soap:operation soapAction="urn:wnposwsdl2#customertrans" style="rpc"/>
    <input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="add_spending">
    <soap:operation soapAction="urn:wnposwsdl2#spendingcheck" style="rpc"/>
    <input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
</binding>
<service name="wnposwsdl2">
  <port name="wnposwsdl2Port" binding="tns:wnposwsdl2Binding">
    <soap:address location="http://ksistemdomain.com:88/web.biz/server/wnposserver.php"/>
  </port>
</service>
</definitions>
{code}
0
erkan
8/5/2015 6:58:10 AM
embarcadero.delphi.webservices 976 articles. 0 followers. Follow

3 Replies
1123 Views

Similar Articles

[PageSpeed] 24

Never tryed to create a server, but your xml once included in a file that I called nusoap.wsdl is processed by wsdlimp without a warning.

C:\nusoap>WSDLIMP -P nusoap.wsdl
Embarcadero WSDLIMP Version 2.41 - $Rev: 45757 $
Copyright (c) 2010 Embarcadero Technologies, Inc.

Read : nusoap.wsdl
Importer :  nusoap.wsdl>0
Write : C:\nusoap\nusoap.pas

You don't tell what Delphi version you are using, but you'll need at least XE2 if you wan your server to be compliant with version 1.2 of SOAP.

There are plenty of examples if you google "delphi soap web service" like this one http://chapmanworld.com/2015/03/30/creating-and-consuming-soap-services-in-delphi/

You won't get many answers because the forum is so slow it takes forever to post an answer and many will give up before they get the focus.

But if Delphi can generate the header for the client, then it should be able to handle the server too.

{code}
// ************************************************************************ //
// Les types déclarés dans ce fichier ont été générés à partir de données lues
// depuis le fichier WSDL décrit ci-dessous :
// WSDL     : nusoap.wsdl
//  >Importer : nusoap.wsdl>0
// Encodage : windows-1252
// Version  : 1.0
// (05/08/2015 12:18:47 - - $Rev: 45757 $)
// ************************************************************************ //

unit nusoap;

interface

uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;

type

  // ************************************************************************ //
  // Les types suivants mentionnés dans le document WSDL ne sont pas représentés
  // dans ce fichier. Ce sont des alias[@] d'autres types représentés ou alors ils étaient référencés
  // mais jamais[!] déclarés dans le document. Les types de la dernière catégorie
  // sont en principe mappés sur des types Embarcadero ou XML prédéfinis/connus. Toutefois, ils peuvent aussi 
  // signaler des documents WSDL incorrects n'ayant pas réussi à déclarer ou importer un type de schéma.
  // ************************************************************************ //
  // !:string          - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:float           - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:int             - "http://www.w3.org/2001/XMLSchema"[Gbl]

  spendingcheck        = class;                 { "urn:wnposwsdl2"[GblCplx] }
  wnposreply           = class;                 { "urn:wnposwsdl2"[GblCplx] }
  posregister          = class;                 { "urn:wnposwsdl2"[GblCplx] }
  customercard         = class;                 { "urn:wnposwsdl2"[GblCplx] }
  receiptheader        = class;                 { "urn:wnposwsdl2"[GblCplx] }
  customertrans        = class;                 { "urn:wnposwsdl2"[GblCplx] }
  itemtrans            = class;                 { "urn:wnposwsdl2"[GblCplx] }
  receipt              = class;                 { "urn:wnposwsdl2"[GblCplx] }
  ccard                = class;                 { "urn:wnposwsdl2"[GblCplx] }
  customer             = class;                 { "urn:wnposwsdl2"[GblCplx] }
  payment              = class;                 { "urn:wnposwsdl2"[GblCplx] }

  payments   = array of payment;                { "urn:wnposwsdl2"[GblCplx] }
  itemtransarray = array of itemtrans;          { "urn:wnposwsdl2"[GblCplx] }
  receiptarray = array of receipt;              { "urn:wnposwsdl2"[GblCplx] }


  // ************************************************************************ //
  // XML       : spendingcheck, global, <complexType>
  // Espace de nommage : urn:wnposwsdl2
  // ************************************************************************ //
  spendingcheck = class(TRemotable)
  private
    Fctrans: customertrans;
    Fbasket: receipt;
  public
    destructor Destroy; override;
  published
    property ctrans: customertrans  read Fctrans write Fctrans;
    property basket: receipt        read Fbasket write Fbasket;
  end;

  ccardarray = array of ccard;                  { "urn:wnposwsdl2"[GblCplx] }


  // ************************************************************************ //
  // XML       : wnposreply, global, <complexType>
  // Espace de nommage : urn:wnposwsdl2
  // ************************************************************************ //
  wnposreply = class(TRemotable)
  private
    Frtype: string;
    Frid: string;
    Frval1: string;
    Frval2: string;
    Frmessage1: string;
    Frmessage2: string;
    Frmessage3: string;
  published
    property rtype:     string  read Frtype write Frtype;
    property rid:       string  read Frid write Frid;
    property rval1:     string  read Frval1 write Frval1;
    property rval2:     string  read Frval2 write Frval2;
    property rmessage1: string  read Frmessage1 write Frmessage1;
    property rmessage2: string  read Frmessage2 write Frmessage2;
    property rmessage3: string  read Frmessage3 write Frmessage3;
  end;



  // ************************************************************************ //
  // XML       : posregister, global, <complexType>
  // Espace de nommage : urn:wnposwsdl2
  // ************************************************************************ //
  posregister = class(TRemotable)
  private
    Fserialno: string;
    Fposid: string;
    Fsiteid: string;
    Fsitename: string;
  published
    property serialno: string  read Fserialno write Fserialno;
    property posid:    string  read Fposid write Fposid;
    property siteid:   string  read Fsiteid write Fsiteid;
    property sitename: string  read Fsitename write Fsitename;
  end;



  // ************************************************************************ //
  // XML       : customercard, global, <complexType>
  // Espace de nommage : urn:wnposwsdl2
  // ************************************************************************ //
  customercard = class(TRemotable)
  private
    Fcctype: string;
    Fcustomercode: string;
    Fccnumber: string;
    Fvalidfrom: string;
    Fvalidto: string;
    Fpin: string;
    Fccstatus: string;
    Ftotal_d: Single;
    Ftotal_c: Single;
  published
    property cctype:       string  read Fcctype write Fcctype;
    property customercode: string  read Fcustomercode write Fcustomercode;
    property ccnumber:     string  read Fccnumber write Fccnumber;
    property validfrom:    string  read Fvalidfrom write Fvalidfrom;
    property validto:      string  read Fvalidto write Fvalidto;
    property pin:          string  read Fpin write Fpin;
    property ccstatus:     string  read Fccstatus write Fccstatus;
    property total_d:      Single  read Ftotal_d write Ftotal_d;
    property total_c:      Single  read Ftotal_c write Ftotal_c;
  end;



  // ************************************************************************ //
  // XML       : receiptheader, global, <complexType>
  // Espace de nommage : urn:wnposwsdl2
  // ************************************************************************ //
  receiptheader = class(TRemotable)
  private
    Ffno: string;
    Fftm: string;
    Fsiteid: string;
    Fcustomercard: customercard;
    Fpayments: payments;
    Fnettotal: Single;
    Fcalculatedtotalpoint: Single;
  public
    destructor Destroy; override;
  published
    property fno:                  string        read Ffno write Ffno;
    property ftm:                  string        read Fftm write Fftm;
    property siteid:               string        read Fsiteid write Fsiteid;
    property customercard:         customercard  read Fcustomercard write Fcustomercard;
    property payments:             payments      read Fpayments write Fpayments;
    property nettotal:             Single        read Fnettotal write Fnettotal;
    property calculatedtotalpoint: Single        read Fcalculatedtotalpoint write Fcalculatedtotalpoint;
  end;



  // ************************************************************************ //
  // XML       : customertrans, global, <complexType>
  // Espace de nommage : urn:wnposwsdl2
  // ************************************************************************ //
  customertrans = class(TRemotable)
  private
    Fccnumber: string;
    Fposserialno: string;
    Fftransid: string;
    Fftype: string;
    Fftm: string;
    Ffno: string;
    Fexcode: string;
    Fgenexp: string;
    Fsign: string;
    Famount: Single;
  published
    property ccnumber:    string  read Fccnumber write Fccnumber;
    property posserialno: string  read Fposserialno write Fposserialno;
    property ftransid:    string  read Fftransid write Fftransid;
    property ftype:       string  read Fftype write Fftype;
    property ftm:         string  read Fftm write Fftm;
    property fno:         string  read Ffno write Ffno;
    property excode:      string  read Fexcode write Fexcode;
    property genexp:      string  read Fgenexp write Fgenexp;
    property sign:        string  read Fsign write Fsign;
    property amount:      Single  read Famount write Famount;
  end;



  // ************************************************************************ //
  // XML       : itemtrans, global, <complexType>
  // Espace de nommage : urn:wnposwsdl2
  // ************************************************************************ //
  itemtrans = class(TRemotable)
  private
    Fttype: string;
    Fsubtype: string;
    Fcode: string;
    Fquantity: Single;
    Fbprice: Single;
    Fitemgroupcode: string;
  published
    property ttype:         string  read Fttype write Fttype;
    property subtype:       string  read Fsubtype write Fsubtype;
    property code:          string  read Fcode write Fcode;
    property quantity:      Single  read Fquantity write Fquantity;
    property bprice:        Single  read Fbprice write Fbprice;
    property itemgroupcode: string  read Fitemgroupcode write Fitemgroupcode;
  end;



  // ************************************************************************ //
  // XML       : receipt, global, <complexType>
  // Espace de nommage : urn:wnposwsdl2
  // ************************************************************************ //
  receipt = class(TRemotable)
  private
    Fftransid: Integer;
    Fserialno: string;
    Fctranstype: string;
    Fheader: receiptheader;
    Fitems: itemtransarray;
  public
    destructor Destroy; override;
  published
    property ftransid:   Integer         read Fftransid write Fftransid;
    property serialno:   string          read Fserialno write Fserialno;
    property ctranstype: string          read Fctranstype write Fctranstype;
    property header:     receiptheader   read Fheader write Fheader;
    property items:      itemtransarray  read Fitems write Fitems;
  end;



  // ************************************************************************ //
  // XML       : ccard, global, <complexType>
  // Espace de nommage : urn:wnposwsdl2
  // ************************************************************************ //
  ccard = class(TRemotable)
  private
    Fcustomercard: customercard;
    Fcustomer: customer;
  public
    destructor Destroy; override;
  published
    property customercard: customercard  read Fcustomercard write Fcustomercard;
    property customer:     customer      read Fcustomer write Fcustomer;
  end;



  // ************************************************************************ //
  // XML       : customer, global, <complexType>
  // Espace de nommage : urn:wnposwsdl2
  // ************************************************************************ //
  customer = class(TRemotable)
  private
    Fcode: string;
    Fname_: string;
    Faddress1: string;
    Faddress2: string;
    Fcounty: string;
    Fcity: string;
    Fzip: string;
    Ftel: string;
    Fgsm: string;
    Femail: string;
    Fweb: string;
    Flistprice: string;
    Fdefdiscount: string;
  published
    property code:        string  read Fcode write Fcode;
    property name_:       string  read Fname_ write Fname_;
    property address1:    string  read Faddress1 write Faddress1;
    property address2:    string  read Faddress2 write Faddress2;
    property county:      string  read Fcounty write Fcounty;
    property city:        string  read Fcity write Fcity;
    property zip:         string  read Fzip write Fzip;
    property tel:         string  read Ftel write Ftel;
    property gsm:         string  read Fgsm write Fgsm;
    property email:       string  read Femail write Femail;
    property web:         string  read Fweb write Fweb;
    property listprice:   string  read Flistprice write Flistprice;
    property defdiscount: string  read Fdefdiscount write Fdefdiscount;
  end;



  // ************************************************************************ //
  // XML       : payment, global, <complexType>
  // Espace de nommage : urn:wnposwsdl2
  // ************************************************************************ //
  payment = class(TRemotable)
  private
    Fid: Integer;
    Fval: Single;
  published
    property id:  Integer  read Fid write Fid;
    property val: Single   read Fval write Fval;
  end;


  // ************************************************************************ //
  // Espace de nommage : urn:wnposwsdl2
  // soapAction : |urn:wnposwsdl2#register_pos|urn:wnposwsdl2#query_card|urn:wnposwsdl2#register_customer|urn:wnposwsdl2#check_receipt|urn:wnposwsdl2#customertrans|urn:wnposwsdl2#spendingcheck
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : rpc
  // utiliser   : encoded
  // Liaison : wnposwsdl2Binding
  // service   : wnposwsdl2
  // port      : wnposwsdl2Port
  // URL       : http://ksistemdomain.com:88/web.biz/server/wnposserver.php
  // ************************************************************************ //
  wnposwsdl2PortType = interface(IInvokable)
  ['{A40A7484-2135-1279-4925-E8DF8926F5FE}']
    function  register_pos(const posrecord: posregister): wnposreply; stdcall;
    function  query_card(const customercard: customercard): wnposreply; stdcall;
    function  register_customer(const ccardarray: ccardarray): wnposreply; stdcall;
    function  check_receipt(const receipt: receiptarray): wnposreply; stdcall;
    function  add_ctrans(const customertrans: customertrans): wnposreply; stdcall;
    function  update_ctrans(const customertrans: customertrans): wnposreply; stdcall;
    function  add_spending(const spendingcheck: spendingcheck): wnposreply; stdcall;
  end;

function Getwnposwsdl2PortType(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): wnposwsdl2PortType;


implementation
  uses SysUtils;

function Getwnposwsdl2PortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): wnposwsdl2PortType;
const
  defWSDL = 'nusoap.wsdl';
  defURL  = 'http://ksistemdomain.com:88/web.biz/server/wnposserver.php';
  defSvc  = 'wnposwsdl2';
  defPrt  = 'wnposwsdl2Port';
var
  RIO: THTTPRIO;
begin
  Result := nil;
  if (Addr = '') then
  begin
    if UseWSDL then
      Addr := defWSDL
    else
      Addr := defURL;
  end;
  if HTTPRIO = nil then
    RIO := THTTPRIO.Create(nil)
  else
    RIO := HTTPRIO;
  try
    Result := (RIO as wnposwsdl2PortType);
    if UseWSDL then
    begin
      RIO.WSDLLocation := Addr;
      RIO.Service := defSvc;
      RIO.Port := defPrt;
    end else
      RIO.URL := Addr;
  finally
    if (Result = nil) and (HTTPRIO = nil) then
      RIO.Free;
  end;
end;


destructor spendingcheck.Destroy;
begin
  SysUtils.FreeAndNil(Fctrans);
  SysUtils.FreeAndNil(Fbasket);
  inherited Destroy;
end;

destructor receiptheader.Destroy;
var
  I: Integer;
begin
  for I := 0 to System.Length(Fpayments)-1 do
    SysUtils.FreeAndNil(Fpayments[I]);
  System.SetLength(Fpayments, 0);
  SysUtils.FreeAndNil(Fcustomercard);
  inherited Destroy;
end;

destructor receipt.Destroy;
var
  I: Integer;
begin
  for I := 0 to System.Length(Fitems)-1 do
    SysUtils.FreeAndNil(Fitems[I]);
  System.SetLength(Fitems, 0);
  SysUtils.FreeAndNil(Fheader);
  inherited Destroy;
end;

destructor ccard.Destroy;
begin
  SysUtils.FreeAndNil(Fcustomercard);
  SysUtils.FreeAndNil(Fcustomer);
  inherited Destroy;
end;

initialization
  { wnposwsdl2PortType }
  InvRegistry.RegisterInterface(TypeInfo(wnposwsdl2PortType), 'urn:wnposwsdl2', 'windows-1252');
  InvRegistry.RegisterAllSOAPActions(TypeInfo(wnposwsdl2PortType), '|urn:wnposwsdl2#register_pos|urn:wnposwsdl2#query_card|urn:wnposwsdl2#register_customer|urn:wnposwsdl2#check_receipt|urn:wnposwsdl2#customertrans|urn:wnposwsdl2#spendingcheck');
  RemClassRegistry.RegisterXSInfo(TypeInfo(payments), 'urn:wnposwsdl2', 'payments');
  RemClassRegistry.RegisterXSInfo(TypeInfo(itemtransarray), 'urn:wnposwsdl2', 'itemtransarray');
  RemClassRegistry.RegisterXSInfo(TypeInfo(receiptarray), 'urn:wnposwsdl2', 'receiptarray');
  RemClassRegistry.RegisterXSClass(spendingcheck, 'urn:wnposwsdl2', 'spendingcheck');
  RemClassRegistry.RegisterXSInfo(TypeInfo(ccardarray), 'urn:wnposwsdl2', 'ccardarray');
  RemClassRegistry.RegisterXSClass(wnposreply, 'urn:wnposwsdl2', 'wnposreply');
  RemClassRegistry.RegisterXSClass(posregister, 'urn:wnposwsdl2', 'posregister');
  RemClassRegistry.RegisterXSClass(customercard, 'urn:wnposwsdl2', 'customercard');
  RemClassRegistry.RegisterXSClass(receiptheader, 'urn:wnposwsdl2', 'receiptheader');
  RemClassRegistry.RegisterXSClass(customertrans, 'urn:wnposwsdl2', 'customertrans');
  RemClassRegistry.RegisterXSClass(itemtrans, 'urn:wnposwsdl2', 'itemtrans');
  RemClassRegistry.RegisterXSClass(receipt, 'urn:wnposwsdl2', 'receipt');
  RemClassRegistry.RegisterXSClass(ccard, 'urn:wnposwsdl2', 'ccard');
  RemClassRegistry.RegisterXSClass(customer, 'urn:wnposwsdl2', 'customer');
  RemClassRegistry.RegisterExternalPropName(TypeInfo(customer), 'name_', '[ExtName="name"]');
  RemClassRegistry.RegisterXSClass(payment, 'urn:wnposwsdl2', 'payment');

end.
{code}
0
Christophe
8/5/2015 11:59:25 AM
I could write this web service with delphi as standalone.The problem is that WSDL. My service's WSDL have to similar with the WSDL at the bottom. Can I do my service's wsdl similar to wsdl at the bottom? If it is possible,how can I do?

I'm using Delphi XE4.
0
erkan
8/6/2015 1:42:33 PM
The Import WSDL Wizard has an option to generate server implementation instead of client implementation.
http://docwiki.embarcadero.com/RADStudio/XE8/en/Import_WSDL_Wizard

Also, command-line tool WSDLIMP.EXE has option -Os
http://docwiki.embarcadero.com/RADStudio/XE8/en/WSDLIMP.EXE,_the_Command_Line_WSDL_Import_Tool
0
Erwin
8/18/2015 8:16:50 PM
Reply:

Similar Artilces:

Problem upgrading web service client from Delphi 7 to Delphi XE
In trying to upgrade our web service client to Delphi XE we have now get a web service error of Invalid Format. When we examine the SOAP request we see the following differences from Delphi 7 vs Delphi XE In Delphi 7 we get <SomeStuff xmlns="" xsi:nil="true" /> In Delphi XE we get <SomeStuff xsi:nil="true" /> We have narrowed the failure down to these differences in the client request. Is there anyway to get Delphi XE to generate a SOAP request with the xmlns attribute set to blank as it used to be? Hello, > In trying to u...

Has anyone successfully used a Delphi web service client against an ENCRYPTED WCF web service server?
Has anyone successfully used a Delphi web service client against an ENCRYPTED WCF web service server? Which is to say, of course, that the URL would be starting with https. Anyone? ...

Delphi 2010 XML, SOAP and Web Services courseware manual published
Hi All, See also http://www.bobswart.nl/Weblog/Blog.aspx?RootId=5:4008 125 pages, 34,883 words, and several dozen screenshots make up revision 381 of my Delphi 2010 XML, SOAP and Web Services manual (see table of contents at http://www.ebob42.com/training/D2010XMLSOAP.pdf), which will be available for purchase starting this weekend from my webshop at http://www.ebob42.com/courseware Earlier this weekend, the PDF file will be sent free of charge to everyone who purchased my Delphi 2007 XML, SOAP and Web Services manual in PDF format directly from me (including support and u...

passing encrypted data in the SOAP headers from Delphi to an ASP.Net web service
Hi All, I was able to get some help with this in another group but no final answer. I've created an ASP.Net web service to provide shared capability to a number of our applications -- both Delphi client/server and ASP.Net web apps. We want to be able to restrict this web service to just our own applications and protect it from anyone who might "discover" it and try and use it. I've created a custom SOAP header which works just fine. I can use the web service from a Delphi app with no trouble. The problem is that I'd like to encrypt one of the attribute...

Delphi 2006 XML Validation w/ XSD Schemas by Consuming ASMX Web Service
Utilizing Delphi 2006, is there a straight forward method of validating a CCD and/or CCR xml with a corresponding schema? Here are some samples which work at http://xreg2.nist.gov/cda-validation/mu.html: - http://www.selectayacht.com/validation/NoInfoNoErrors.xml - http://www.selectayacht.com/validation/SomeContentNoErrors.xml - http://www.selectayacht.com/validation/LotsofContentNoErrors.xml Here is a sample with four errors: - http://www.selectayacht.com/validation/4errors.xml I am unable to achieve the same results however attempting to perform validatio...

Writing Standalone Web Server that serves Web Services in Delphi
Hi, I want to write web services. And I want to host these services in my own HTTP Server. Then All kind of clients may connect to my web server through my HTTP Server. Is there any component sets available in market? Regards. Many ways to do it. here are some http://www.ibm.com/developerworks/data/library/techarticle/0212cantu/0212cantu.html http://www.kehm.de/henrik/blog/files/a5019da836d29c3cee972f5f62b5a8bd-19.html http://www.componentsource.com/products/remobjects-sdk-bundle/summary.html Edited by: Indranil Bandyopadhyay on Feb 24, 2009 6:44 PM Gurcan YUCEL wrote: >...

Consuming a .NET web service in Delphi 2010 using a service reference
Hi, I've been asked to modify one of my existing applications (D2010 Win32) to interact with a web service written under VS2010/.Net 4. The information I have so far is :- "As communication is secured by .NET WsHttpBinding data encrypting, In order to consume it you have to add to your application a Service Reference (not a web reference) that joins the service available at the URL: http://ctm.mobilling.it/SmsComApi/Sms.svc . Assuming that the binding created in your app.confing is named "WSHttpBinding_ISms" you have to instantiate a client as shown below: {c...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Delphi web service and COM
We got a Delphi SOAP Server Application that is written in Delphi 2010, which is hosted within a IIS 7 server, running as a 32bit application. Within the service we like to call a function from a C# compiled DLL that has been COM enabled, through the function CreateOleObject. However calling CreateOleObject on this DLL results in following error: The system cannot find the file specified, ProgID: "XXX.YYY.ZZZ" The same call works when we run it from a Win32 desktop application written in Delphi. In both cases the C# assembly shares the same directory with the Delphi applic...

Any where to offer services as Delphi/Delphi for PHP freelance developer?
Hi, I'm a freelance Software Engineer. One of many that in current difficult days, is pushing for self-employment... offering services as Business Analyst and Developer, using Delphi, Delphi for PHP, MySQL, PostgreSQL. Any where in this forum or other you might know where to offer these services to the world? Thank you, Guillermo Guillermo, The Delphi for PHP forum does have For Hire and Wanted For Hire sections if you haven't seen those yet: http://forums.delphi-php.net/ Thanks. -Phil > {quote:title=Guillermo Najar wrote:}{quote} > Hi, > > I&#...

Consuming Web Service in Delphi 2009
I have used Delphi 2009 to WSDL import. The resulting unit is as follows; How do i consume this web service. All i need is some basic code to get me started. Please help. // ************************************************************************ // // The types declared in this file were generated from data read from the // WSDL File described below: // WSDL : http://41.215.25.243:8000/sap/bc/srt/rfc/sap/zfi_customer_balance?sap-client=555&wsdl=1.1 // >Import : http://41.215.25.243:8000/sap/bc/srt/rfc/sap/zfi_customer_balance?sap-client=555&wsdl=1.1>0 // Encoding : ...

SOAP webservice in Delphi. Best option?
Hello all, I need to implement a SOAP web service in Delphi (it will be an ISAPI) that will be under heavy load (=many concurrent calls). I'd like to know which would be the best ISAPI/SOAP framework available. My web service must do some very "expensive" initialization (load some huge XML files that cannot be shared between threads) and it would be nice if I could re-use those resources again in the next call, so it would be very nice if the framework could do thread pooling. Also, is the Delphi soap server wizard still "current", or is it deprecated? Kin...

Web Service not import in Delphi XE6
*Web Service Adress :* https://medula.sgk.gov.tr/medula/hastane/sevkIslemleriWS?wsdl II tried the following platforms.: Visual Studio, SoapUI, Storm. Running smoothly. But I'm getting error.with XE6! When I save to XML and replace schema location to HTTPS then web service import working. How can I solve this problem. ...

Creating REST web services with Delphi
Are you creating REST web services with Delphi? If yes, how? Using Indy and/or web broker components? I could not find any articles or posts on the web about this. Thanks -- Erick Sasse Erick Sasse wrote: > Are you creating REST web services with Delphi? > If yes, how? Using Indy and/or web broker components? > Marco Cantu would be a good person to ask. He talked to us about REST. -- - Eduardo In theory, there is no difference between theory and practice. But, in practice, there is. -- Jan L.A. van de Snepcheut Eduardo A. Salgado OneDomain, Inc. eas...

Web resources about - Delphi Soap Web Services with xsd shema - embarcadero.delphi.webservices

Public Broadcasting Service - Wikipedia, the free encyclopedia
... such as PBS NewsHour , Masterpiece , and Frontline . Since the mid-2000s, Roper polls commissioned by PBS have consistently placed the service ...

Microsoft Updates Bing Logo as Search Service Grows Up
... green "is easier to see over yellow," a Microsoft spokeswoman said, and because the new look displays well "across Windows devices and services." ...

Supreme Court won’t force DHS to reveal secret plan to cut cell service
... Information Center that demanded the Department of Homeland Security release the US government's secret plan to shutter mobile phone service ...

Behind David Bowie's Pioneering Internet Service BowieNet, Where the 'Sailor ...
BBC News Behind David Bowie's Pioneering Internet Service BowieNet, Where the 'Sailor ... Billboard The service presaged everything from 'Second ...

L Train may not run between Williamsburg and Manhattan for "years" due to proposed service repairs
L Train stop with Craig Finn ad Well here's very bad news for anyone who lives on the L line and likes to travel between Brooklyn and Manhattan: ...

How subscription video on-demand services like Netflix are contributing to the demise of pay-TV
... Every year, more viewers are ditching their expensive pay-TV subscriptions and opting instead for subscription video on-demand (SVOD) services ...

Secret Service agent paralyzed in crash gets married at hospital
Garrett FitzGerald, who suffered spinal cord injury in fatal N.H. crash, ties the knot at Massachusetts General Hospital

Park Service Perverts Groped Female Colleagues, Got Wrist Slaps
Grand Canyon District National Parks Service male staffers withheld food from female coworkers who declined their sexual advances, groped them, ...

Bruno Pizza to Beta Test Hot Dog Lunch Ahead of Full Service
... in-house. Bruno Pizza will "beta test" a hot dog-centric lunch menu in the coming weeks in anticipation of rolling out a full time lunch service ...

The CW network might get its own streaming service
As streaming deals with Netflix and Hulu are nearing their end, CBS and Time Warner are considering a new online service for their jointly-owned ...

Resources last updated: 1/13/2016 10:44:37 PM