soapClient = new SoapClient(__DIR__ . '/Wsdl/geschaeftskundenversand-api-3.4.0.wsdl', [ 'login' => 'ewsp', 'password' => 'rZ*twrzJ5@wr&$', 'location' => self::SANDBOX_URL, 'trace' => 1, 'connection_timeout' => 30, 'classmap' => [ 'CreateShipmentOrderResponse' => CreateShipmentOrderResponse::class, 'CreationState' => CreationState::class, 'LabelData' => LabelData::class, 'Statusinformation' => Statusinformation::class, 'Version' => Version::class, ] ]); $authHeader = new SoapHeader(self::NAMESPACE_CIS, 'Authentification', [ 'user' => $user, 'signature' => $signature ]); $this->soapClient->__setSoapHeaders($authHeader); } public function CreateShipment(Shipment $shipment): CreateShipmentOrderResponse|string { $request = new CreateShipmentOrderRequest(); $request->Version = $this->getVersion(); $request->ShipmentOrder = new ShipmentOrder(); $request->ShipmentOrder->Shipment = $shipment; $request->ShipmentOrder->sequenceNumber = '1'; $request->labelResponseType = "B64"; try { $response = $this->soapClient->createShipmentOrder($request); return $response; } catch (\SoapFault $e) { return $e->getMessage(); } } private function getVersion() { $version = new Version(); $version->majorRelease = '3'; $version->minorRelease = '4'; return $version; } }