2016-11-13 128 views
0

這是soap函數。php soap實體參數發送

CreateSales(字符串USEREMAIL,串爲userpass,串ApiKey,Entity.Sales銷售列表SalesItemEntity.Customer客戶Entity.Payment付款,INT BranchId,INT用戶ID)

Entity.Sales銷售 列表SalesItem Entity.Customer客戶 Entity.Customer客戶

如何發送值這個參數S'

我的示例代碼,

$result = $client->CreateSales(
    array( 
     "UserEmail" => $this->userEmail, 
     "UserPass" => $this->userPass, 
     "ApiKey" => $this->apikey, 
     "Sales" => $client->Sales(
      array(
       "SalesId" => $SalesId, 
       "DepartureRegionId" => $DepartureRegionId, 
       "DepartureDate" => $DepartureDate, 
       "DepartureTime" => $DepartureTime, 
       "ArrivalRegionId" => $ArrivalRegionId, 
       "TransferTypeId" => $TransferTypeId, 
       "PricelistId" => $PricelistId, 
       "PricelistIdLineId" => $PricelistIdLineId 
      ) 
     ), 
     "SalesItem" => $client->SalesItem(
      array(
       "BranchId" => $this->branchID, 
       "SalesDate" => $SalesDate , 
       "ArrivalRegionId" => $ArrivalRegionId, 
       "ArrivalDate" => $ArrivalDate, 
       "ArrivalTime" => $ArrivalTime, 
       "DepartureRegionId" => $DepartureRegionId, 
       "DepartureDate" => $DepartureDate, 
       "DepartureTime" => $DepartureTime, 
       "PaxCount" => $PaxCount, 
       "InfantCount" => $InfantCount, 
       "Notes" => $Notes, 
       "VehicleTypeId" => $VehicleTypeId, 
       "VehicleModelId" => $VehicleModelId, 
       "VehicleId" => $VehicleId, 
       "StatusTypeId" => $StatusTypeId, 
       "PricelistId" => $PricelistId, 
       "PricelistIdLineId" => $PricelistIdLineId, 
       "TransferTypeId" => $TransferTypeId, 
       "SalesTypeId" => $SalesTypeId, 
       "TransferWayTypeName" => $TransferWayTypeName, 
       "TransferDuration" => $TransferDuration, 


      )               
     ), 
     "Customer" => $client->Customer(
      array(
       "SalesId" => $SalesId, 
       "Name" => $Name, 
       "Gsm" => $Gsm, 
       "AlternativeGsm" => $AlternativeGsm, 
       "Email" => $Email, 
       "Adress" => $Adress, 
       "DepartureInformation" => $DepartureInformation, 
       "ArrivalInformation" => $ArrivalInformation, 
       "ReturnInformation" => $ReturnInformation, 
       "Note" => $Note 

      )          
     ), 
     "Payment" => $client->Payment(
      array("PaymentTypeId"=>2) 
     ), 
     "BranchId" => $this->branchID, 
     "UserId" => $this->userID, 
     ) 
    ); 
+1

請發表[最小,完整,可驗證的示例](http://stackoverflow.com/help/mcve),這樣我們就可以幫你。 –

回答

0

由於延,

我的問題我如何發送實體參數?

我soapUrl:http://sistem.transferofis.com/service/YurticiTransferService.svc?wsdl 架構:http://sistem.transferofis.com/service/YurticiTransferService.svc?xsd=xsd2

我用CreateSales功能,

CreateSales(字符串USEREMAIL,串爲userpass,串ApiKey,Entity.Sales銷售,簽單SalesItem,Entity.Customer客戶,實體。付款付款,int BranchId,int UserId)

沒問題的字符串和int參數。但是Entity.Sales Sales,Entity.Customer Customer,Entity.Payment Payment,如何發送值這個參數。

比如我嘗試CreateSales功能銷售:

        "Sales" => $client->Sales(
                 array(
                  "SalesId" => $SalesId, 
                  "DepartureRegionId" => $DepartureRegionId, 
                  "DepartureDate" => $DepartureDate, 
                  "DepartureTime" => $DepartureTime, 
                  "ArrivalRegionId" => $ArrivalRegionId, 
                  "TransferTypeId" => $TransferTypeId, 
                  "PricelistId" => $PricelistId, 
                  "PricelistIdLineId" => $PricelistIdLineId 
                 ) 
                ),