发送SOAP请求时出现PHP Parse错误

时间:2015-03-07 20:03:28

标签: php soap

我正在尝试将此数组发送到https://www.averittexpress.com/public/technology/wsdl/LTLRateQuoteService.wsdl,并不断收到大量错误,例如

PHP Parse error:  syntax error, unexpected 'Object' (T_STRING), expecting ')' in /Applications/MAMP/htdocs/averitt13.php on line 25 

syntax error, unexpected '=>' (T_DOUBLE_ARROW).

有人可以帮我纠正这个解析错误。这是代码:

$params = Array
(
    [0] => AverittStructGetLTLRate Object
        (
            [arg0] => AverittStructArg0 Object
                (
                    [AccountNumber] => *****
                    [OriginCity] => Randleman
                    [OriginState] => NC
                    [OriginZip] => 27317
                    [DestinationCity] => Miami
                    [DestinationState] => FL
                    [DestinationZip] => 33101
                    [ShipDate] => 03/07/2015
                    [CustomerType] => Shipper
                    [PaymentType] => Prepaid
                    [ShipmentInfo] => AverittStructShipmentInfo Object
                        (
                            [NumPieces] =>
                            [NumHandlingUnits] =>
                            [CubicFeet] =>
                            [Items] => AverittStructItems Object
                                (
                                    [ShipmentClass] => 60
                                    [ShipmentWeight] => 500
                                    [Units] =>
                                    [Description] =>
                                    [NmfcNumber] =>
                                    [NmfcSubNumber] =>
                                )
                            [TotalItem] =>
                            [TotalWeight] =>
                            [Accessorial] => AverittStructAccessorial Object
                                (
                                    [ArrivalNotify] => 1
                                    [ConventionCenterDelivery] => 0
                                    [ConstructionSiteDelivery] => 0
                                    [InsideDelivery] => 0
                                    [Liftgate] => 0
                                    [Hazmat] => 0
                                    [ResidentialDelivery] => 0
                                    [Non_CommercialPickupDelivery] => 0
                                    [StandardLTLGuarantee] => 0
                                    [SecurityInspection] => 0
                                    [Non-CommercialPickupDelivery] => 0
                                )
                        )
                )
        )

1 个答案:

答案 0 :(得分:0)

你在代码块的末尾错过了一个右括号。

相关问题