|
|
|
Call Web Service แล้ว Result เป็นหน้าว่างๆ ช่วยด้วยค่ะ งานด่วนมาก |
|
|
|
|
|
|
|
ลองใช้โปรแกรมสำหรับทดสอบ webservice แล้วสามารถ connect ได้ค่ะ แล้วได้หน้าตาของ input มาแล้ว แต่พอลองใช้ php เรียกตามที่เคยทำก่อนหน้านี้ ผลออกมาเป็นหน้าว่างๆ เลยเดาว่า input น่าจะไม่ตรงกัน ลองเปลี่ยนส่ง array หลายแบบก็เหมือนเดิม ให้มีคำแนะนำบ้างค่ะ ช่วยหน่อยค่ะ เครียดมาก T__T
Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:SetNewCase>
<!--Optional:-->
<tem:UserName>?</tem:UserName>
<!--Optional:-->
<tem:Password>?</tem:Password>
<tem:CaseDetails>
<tem:ASPLoginDetails>
<!--Optional:-->
<tem:UserName>?</tem:UserName>
<!--Optional:-->
<tem:Password>?</tem:Password>
</tem:ASPLoginDetails>
<tem:ProductDetails>
<!--Optional:-->
<tem:SerialNumber>?</tem:SerialNumber>
<!--Optional:-->
<tem:PartNumber>?</tem:PartNumber>
<!--Optional:-->
<tem:ProductRemarks>?</tem:ProductRemarks>
<!--Optional:-->
<tem:ProductBrand>?</tem:ProductBrand>
<!--Optional:-->
<tem:SNID>?</tem:SNID>
<!--Optional:-->
<tem:IMEINumber1>?</tem:IMEINumber1>
<!--Optional:-->
<tem:IMEINumber2>?</tem:IMEINumber2>
</tem:ProductDetails>
<!--Optional:-->
<tem:CaseID>?</tem:CaseID>
<!--Optional:-->
<tem:purchasedate>?</tem:purchasedate>
<!--Optional:-->
<tem:ASPReferenceNumber>?</tem:ASPReferenceNumber>
<!--Optional:-->
<tem:CaseType>?</tem:CaseType>
<!--Optional:-->
<tem:CaseStatus>?</tem:CaseStatus>
<!--Optional:-->
<tem:CreatedDateTime>?</tem:CreatedDateTime>
<!--Optional:-->
<tem:WarrantyType>?</tem:WarrantyType>
<!--Optional:-->
<tem:AssignedTo>?</tem:AssignedTo>
<!--Optional:-->
<tem:ProblemDescription>?</tem:ProblemDescription>
<!--Optional:-->
<tem:TestsCarried>?</tem:TestsCarried>
<!--Optional:-->
<tem:Priority>?</tem:Priority>
<!--Optional:-->
<tem:Remarks>?</tem:Remarks>
<!--Optional:-->
<tem:Solution>?</tem:Solution>
<!--Optional:-->
<tem:ReferenceNumber>?</tem:ReferenceNumber>
<!--Optional:-->
<tem:DealerName>?</tem:DealerName>
<!--Optional:-->
<tem:SystemPassword>?</tem:SystemPassword>
<tem:Customer>
<!--Optional:-->
<tem:CustomerID>?</tem:CustomerID>
<!--Optional:-->
<tem:Name>?</tem:Name>
<!--Optional:-->
<tem:Address1>?</tem:Address1>
<!--Optional:-->
<tem:Address2>?</tem:Address2>
<!--Optional:-->
<tem:Code>?</tem:Code>
<!--Optional:-->
<tem:City>?</tem:City>
<!--Optional:-->
<tem:Province>?</tem:Province>
<!--Optional:-->
<tem:Remarks>?</tem:Remarks>
<!--Optional:-->
<tem:Country>?</tem:Country>
<!--Optional:-->
<tem:Zipcode>?</tem:Zipcode>
<!--Optional:-->
<tem:PhoneNo>?</tem:PhoneNo>
<!--Optional:-->
<tem:MobileNo>?</tem:MobileNo>
<!--Optional:-->
<tem:Email>?</tem:Email>
<!--Optional:-->
<tem:Fax>?</tem:Fax>
<!--Optional:-->
<tem:FiscalCode>?</tem:FiscalCode>
<!--Optional:-->
<tem:VatCode>?</tem:VatCode>
<!--Optional:-->
<tem:ContactPerson>?</tem:ContactPerson>
<!--Optional:-->
<tem:NewContactPerson>?</tem:NewContactPerson>
<!--Optional:-->
<tem:Language>?</tem:Language>
<!--Optional:-->
<tem:Type>?</tem:Type>
<tem:Shipper>
<!--Optional:-->
<tem:Name>?</tem:Name>
<!--Optional:-->
<tem:ContactPerson>?</tem:ContactPerson>
<!--Optional:-->
<tem:Address1>?</tem:Address1>
<!--Optional:-->
<tem:Address2>?</tem:Address2>
<!--Optional:-->
<tem:City>?</tem:City>
<!--Optional:-->
<tem:Province>?</tem:Province>
<!--Optional:-->
<tem:Country>?</tem:Country>
<!--Optional:-->
<tem:Zipcode>?</tem:Zipcode>
<!--Optional:-->
<tem:FiscalCode>?</tem:FiscalCode>
<!--Optional:-->
<tem:Email>?</tem:Email>
<!--Optional:-->
<tem:PhoneNo>?</tem:PhoneNo>
<!--Optional:-->
<tem:MobileNo>?</tem:MobileNo>
<!--Optional:-->
<tem:Fax>?</tem:Fax>
</tem:Shipper>
</tem:Customer>
<!--Optional:-->
<tem:AttachmentDetails>
<!--Zero or more repetitions:-->
<tem:Attachments>
<!--Optional:-->
<tem:FileName>?</tem:FileName>
<!--Optional:-->
<tem:FileType>?</tem:FileType>
<!--Optional:-->
<tem:FileData>?</tem:FileData>
</tem:Attachments>
</tem:AttachmentDetails>
<!--Optional:-->
<tem:FailureDetails>
<!--Zero or more repetitions:-->
<tem:Failures>
<!--Optional:-->
<tem:FailureCode>?</tem:FailureCode>
</tem:Failures>
</tem:FailureDetails>
</tem:CaseDetails>
</tem:SetNewCase>
</soapenv:Body>
</soapenv:Envelope>
======= php input =========
Code (PHP)
include("library-webservice/nusoap.php");
$proxyhost = isset($_POST["proxyhost"]) ? $_POST["proxyhost"] : "";
$proxyport = isset($_POST["proxyport"]) ? $_POST["proxyport"] : "";
$proxyusername = isset($_POST["proxyusername"]) ? $_POST["proxyusername"] : "";
$proxypassword = isset($_POST["proxypassword"]) ? $_POST["proxypassword"] : "";
$client = new nusoap_client("http://asptraining.acer-euro.com/aspedi_uat/caseinformation.asmx?WSDL", 'wsdl',
$proxyhost, $proxyport, $proxyusername,$proxypassword);
$ASPLoginDetails = array(
"UserName" => $UserName2,
"Password" => $Password2
);
$ProductDetails = array("SerialNumber" => $SerialNumber,
"PartNumber" =>$PartNumber,
"ProductRemarks" =>$ProductRemarks,
"ProductBrand" => $ProductBrand,
"SNID" => $SNID,
"IMEINumber1" => $IMEINumber1,
"IMEINumber2" => $IMEINumber2
);
$Customer = array("CustomerID" => $CustomerID,
"Name" => $Name,
"Address1" => $Address1,
"Address2" => $Address2,
"Code" => $Code,
"City" => $City,
"Province" => $Province,
"Remarks" => $Remarks,
"Country" => $Country,
"Zipcode" => $Zipcode,
"PhoneNo" => $PhoneNo,
"MobileNo" => $MobileNo,
"Email" => $Email,
"Fax" => $Fax,
"FiscalCode" => $FiscalCode,
"VatCode" => $VatCode,
"ContactPerson" => $ContactPerson,
"NewContactPerson" => $NewContactPerson,
"Language" => $Language,
"Type" => $Type,
"Shipper" => array("Name" => $Name2,
"ContactPerson" => $ContactPerson2,
"Address1" => $Address1_2,
"Address2" => $Address2_2,
"City" => $City2,
"Province" => $Province2,
"Country" => $Country2,
"Zipcode" => $Zipcode2,
"FiscalCode" => $FiscalCode2,
"Email" => $Email2,
"PhoneNo" => $PhoneNo2,
"MobileNo" => $MobileNo2,
"Fax" => $Fax2
)
);
$Attachments = array("FileName" => $FileName,
"FileType" => $FileType,
"FileData" => $FileData);
$AttachmentDetails= array("Attachments" =>$Attachments);
$Failures= array("FailureCode" => $FailureCode);
$FailureDetails = array("Failures" => $Failures);
$CaseDetails =array("ASPLoginDetails" =>$ASPLoginDetails,
"ProductDetails" =>$ProductDetails,
"CaseID" => $CaseID,
"purchasedate" => $purchasedate,
"ASPReferenceNumber" => $ASPReferenceNumber,
"CaseType" => $CaseType,
"CaseStatus" =>$CaseStatus,
"CreatedDateTime" => $CreatedDateTime,
"WarrantyType" => $WarrantyType,
"AssignedTo" => $AssignedTo,
"ProblemDescription" => $ProblemDescription,
"TestsCarried" => $TestsCarried,
"Priority" => $Priority,
"Remarks" => $Remarks,
"Solution" => $Solution,
"ReferenceNumber" =>$ReferenceNumber,
"DealerName" => $DealerName,
"SystemPassword" => $SystemPassword,
"Customer" => $Customer,
"AttachmentDetails" =>$AttachmentDetails,
"FailureDetails" =>$FailureDetails);
$SetNewCase = array("UserName" => $UserName,
"Password" => $Password,
"CaseDetails" => $CaseDetails
);
$result = $client->call('SetNewCase', array($SetNewCase), '', '', false, true);
Tag : PHP
|
|
|
|
|
|
Date :
2012-07-07 17:14:50 |
By :
auu |
View :
993 |
Reply :
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
หมายถึง $result ได้ค่าว่างเหรอครับ
|
|
|
|
|
Date :
2012-07-07 18:41:20 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Web Service หาข้อผิดพลาดได้ยากนิดหนึ่งครับ คุณลอง ๆ ดูว่าส่งค่าอะไรผิดหรือเปล่า ตัว Server ถึงไม่ส่งกลับครับ
|
|
|
|
|
Date :
2012-07-08 06:42:18 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตรวจสอบยากครับ
|
|
|
|
|
Date :
2012-07-09 06:28:11 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|