light">+ <s:annotation> 191
+                    <s:documentation>This contains transaction usage details relevant for billing purposes in StopTransaction.req PDU</s:documentation>
192
+                </s:annotation>
193
+                <s:sequence>
194
+                    <s:element name="values" type="tns:MeterValue" minOccurs="0" maxOccurs="unbounded"/>
195
+                </s:sequence>
196
+            </s:complexType>
197
+
198
+            <s:complexType name="StopTransactionRequest">
199
+                <s:annotation>
200
+                    <s:documentation>Defines the StopTransaction.req PDU</s:documentation>
201
+                </s:annotation>
202
+                <s:sequence>
203
+                    <s:element name="transactionId" type="s:int" minOccurs="1" maxOccurs="1"/>
204
+                    <s:element name="idTag" type="tns:IdToken" minOccurs="0" maxOccurs="1"/>
205
+                    <s:element name="timestamp" type="s:dateTime" minOccurs="1" maxOccurs="1"/>
206
+                    <s:element name="meterStop" type="s:int" minOccurs="1" maxOccurs="1"/>
207
+                    <s:element name="transactionData" type="tns:TransactionData" minOccurs="0" maxOccurs="unbounded"/>
208
+                </s:sequence>
209
+            </s:complexType>
210
+
211
+            <s:complexType name="StopTransactionResponse">
212
+                <s:annotation>
213
+                    <s:documentation>Defines the StopTransaction.conf PDU</s:documentation>
214
+                </s:annotation>
215
+                <s:sequence>
216
+                    <s:element name="idTagInfo" type="tns:IdTagInfo" minOccurs="0" maxOccurs="1"/>
217
+                </s:sequence>
218
+            </s:complexType>
219
+
220
+            <s:complexType name="HeartbeatRequest">
221
+                <s:annotation>
222
+                    <s:documentation>Defines the Heartbeat.req PDU</s:documentation>
223
+                </s:annotation>
224
+            </s:complexType>
225
+
226
+            <s:complexType name="HeartbeatResponse">
227
+                <s:annotation>
228
+                    <s:documentation>Defines the Heartbeat.conf PDU</s:documentation>
229
+                </s:annotation>
230
+                <s:sequence>
231
+                    <s:element name="currentTime" type="s:dateTime" minOccurs="1" maxOccurs="1"/>
232
+                </s:sequence>
233
+            </s:complexType>
234
+
235
+            <s:simpleType name="ReadingContext">
236
+                <s:restriction base="s:string">
237
+                    <s:enumeration value="Interruption.Begin"/>
238
+                    <s:enumeration value="Interruption.End"/>
239
+                    <s:enumeration value="Sample.Clock"/>
240
+                    <s:enumeration value="Sample.Periodic"/>
241
+                    <s:enumeration value="Transaction.Begin"/>
242
+                    <s:enumeration value="Transaction.End"/>
243
+                </s:restriction>
244
+            </s:simpleType>
245
+
246
+            <s:simpleType name="Measurand">
247
+                <s:restriction base="s:string">
248
+                    <s:enumeration value="Energy.Active.Export.Register"/>
249
+                    <s:enumeration value="Energy.Active.Import.Register"/>
250
+                    <s:enumeration value="Energy.Reactive.Export.Register"/>
251
+                    <s:enumeration value="Energy.Reactive.Import.Register"/>
252
+                    <s:enumeration value="Energy.Active.Export.Interval"/>
253
+                    <s:enumeration value="Energy.Active.Import.Interval"/>
254
+                    <s:enumeration value="Energy.Reactive.Export.Interval"/>
255
+                    <s:enumeration value="Energy.Reactive.Import.Interval"/>
256
+                    <s:enumeration value="Power.Active.Export"/>
257
+                    <s:enumeration value="Power.Active.Import"/>
258
+                    <s:enumeration value="Power.Reactive.Export"/>
259
+                    <s:enumeration value="Power.Reactive.Import"/>
260
+                    <s:enumeration value="Current.Export"/>
261
+                    <s:enumeration value="Current.Import"/>
262
+                    <s:enumeration value="Voltage"/>
263
+                    <s:enumeration value="Temperature"/>
264
+                </s:restriction>
265
+            </s:simpleType>
266
+
267
+            <s:simpleType name="ValueFormat">
268
+                <s:restriction base="s:string">
269
+                    <s:enumeration value="Raw"/>
270
+                    <s:enumeration value="SignedData"/>
271
+                </s:restriction>
272
+            </s:simpleType>
273
+
274
+            <s:simpleType name="UnitOfMeasure">
275
+                <s:restriction base="s:string">
276
+                    <s:enumeration value="Wh"/>
277
+                    <s:enumeration value="kWh"/>
278
+                    <s:enumeration value="varh"/>
279
+                    <s:enumeration value="kvarh"/>
280
+                    <s:enumeration value="W"/>
281
+                    <s:enumeration value="kW"/>
282
+                    <s:enumeration value="var"/>
283
+                    <s:enumeration value="kvar"/>
284
+                    <s:enumeration value="Amp"/>
285
+                    <s:enumeration value="Volt"/>
286
+                    <s:enumeration value="Celsius"/>
287
+                </s:restriction>
288
+            </s:simpleType>
289
+
290
+            <s:simpleType name="Location">
291
+                <s:restriction base="s:string">
292
+                    <s:enumeration value="Inlet"/>
293
+                    <s:enumeration value="Outlet"/>
294
+                    <s:enumeration value="Body"/>
295
+                </s:restriction>
296
+            </s:simpleType>
297
+
298
+            <s:complexType name="MeterValue">
299
+                <s:annotation>
300
+                    <s:documentation>Defines single value of the meter-value-value</s:documentation>
301
+                </s:annotation>
302
+                <s:sequence>
303
+                    <s:element name="timestamp" type="s:dateTime"/>
304
+                    <s:element name="value" minOccurs="1" maxOccurs="unbounded">
305
+                        <s:complexType>
306
+                            <s:simpleContent>
307
+                                <s:extension base="s:string">
308
+                                    <s:attribute name="context" type="tns:ReadingContext" use="optional"/> <!-- default="Sample.Periodic" -->
309
+                                    <s:attribute name="format" type="tns:ValueFormat" use="optional"/> <!-- default="Raw" -->
310
+                                    <s:attribute name="measurand" type="tns:Measurand" use="optional"/> <!-- default="Energy.Active.Import.Register" -->
311
+                                    <s:attribute name="location" type="tns:Location" use="optional"/> <!-- default="Outlet" -->
312
+                                    <s:attribute name="unit" type="tns:UnitOfMeasure" use="optional"/> <!-- default="Wh" -->
313
+                                </s:extension>
314
+                            </s:simpleContent>
315
+                        </s:complexType>
316
+                    </s:element>
317
+                </s:sequence>
318
+            </s:complexType>
319
+
320
+            <s:complexType name="MeterValuesRequest">
321
+                <s:annotation>
322
+                    <s:documentation>Defines the MeterValues.req PDU</s:documentation>
323
+                </s:annotation>
324
+                <s:sequence>
325
+                    <s:element name="connectorId" type="s:int" minOccurs="1" maxOccurs="1"/>
326
+                    <s:element name="transactionId" type="s:int" minOccurs="0" maxOccurs="1"/>
327
+                    <s:element name="values" type="tns:MeterValue" minOccurs="0" maxOccurs="unbounded"/>
328
+                </s:sequence>
329
+            </s:complexType>
330
+
331
+            <s:complexType name="MeterValuesResponse">
332
+                <s:annotation>
333
+                    <s:documentation>Defines the MeterValues.conf PDU</s:documentation>
334
+                </s:annotation>
335
+            </s:complexType>
336
+
337
+            <s:complexType name="BootNotificationRequest">
338
+                <s:annotation>
339
+                    <s:documentation>Defines the BootNotification.req PDU</s:documentation>
340
+                </s:annotation>
341
+                <s:sequence>
342
+                    <s:element name="chargePointVendor" type="tns:ChargePointVendor" minOccurs="1" maxOccurs="1"/>
343
+                    <s:element name="chargePointModel" type="tns:ChargePointModel" minOccurs="1" maxOccurs="1"/>
344
+                    <s:element name="chargePointSerialNumber" type="tns:ChargePointSerialNumber" minOccurs="0" maxOccurs="1"/>
345
+                    <s:element name="chargeBoxSerialNumber" type="tns:ChargeBoxSerialNumber" minOccurs="0" maxOccurs="1"/>
346
+                    <s:element name="firmwareVersion" type="tns:FirmwareVersion" minOccurs="0" maxOccurs="1"/>
347
+                    <s:element name="iccid" type="tns:IccidString" minOccurs="0" maxOccurs="1"/>
348
+                    <s:element name="imsi" type="tns:ImsiString" minOccurs="0" maxOccurs="1"/>
349
+                    <s:element name="meterType" type="tns:MeterType" minOccurs="0" maxOccurs="1"/>
350
+                    <s:element name="meterSerialNumber" type="tns:MeterSerialNumber" minOccurs="0" maxOccurs="1"/>
351
+                </s:sequence>
352
+            </s:complexType>
353
+
354
+            <s:simpleType name="RegistrationStatus">
355
+                <s:annotation>
356
+                    <s:documentation>Defines the registration-status-value</s:documentation>
357
+                </s:annotation>
358
+                <s:restriction base="s:string">
359
+                    <s:enumeration value="Accepted"/>
360
+                    <s:enumeration value="Rejected"/>
361
+                </s:restriction>
362
+            </s:simpleType>
363
+
364
+            <s:complexType name="BootNotificationResponse">
365
+                <s:annotation>
366
+                    <s:documentation>Defines the BootNotification.conf PDU</s:documentation>
367
+                </s:annotation>
368
+                <s:sequence>
369
+                    <s:element name="status" type="tns:RegistrationStatus" minOccurs="1" maxOccurs="1"/>
370
+                    <s:element name="currentTime" type="s:dateTime" minOccurs="1" maxOccurs="1"/>
371
+                    <s:element name="heartbeatInterval" type="s:int" minOccurs="1" maxOccurs="1"/>
372
+                </s:sequence>
373
+            </s:complexType>
374
+
375
+            <s:simpleType name="ChargePointErrorCode">
376
+                <s:annotation>
377
+                    <s:documentation>Defines the charge-point-error-value</s:documentation>
378
+                </s:annotation>
379
+                <s:restriction base="s:string">
380
+                    <s:enumeration value="ConnectorLockFailure"/>
381
+                    <s:enumeration value="HighTemperature"/>
382
+                    <s:enumeration value="Mode3Error"/>
383
+                    <s:enumeration value="NoError"/>
384
+                    <s:enumeration value="PowerMeterFailure"/>
385
+                    <s:enumeration value="PowerSwitchFailure"/>
386
+                    <s:enumeration value="ReaderFailure"/>
387
+                    <s:enumeration value="ResetFailure"/>
388
+                    <s:enumeration value="GroundFailure"/>
389
+                    <s:enumeration value="OverCurrentFailure"/>
390
+                    <s:enumeration value="UnderVoltage"/>
391
+                    <s:enumeration value="WeakSignal"/>
392
+                    <s:enumeration value="OtherError"/>
393
+                </s:restriction>
394
+            </s:simpleType>
395
+
396
+            <s:simpleType name="ChargePointStatus">
397
+                <s:annotation>
398
+                    <s:documentation>Defines the charge-point-status-value</s:documentation>
399
+                </s:annotation>
400
+                <s:restriction base="s:string">
401
+                    <s:enumeration value="Available"/>
402
+                    <s:enumeration value="Occupied"/>
403
+                    <s:enumeration value="Faulted"/>
404
+                    <s:enumeration value="Unavailable"/>
405
+                    <s:enumeration value="Reserved"/>
406
+                </s:restriction>
407
+            </s:simpleType>
408
+
409
+            <s:complexType name="StatusNotificationRequest">
410
+                <s:annotation>
411
+                    <s:documentation>Defines the StatusNotification.req PDU</s:documentation>
412
+                </s:annotation>
413
+                <s:sequence>
414
+                    <s:element name="connectorId" type="s:int" minOccurs="1" maxOccurs="1"/>
415
+                    <s:element name="status" type="tns:ChargePointStatus" minOccurs="1" maxOccurs="1"/>
416
+                    <s:element name="errorCode" type="tns:ChargePointErrorCode" minOccurs="1" maxOccurs="1"/>
417
+                    <s:element name="info" type="s:string" minOccurs="0" maxOccurs="1"/>
418
+                    <s:element name="timestamp" type="s:dateTime" minOccurs="0" maxOccurs="1"/>
419
+                    <s:element name="vendorId" type="s:string" minOccurs="0" maxOccurs="1"/>
420
+                    <s:element name="vendorErrorCode" type="s:string" minOccurs="0" maxOccurs="1"/>
421
+                </s:sequence>
422
+            </s:complexType>
423
+
424
+            <s:complexType name="StatusNotificationResponse">
425
+                <s:annotation>
426
+                    <s:documentation>Defines the StatusNotification.conf PDU</s:documentation>
427
+                </s:annotation>
428
+            </s:complexType>
429
+
430
+            <s:simpleType name="FirmwareStatus">
431
+                <s:annotation>
432
+                    <s:documentation>Defines the firmware-status-value</s:documentation>
433
+                </s:annotation>
434
+                <s:restriction base="s:string">
435
+                    <s:enumeration value="Downloaded"/>
436
+                    <s:enumeration value="DownloadFailed"/>
437
+                    <s:enumeration value="InstallationFailed"/>
438
+                    <s:enumeration value="Installed"/>
439
+                </s:restriction>
440
+            </s:simpleType>
441
+
442
+            <s:complexType name="FirmwareStatusNotificationRequest">
443
+                <s:annotation>
444
+                    <s:documentation>Defines the FirmwareStatusNotification.req PDU</s:documentation>
445
+                </s:annotation>
446
+                <s:sequence>
447
+                    <s:element name="status" type="tns:FirmwareStatus" minOccurs="1" maxOccurs="1"/>
448
+                </s:sequence>
449
+            </s:complexType>
450
+
451
+            <s:complexType name="FirmwareStatusNotificationResponse">
452
+                <s:annotation>
453
+                    <s:documentation>Defines the FirmwareStatusNotification.conf PDU</s:documentation>
454
+                </s:annotation>
455
+            </s:complexType>
456
+
457
+            <s:simpleType name="DiagnosticsStatus">
458
+                <s:annotation>
459
+                    <s:documentation>Defines the diagnostics-status-value</s:documentation>
460
+                </s:annotation>
461
+                <s:restriction base="s:string">
462
+                    <s:enumeration value="Uploaded"/>
463
+                    <s:enumeration value="UploadFailed"/>
464
+                </s:restriction>
465
+            </s:simpleType>
466
+
467
+            <s:complexType name="DiagnosticsStatusNotificationRequest">
468
+                <s:annotation>
469
+                    <s:documentation>Defines the DiagnosticsStatusNotification.req PDU</s:documentation>
470
+                </s:annotation>
471
+                <s:sequence>
472
+                    <s:element name="status" type="tns:DiagnosticsStatus" minOccurs="1" maxOccurs="1"/>
473
+                </s:sequence>
474
+            </s:complexType>
475
+
476
+            <s:complexType name="DiagnosticsStatusNotificationResponse">
477
+                <s:annotation>
478
+                    <s:documentation>Defines the DiagnosticsStatusNotification.conf PDU</s:documentation>
479
+                </s:annotation>
480
+            </s:complexType>
481
+
482
+            <s:complexType name="DataTransferRequest">
483
+                <s:annotation>
484
+                    <s:documentation>Defines the DataTransfer.req PDU</s:documentation>
485
+                </s:annotation>
486
+                <s:sequence>
487
+                    <s:element name="vendorId" type="s:string" minOccurs="1" maxOccurs="1"/>
488
+                    <s:element name="messageId" type="s:string" minOccurs="0" maxOccurs="1"/>
489
+                    <s:element name="data" type="s:string" minOccurs="0" maxOccurs="1"/>
490
+                </s:sequence>
491
+            </s:complexType>
492
+
493
+            <s:simpleType name="DataTransferStatus">
494
+                <s:annotation>
495
+                    <s:documentation>Defines the status returned in DataTransfer.conf</s:documentation>
496
+                </s:annotation>
497
+                <s:restriction base="s:string">
498
+                    <s:enumeration value="Accepted"/>
499
+                    <s:enumeration value="Rejected"/>
500
+                    <s:enumeration value="UnknownMessageId"/>
501
+                    <s:enumeration value="UnknownVendorId"/>
502
+                </s:restriction>
503
+            </s:simpleType>
504
+
505
+            <s:complexType name="DataTransferResponse">
506
+                <s:annotation>
507
+                    <s:documentation>Defines the DataTransfer.conf PDU</s:documentation>
508
+                </s:annotation>
509
+                <s:sequence>
510
+                    <s:element name="status" type="tns:DataTransferStatus" minOccurs="1" maxOccurs="1"/>
511
+                    <s:element name="data" type="s:string" minOccurs="0" maxOccurs="1"/>
512
+                </s:sequence>
513
+            </s:complexType>
514
+
515
+            <s:element name="chargeBoxIdentity" type="s:string"/>
516
+            <s:element name="authorizeRequest" type="tns:AuthorizeRequest"/>
517
+            <s:element name="authorizeResponse" type="tns:AuthorizeResponse"/>
518
+            <s:element name="startTransactionRequest" type="tns:StartTransactionRequest"/>
519
+            <s:element name="startTransactionResponse" type="tns:StartTransactionResponse"/>
520
+            <s:element name="stopTransactionRequest" type="tns:StopTransactionRequest"/>
521
+            <s:element name="stopTransactionResponse" type="tns:StopTransactionResponse"/>
522
+            <s:element name="heartbeatRequest" type="tns:HeartbeatRequest"/>
523
+            <s:element name="heartbeatResponse" type="tns:HeartbeatResponse"/>
524
+            <s:element name="meterValuesRequest" type="tns:MeterValuesRequest"/>
525
+            <s:element name="meterValuesResponse" type="tns:MeterValuesResponse"/>
526
+            <s:element name="bootNotificationRequest" type="tns:BootNotificationRequest"/>
527
+            <s:element name="bootNotificationResponse" type="tns:BootNotificationResponse"/>
528
+            <s:element name="statusNotificationRequest" type="tns:StatusNotificationRequest"/>
529
+            <s:element name="statusNotificationResponse" type="tns:StatusNotificationResponse"/>
530
+            <s:element name="firmwareStatusNotificationRequest" type="tns:FirmwareStatusNotificationRequest"/>
531
+            <s:element name="firmwareStatusNotificationResponse" type="tns:FirmwareStatusNotificationResponse"/>
532
+            <s:element name="diagnosticsStatusNotificationRequest" type="tns:DiagnosticsStatusNotificationRequest"/>
533
+            <s:element name="diagnosticsStatusNotificationResponse" type="tns:DiagnosticsStatusNotificationResponse"/>
534
+            <s:element name="dataTransferRequest" type="tns:DataTransferRequest"/>
535
+            <s:element name="dataTransferResponse" type="tns:DataTransferResponse"/>
536
+        </s:schema>
537
+    </wsdl:types>
538
+    <wsdl:message name="Header">
539
+        <wsdl:part name="ChargeBoxIdentity" element="tns:chargeBoxIdentity"/>
540
+    </wsdl:message>
541
+    <wsdl:message name="AuthorizeInput">
542
+        <wsdl:part name="parameters" element="tns:authorizeRequest"/>
543
+    </wsdl:message>
544
+    <wsdl:message name="AuthorizeOutput">
545
+        <wsdl:part name="parameters" element="tns:authorizeResponse"/>
546
+    </wsdl:message>
547
+    <wsdl:message name="StartTransactionInput">
548
+        <wsdl:part name="parameters" element="tns:startTransactionRequest"/>
549
+    </wsdl:message>
550
+    <wsdl:message name="StartTransactionOutput">
551
+        <wsdl:part name="parameters" element="tns:startTransactionResponse"/>
552
+    </wsdl:message>
553
+    <wsdl:message name="StopTransactionInput">
554
+        <wsdl:part name="parameters" element="tns:stopTransactionRequest"/>
555
+    </wsdl:message>
556
+    <wsdl:message name="StopTransactionOutput">
557
+        <wsdl:part name="parameters" element="tns:stopTransactionResponse"/>
558
+    </wsdl:message>
559
+    <wsdl:message name="HeartbeatInput">
560
+        <wsdl:part name="parameters" element="tns:heartbeatRequest"/>
561
+    </wsdl:message>
562
+    <wsdl:message name="HeartbeatOutput">
563
+        <wsdl:part name="parameters" element="tns:heartbeatResponse"/>
564
+    </wsdl:message>
565
+    <wsdl:message name="MeterValuesInput">
566
+        <wsdl:part name="parameters" element="tns:meterValuesRequest"/>
567
+    </wsdl:message>
568
+    <wsdl:message name="MeterValuesOutput">
569
+        <wsdl:part name="parameters" element="tns:meterValuesResponse"/>
570
+    </wsdl:message>
571
+    <wsdl:message name="BootNotificationInput">
572
+        <wsdl:part name="parameters" element="tns:bootNotificationRequest"/>
573
+    </wsdl:message>
574
+    <wsdl:message name="BootNotificationOutput">
575
+        <wsdl:part name="parameters" element="tns:bootNotificationResponse"/>
576
+    </wsdl:message>
577
+    <wsdl:message name="StatusNotificationInput">
578
+        <wsdl:part name="parameters" element="tns:statusNotificationRequest"/>
579
+    </wsdl:message>
580
+    <wsdl:message name="StatusNotificationOutput">
581
+        <wsdl:part name="parameters" element="tns:statusNotificationResponse"/>
582
+    </wsdl:message>
583
+    <wsdl:message name="FirmwareStatusNotificationInput">
584
+        <wsdl:part name="parameters" element="tns:firmwareStatusNotificationRequest"/>
585
+    </wsdl:message>
586
+    <wsdl:message name="FirmwareStatusNotificationOutput">
587
+        <wsdl:part name="parameters" element="tns:firmwareStatusNotificationResponse"/>
588
+    </wsdl:message>
589
+    <wsdl:message name="DiagnosticsStatusNotificationInput">
590
+        <wsdl:part name="parameters" element="tns:diagnosticsStatusNotificationRequest"/>
591
+    </wsdl:message>
592
+    <wsdl:message name="DiagnosticsStatusNotificationOutput">
593
+        <wsdl:part name="parameters" element="tns:diagnosticsStatusNotificationResponse"/>
594
+    </wsdl:message>
595
+    <wsdl:message name="DataTransferInput">
596
+        <wsdl:part name="parameters" element="tns:dataTransferRequest"/>
597
+    </wsdl:message>
598
+    <wsdl:message name="DataTransferOutput">
599
+        <wsdl:part name="parameters" element="tns:dataTransferResponse"/>
600
+    </wsdl:message>
601
+    <wsdl:portType name="CentralSystemService">
602
+        <wsdl:operation name="Authorize">
603
+            <wsdl:input message="tns:AuthorizeInput" wsaw:Action="/Authorize"/>
604
+            <wsdl:output message="tns:AuthorizeOutput" wsaw:Action="/AuthorizeResponse"/>
605
+        </wsdl:operation>
606
+        <wsdl:operation name="StartTransaction">
607
+            <wsdl:input message="tns:StartTransactionInput" wsaw:Action="/StartTransaction"/>
608
+            <wsdl:output message="tns:StartTransactionOutput" wsaw:Action="/StartTransactionResponse"/>
609
+        </wsdl:operation>
610
+        <wsdl:operation name="StopTransaction">
611
+            <wsdl:input message="tns:StopTransactionInput" wsaw:Action="/StopTransaction"/>
612
+            <wsdl:output message="tns:StopTransactionOutput" wsaw:Action="/StopTransactionResponse"/>
613
+        </wsdl:operation>
614
+        <wsdl:operation name="Heartbeat">
615
+            <wsdl:input message="tns:HeartbeatInput" wsaw:Action="/Heartbeat"/>
616
+            <wsdl:output message="tns:HeartbeatOutput" wsaw:Action="/HeartbeatResponse"/>
617
+        </wsdl:operation>
618
+        <wsdl:operation name="MeterValues">
619
+            <wsdl:input message="tns:MeterValuesInput" wsaw:Action="/MeterValues"/>
620
+            <wsdl:output message="tns:MeterValuesOutput" wsaw:Action="/MeterValuesResponse"/>
621
+        </wsdl:operation>
622
+        <wsdl:operation name="BootNotification">
623
+            <wsdl:input message="tns:BootNotificationInput" wsaw:Action="/BootNotification"/>
624
+            <wsdl:output message="tns:BootNotificationOutput" wsaw:Action="/BootNotificationResponse"/>
625
+        </wsdl:operation>
626
+        <wsdl:operation name="StatusNotification">
627
+            <wsdl:input message="tns:StatusNotificationInput" wsaw:Action="/StatusNotification"/>
628
+            <wsdl:output message="tns:StatusNotificationOutput" wsaw:Action="/StatusNotificationResponse"/>
629
+        </wsdl:operation>
630
+        <wsdl:operation name="FirmwareStatusNotification">
631
+            <wsdl:input message="tns:FirmwareStatusNotificationInput" wsaw:Action="/FirmwareStatusNotification"/>
632
+            <wsdl:output message="tns:FirmwareStatusNotificationOutput" wsaw:Action="/FirmwareStatusNotificationResponse"/>
633
+        </wsdl:operation>
634
+        <wsdl:operation name="DiagnosticsStatusNotification">
635
+            <wsdl:input message="tns:DiagnosticsStatusNotificationInput" wsaw:Action="/DiagnosticsStatusNotification"/>
636
+            <wsdl:output message="tns:DiagnosticsStatusNotificationOutput" wsaw:Action="/DiagnosticsStatusNotificationResponse"/>
637
+        </wsdl:operation>
638
+        <wsdl:operation name="DataTransfer">
639
+            <wsdl:input message="tns:DataTransferInput" wsaw:Action="/DataTransfer"/>
640
+            <wsdl:output message="tns:DataTransferOutput" wsaw:Action="/DataTransferResponse"/>
641
+        </wsdl:operation>
642
+    </wsdl:portType>
643
+    <wsdl:binding name="CentralSystemServiceSoap" type="tns:CentralSystemService">
644
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
645
+        <wsp:PolicyReference URI="#ServicePolicy"/>
646
+        <wsdl:operation name="Authorize">
647
+            <soap12:operation soapAction="/Authorize" style="document"/>
648
+            <wsdl:input>
649
+                <soap12:header message="tns:Header" part="ChargeBoxIdentity" use="literal"/>
650
+                <soap12:body use="literal"/>
651
+            </wsdl:input>
652
+            <wsdl:output>
653
+                <soap12:body use="literal"/>
654
+            </wsdl:output>
655
+        </wsdl:operation>
656
+        <wsdl:operation name="StartTransaction">
657
+            <soap12:operation soapAction="/StartTransaction" style="document"/>
658
+            <wsdl:input>
659
+                <soap12:header message="tns:Header" part="ChargeBoxIdentity" use="literal"/>
660
+                <soap12:body use="literal"/>
661
+            </wsdl:input>
662
+            <wsdl:output>
663
+                <soap12:body use="literal"/>
664
+            </wsdl:output>
665
+        </wsdl:operation>
666
+        <wsdl:operation name="StopTransaction">
667
+            <soap12:operation soapAction="/StopTransaction" style="document"/>
668
+            <wsdl:input>
669
+                <soap12:header message="tns:Header" part="ChargeBoxIdentity" use="literal"/>
670
+                <soap12:body use="literal"/>
671
+            </wsdl:input>
672
+            <wsdl:output>
673
+                <soap12:body use="literal"/>
674
+            </wsdl:output>
675
+        </wsdl:operation>
676
+        <wsdl:operation name="Heartbeat">
677
+            <soap12:operation soapAction="/Heartbeat" style="document"/>
678
+            <wsdl:input>
679
+                <soap12:header message="tns:Header" part="ChargeBoxIdentity" use="literal"/>
680
+                <soap12:body use="literal"/>
681
+            </wsdl:input>
682
+            <wsdl:output>
683
+                <soap12:body use="literal"/>
684
+            </wsdl:output>
685
+        </wsdl:operation>
686
+        <wsdl:operation name="MeterValues">
687
+            <soap12:operation soapAction="/MeterValues" style="document"/>
688
+            <wsdl:input>
689
+                <soap12:header message="tns:Header" part="ChargeBoxIdentity" use="literal"/>
690
+                <soap12:body use="literal"/>
691
+            </wsdl:input>
692
+            <wsdl:output>
693
+                <soap12:body use="literal"/>
694
+            </wsdl:output>
695
+        </wsdl:operation>
696
+        <wsdl:operation name="BootNotification">
697
+            <soap12:operation soapAction="/BootNotification" style="document"/>
698
+            <wsdl:input>
699
+                <soap12:header message="tns:Header" part="ChargeBoxIdentity" use="literal"/>
700
+                <soap12:body use="literal"/>
701
+            </wsdl:input>
702
+            <wsdl:output>
703
+                <soap12:body use="literal"/>
704
+            </wsdl:output>
705
+        </wsdl:operation>
706
+        <wsdl:operation name="StatusNotification">
707
+            <soap12:operation soapAction="/StatusNotification" style="document"/>
708
+            <wsdl:input>
709
+                <soap12:header message="tns:Header" part="ChargeBoxIdentity" use="literal"/>
710
+                <soap12:body use="literal"/>
711
+            </wsdl:input>
712
+            <wsdl:output>
713
+                <soap12:body use="literal"/>
714
+            </wsdl:output>
715
+        </wsdl:operation>
716
+        <wsdl:operation name="FirmwareStatusNotification">
717
+            <soap12:operation soapAction="/FirmwareStatusNotification" style="document"/>
718
+            <wsdl:input>
719
+                <soap12:header message="tns:Header" part="ChargeBoxIdentity" use="literal"/>
720
+                <soap12:body use="literal"/>
721
+            </wsdl:input>
722
+            <wsdl:output>
723
+                <soap12:body use="literal"/>
724
+            </wsdl:output>
725
+        </wsdl:operation>
726
+        <wsdl:operation name="DiagnosticsStatusNotification">
727
+            <soap12:operation soapAction="/DiagnosticsStatusNotification" style="document"/>
728
+            <wsdl:input>
729
+                <soap12:header message="tns:Header" part="ChargeBoxIdentity" use="literal"/>
730
+                <soap12:body use="literal"/>
731
+            </wsdl:input>
732
+            <wsdl:output>
733
+                <soap12:body use="literal"/>
734
+            </wsdl:output>
735
+        </wsdl:operation>
736
+        <wsdl:operation name="DataTransfer">
737
+            <soap12:operation soapAction="/DataTransfer" style="document"/>
738
+            <wsdl:input>
739
+                <soap12:header message="tns:Header" part="ChargeBoxIdentity" use="literal"/>
740
+                <soap12:body use="literal"/>
741
+            </wsdl:input>
742
+            <wsdl:output>
743
+                <soap12:body use="literal"/>
744
+            </wsdl:output>
745
+        </wsdl:operation>
746
+    </wsdl:binding>
747
+
748
+    <!-- The OCPP Central System Service -->
749
+    <wsdl:service name="CentralSystemService">
750
+        <wsdl:documentation>The Central System Service for the Open Charge Point Protocol</wsdl:documentation>
751
+        <wsdl:port name="CentralSystemServiceSoap12" binding="tns:CentralSystemServiceSoap">
752
+            <!-- <soap12:address location="http://localhost/Ocpp/CentralSystemService/"/> -->
753
+            <soap12:address location="http://127.0.0.1:9220/Ocpp/CentralSystemService"/>
754
+        </wsdl:port>
755
+    </wsdl:service>
756
+
757
+</wsdl:definitions>

+ 904 - 0
charger-simulator/src/soap/wsdl/15/ocpp_chargepointservice_1.5_final.wsdl

@@ -0,0 +1,904 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!--
3
+OCPP Charge Point service description
4
+Version 1.5 draft for approval (1.5 RC4)
5
+
6
+Copyright e-laad.nl. Free to use without modifications.
7
+
8
+See: http://ev-services.net/ocpp/
9
+-->
10
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
11
+                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
12
+                  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
13
+                  xmlns:s="http://www.w3.org/2001/XMLSchema"
14
+                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
15
+                  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
16
+                  xmlns:tns="urn://Ocpp/Cp/2012/06/"
17
+                  targetNamespace="urn://Ocpp/Cp/2012/06/"
18
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
19
+                  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
20
+                  xmlns:wsa="http://www.w3.org/2005/08/addressing"
21
+                  xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
22
+                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
23
+
24
+    <wsp:Policy wsu:Id="ServicePolicy">
25
+        <wsp:ExactlyOne>
26
+            <wsp:All>
27
+                <wsaw:UsingAddressing />
28
+            </wsp:All>
29
+        </wsp:ExactlyOne>
30
+    </wsp:Policy>
31
+
32
+    <wsdl:types>
33
+        <s:schema elementFormDefault="qualified" targetNamespace="urn://Ocpp/Cp/2012/06/">
34
+
35
+            <!-- Begin of types shared with CentralSystemService -->
36
+            <s:simpleType name="IdToken">
37
+                <s:annotation>
38
+                    <s:documentation>Type of string defining identification token, e.g. RFID or credit card number. To be treated as case insensitive.</s:documentation>
39
+                </s:annotation>
40
+                <s:restriction base="s:string">
41
+                    <s:maxLength value="20"/>
42
+                </s:restriction>
43
+            </s:simpleType>
44
+
45
+            <s:simpleType name="AuthorizationStatus">
46
+                <s:annotation>
47
+                    <s:documentation>Defines the authorization-status-value</s:documentation>
48
+                </s:annotation>
49
+                <s:restriction base="s:string">
50
+                    <s:enumeration value="Accepted"/>
51
+                    <s:enumeration value="Blocked"/>
52
+                    <s:enumeration value="Expired"/>
53
+                    <s:enumeration value="Invalid"/>
54
+                    <s:enumeration value="ConcurrentTx"/>
55
+                </s:restriction>
56
+            </s:simpleType>
57
+
58
+            <s:complexType name="IdTagInfo">
59
+                <s:sequence>
60
+                    <s:element name="status" type="tns:AuthorizationStatus" minOccurs="1" maxOccurs="1"/>
61
+                    <s:element name="expiryDate" type="s:dateTime" minOccurs="0" maxOccurs="1"/>
62
+                    <s:element name="parentIdTag" type="tns:IdToken" minOccurs="0" maxOccurs="1"/>
63
+                </s:sequence>
64
+            </s:complexType>
65
+            <!-- End of types shared with CentralSystemService -->
66
+
67
+            <s:simpleType name="UnlockStatus">
68
+                <s:annotation>
69
+                    <s:documentation>Defines the unlock-status-value</s:documentation>
70
+                </s:annotation>
71
+                <s:restriction base="s:string">
72
+                    <s:enumeration value="Accepted" />
73
+                    <s:enumeration value="Rejected" />
74
+                </s:restriction>
75
+            </s:simpleType>
76
+
77
+            <s:complexType name="UnlockConnectorRequest">
78
+                <s:annotation>
79
+                    <s:documentation>Defines the UnlockConnector.req PDU</s:documentation>
80
+                </s:annotation>
81
+                <s:sequence>
82
+                    <s:element name="connectorId" type="s:int" minOccurs="1" maxOccurs="1" />
83
+                </s:sequence>
84
+            </s:complexType>
85
+
86
+            <s:complexType name="UnlockConnectorResponse">
87
+                <s:annotation>
88
+                    <s:documentation>Defines the UnlockConnector.conf PDU</s:documentation>
89
+                </s:annotation>
90
+                <s:sequence>
91
+                    <s:element name="status" type="tns:UnlockStatus" minOccurs="1" maxOccurs="1" />
92
+                </s:sequence>
93
+            </s:complexType>
94
+
95
+            <s:simpleType name="ResetType">
96
+                <s:annotation>
97
+                    <s:documentation>Defines the reset-type-value</s:documentation>
98
+                </s:annotation>
99
+                <s:restriction base="s:string">
100
+                    <s:enumeration value="Hard" />
101
+                    <s:enumeration value="Soft" />
102
+                </s:restriction>
103
+            </s:simpleType>
104
+
105
+            <s:complexType name="ResetRequest">
106
+                <s:annotation>
107
+                    <s:documentation>Defines the Reset.req PDU</s:documentation>
108
+                </s:annotation>
109
+                <s:sequence>
110
+                    <s:element name="type" type="tns:ResetType" minOccurs="1" maxOccurs="1" />
111
+                </s:sequence>
112
+            </s:complexType>
113
+
114
+            <s:simpleType name="ResetStatus">
115
+                <s:annotation>
116
+                    <s:documentation>Defines the reset-status-value</s:documentation>
117
+                </s:annotation>
118
+                <s:restriction base="s:string">
119
+                    <s:enumeration value="Accepted" />
120
+                    <s:enumeration value="Rejected" />
121
+                </s:restriction>
122
+            </s:simpleType>
123
+
124
+            <s:complexType name="ResetResponse">
125
+                <s:sequence>
126
+                    <s:element name="status" type="tns:ResetStatus" minOccurs="1" maxOccurs="1" />
127
+                </s:sequence>
128
+            </s:complexType>
129
+
130
+            <s:simpleType name="AvailabilityType">
131
+                <s:annotation>
132
+                    <s:documentation>Defines the availability-type-value</s:documentation>
133
+                </s:annotation>
134
+                <s:restriction base="s:string">
135
+                    <s:enumeration value="Inoperative" />
136
+                    <s:enumeration value="Operative" />
137
+                </s:restriction>
138
+            </s:simpleType>
139
+
140
+            <s:complexType name="ChangeAvailabilityRequest">
141
+                <s:annotation>
142
+                    <s:documentation>Defines the ChangeAvailability.req PDU</s:documentation>
143
+                </s:annotation>
144
+                <s:sequence>
145
+                    <s:element name="connectorId" type="s:int" minOccurs="1" maxOccurs="1" />
146
+                    <s:element name="type" type="tns:AvailabilityType" minOccurs="1" maxOccurs="1" />
147
+                </s:sequence>
148
+            </s:complexType>
149
+
150
+            <s:simpleType name="AvailabilityStatus">
151
+                <s:annotation>
152
+                    <s:documentation>Defines the availability-status-value</s:documentation>
153
+                </s:annotation>
154
+                <s:restriction base="s:string">
155
+                    <s:enumeration value="Accepted" />
156
+                    <s:enumeration value="Rejected" />
157
+                    <s:enumeration value="Scheduled" />
158
+                </s:restriction>
159
+            </s:simpleType>
160
+
161
+            <s:complexType name="ChangeAvailabilityResponse">
162
+                <s:annotation>
163
+                    <s:documentation>Defines the ChangeAvailability.conf PDU</s:documentation>
164
+                </s:annotation>
165
+                <s:sequence>
166
+                    <s:element name="status" type="tns:AvailabilityStatus" minOccurs="1" maxOccurs="1" />
167
+                </s:sequence>
168
+            </s:complexType>
169
+
170
+            <s:complexType name="GetDiagnosticsRequest">
171
+                <s:annotation>
172
+                    <s:documentation>Defines the GetDiagnostics.req PDU</s:documentation>
173
+                </s:annotation>
174
+                <s:sequence>
175
+                    <s:element name="location" type="s:anyURI" minOccurs="1" maxOccurs="1" />
176
+                    <s:element name="startTime" type="s:dateTime" minOccurs="0" maxOccurs="1" />
177
+                    <s:element name="stopTime" type="s:dateTime" minOccurs="0" maxOccurs="1" />
178
+                    <s:element name="retries" type="s:int" minOccurs="0" maxOccurs="1" />
179
+                    <s:element name="retryInterval" type="s:int" minOccurs="0" maxOccurs="1" />
180
+                </s:sequence>
181
+            </s:complexType>
182
+
183
+            <s:complexType name="GetDiagnosticsResponse">
184
+                <s:annotation>
185
+                    <s:documentation>Defines the GetDiagnostics.conf PDU</s:documentation>
186
+                </s:annotation>
187
+                <s:sequence>
188
+                    <s:element name="fileName" type="s:string" minOccurs="0" maxOccurs="1" />
189
+                </s:sequence>
190
+            </s:complexType>
191
+
192
+            <s:complexType name="ClearCacheRequest">
193
+                <s:annotation>
194
+                    <s:documentation>Defines the ClearCache.req PDU</s:documentation>
195
+                </s:annotation>
196
+            </s:complexType>
197
+
198
+            <s:simpleType name="ClearCacheStatus">
199
+                <s:annotation>
200
+                    <s:documentation>Defines the clear-cache-status-value</s:documentation>
201
+                </s:annotation>
202
+                <s:restriction base="s:string">
203
+                    <s:enumeration value="Accepted" />
204
+                    <s:enumeration value="Rejected" />
205
+                </s:restriction>
206
+            </s:simpleType>
207
+
208
+            <s:complexType name="ClearCacheResponse">
209
+                <s:annotation>
210
+                    <s:documentation>Defines the ClearCache.conf PDU</s:documentation>
211
+                </s:annotation>
212
+                <s:sequence>
213
+                    <s:element name="status" type="tns:ClearCacheStatus" minOccurs="1" maxOccurs="1" />
214
+                </s:sequence>
215
+            </s:complexType>
216
+
217
+            <s:complexType name="UpdateFirmwareRequest">
218
+                <s:sequence>
219
+                    <s:element name="retrieveDate" type="s:dateTime" minOccurs="1" maxOccurs="1" />
220
+                    <s:element name="location" type="s:anyURI" minOccurs="1" maxOccurs="1" />
221
+                    <s:element name="retries" type="s:int" minOccurs="0" maxOccurs="1" />
222
+                    <s:element name="retryInterval" type="s:int" minOccurs="0" maxOccurs="1" />
223
+                </s:sequence>
224
+            </s:complexType>
225
+
226
+            <s:complexType name="UpdateFirmwareResponse">
227
+            </s:complexType>
228
+
229
+            <s:complexType name="ChangeConfigurationRequest">
230
+                <s:annotation>
231
+                    <s:documentation>Defines the ChangeConfiguration.req PDU</s:documentation>
232
+                </s:annotation>
233
+                <s:sequence>
234
+                    <s:element name="key" type="s:string" minOccurs="1" maxOccurs="1" />
235
+                    <s:element name="value" type="s:string" minOccurs="1" maxOccurs="1" />
236
+                </s:sequence>
237
+            </s:complexType>
238
+
239
+            <s:simpleType name="ConfigurationStatus">
240
+                <s:annotation>
241
+                    <s:documentation>Defines the configuration-status-value</s:documentation>
242
+                </s:annotation>
243
+                <s:restriction base="s:string">
244
+                    <s:enumeration value="Accepted" />
245
+                    <s:enumeration value="Rejected" />
246
+                    <s:enumeration value="NotSupported" />
247
+                </s:restriction>
248
+            </s:simpleType>
249
+
250
+            <s:complexType name="ChangeConfigurationResponse">
251
+                <s:annotation>
252
+                    <s:documentation>Defines the ChangeConfiguration.conf PDU</s:documentation>
253
+                </s:annotation>
254
+                <s:sequence>
255
+                    <s:element name="status" type="tns:ConfigurationStatus" minOccurs="1" maxOccurs="1" />
256
+                </s:sequence>
257
+            </s:complexType>
258
+
259
+            <s:complexType name="RemoteStartTransactionRequest">
260
+                <s:annotation>
261
+                    <s:documentation>Defines the RemoteStartTransaction.req PDU</s:documentation>
262
+                </s:annotation>
263
+                <s:sequence>
264
+                    <s:element name="idTag" type="tns:IdToken" minOccurs="1" maxOccurs="1" />
265
+                    <s:element name="connectorId" type="s:int" minOccurs="0" maxOccurs="1" />
266
+                </s:sequence>
267
+            </s:complexType>
268
+
269
+            <s:simpleType name="RemoteStartStopStatus">
270
+                <s:annotation>
271
+                    <s:documentation>Defines the remote-start-stop-status-value</s:documentation>
272
+                </s:annotation>
273
+                <s:restriction base="s:string">
274
+                    <s:enumeration value="Accepted" />
275
+                    <s:enumeration value="Rejected" />
276
+                </s:restriction>
277
+            </s:simpleType>
278
+
279
+            <s:complexType name="RemoteStartTransactionResponse">
280
+                <s:annotation>
281
+                    <s:documentation>Defines the RemoteStartTransaction.conf PDU</s:documentation>
282
+                </s:annotation>
283
+                <s:sequence>
284
+                    <s:element name="status" type="tns:RemoteStartStopStatus" minOccurs="1" maxOccurs="1" />
285
+                </s:sequence>
286
+            </s:complexType>
287
+
288
+            <s:complexType name="RemoteStopTransactionRequest">
289
+                <s:annotation>
290
+                    <s:documentation>Defines the RemoteStopTransaction.req PDU</s:documentation>
291
+                </s:annotation>
292
+                <s:sequence>
293
+                    <s:element name="transactionId" type="s:int" minOccurs="1" maxOccurs="1" />
294
+                </s:sequence>
295
+            </s:complexType>
296
+
297
+            <s:complexType name="RemoteStopTransactionResponse">
298
+                <s:annotation>
299
+                    <s:documentation>Defines the RemoteStopTransaction.conf PDU</s:documentation>
300
+                </s:annotation>
301
+                <s:sequence>
302
+                    <s:element name="status" type="tns:RemoteStartStopStatus" minOccurs="1" maxOccurs="1" />
303
+                </s:sequence>
304
+            </s:complexType>
305
+
306
+            <s:complexType name="CancelReservationRequest">
307
+                <s:annotation>
308
+                    <s:documentation>Defines the CancelReservation.req PDU</s:documentation>
309
+                </s:annotation>
310
+                <s:sequence>
311
+                    <s:element name="reservationId" type="s:int" minOccurs="1" maxOccurs="1" />
312
+                </s:sequence>
313
+            </s:complexType>
314
+
315
+            <s:simpleType name="CancelReservationStatus">
316
+                <s:restriction base="s:string">
317
+                    <s:enumeration value="Accepted"/>
318
+                    <s:enumeration value="Rejected"/>
319
+                </s:restriction>
320
+            </s:simpleType>
321
+
322
+            <s:complexType name="CancelReservationResponse">
323
+                <s:annotation>
324
+                    <s:documentation>Defines the CancelReservation.conf PDU</s:documentation>
325
+                </s:annotation>
326
+                <s:sequence>
327
+                    <s:element name="status" type="tns:CancelReservationStatus" minOccurs="1" maxOccurs="1" />
328
+                </s:sequence>
329
+            </s:complexType>
330
+
331
+            <s:complexType name="DataTransferRequest">
332
+                <s:annotation>
333
+                    <s:documentation>Defines the DataTransfer.req PDU</s:documentation>
334
+                </s:annotation>
335
+                <s:sequence>
336
+                    <s:element name="vendorId" type="s:string" minOccurs="1" maxOccurs="1" />
337
+                    <s:element name="messageId" type="s:string" minOccurs="0" maxOccurs="1" />
338
+                    <s:element name="data" type="s:string" minOccurs="0" maxOccurs="1" />
339
+                </s:sequence>
340
+            </s:complexType>
341
+
342
+            <s:simpleType name="DataTransferStatus">
343
+                <s:annotation>
344
+                    <s:documentation>Defines the status returned in DataTransfer.conf</s:documentation>
345
+                </s:annotation>
346
+                <s:restriction base="s:string">
347
+                    <s:enumeration value="Accepted" />
348
+                    <s:enumeration value="Rejected" />
349
+                    <s:enumeration value="UnknownMessageId" />
350
+                    <s:enumeration value="UnknownVendorId" />
351
+                </s:restriction>
352
+            </s:simpleType>
353
+
354
+            <s:complexType name="DataTransferResponse">
355
+                <s:annotation>
356
+                    <s:documentation>Defines the DataTransfer.conf PDU</s:documentation>
357
+                </s:annotation>
358
+                <s:sequence>
359
+                    <s:element name="status" type="tns:DataTransferStatus" minOccurs="1" maxOccurs="1" />
360
+                    <s:element name="data" type="s:string" minOccurs="0" maxOccurs="1" />
361
+                </s:sequence>
362
+            </s:complexType>
363
+
364
+            <s:complexType name="GetConfigurationRequest">
365
+                <s:annotation>
366
+                    <s:documentation>Defines the GetConfiguration.req PDU</s:documentation>
367
+                </s:annotation>
368
+                <s:sequence>
369
+                    <s:element name="key" type="s:string" minOccurs="0" maxOccurs="unbounded" />
370
+                </s:sequence>
371
+            </s:complexType>
372
+
373
+            <s:complexType name="KeyValue">
374
+                <s:annotation>
375
+                    <s:documentation>Key-Value pairs returned by GetConfiguration.conf PDU</s:documentation>
376
+                </s:annotation>
377
+                <s:sequence>
378
+                    <s:element name="key" type="s:string" minOccurs="1" maxOccurs="1" />
379
+                    <s:element name="readonly" type="s:boolean" minOccurs="1" maxOccurs="1" />
380
+                    <s:element name="value" type="s:string" minOccurs="0" maxOccurs="1" />
381
+                </s:sequence>
382
+            </s:complexType>
383
+
384
+            <s:complexType name="GetConfigurationResponse">
385
+                <s:annotation>
386
+                    <s:documentation>Defines the GetConfiguration.req PDU</s:documentation>
387
+                </s:annotation>
388
+                <s:sequence>
389
+                    <s:element name="configurationKey" type="tns:KeyValue" minOccurs="0" maxOccurs="unbounded" />
390
+                    <s:element name="unknownKey" type="s:string" minOccurs="0" maxOccurs="unbounded" />
391
+                </s:sequence>
392
+            </s:complexType>
393
+
394
+            <s:complexType name="GetLocalListVersionRequest">
395
+                <s:annotation>
396
+                    <s:documentation>Defines the GetLocalListVersion.req PDU</s:documentation>
397
+                </s:annotation>
398
+            </s:complexType>
399
+
400
+            <s:complexType name="GetLocalListVersionResponse">
401
+                <s:annotation>
402
+                    <s:documentation>Defines the GetLocalListVersion.conf PDU</s:documentation>
403
+                </s:annotation>
404
+                <s:sequence>
405
+                    <s:element name="listVersion" type="s:int" minOccurs="1" maxOccurs="1" />
406
+                </s:sequence>
407
+            </s:complexType>
408
+
409
+            <s:complexType name="ReserveNowRequest">
410
+                <s:annotation>
411
+                    <s:documentation>Defines the ReserveNow.req PDU</s:documentation>
412
+                </s:annotation>
413
+                <s:sequence>
414
+                    <s:element name="connectorId" type="s:int" minOccurs="1" maxOccurs="1" />
415
+                    <s:element name="expiryDate" type="s:dateTime" minOccurs="1" maxOccurs="1" />
416
+                    <s:element name="idTag" type="tns:IdToken" minOccurs="1" maxOccurs="1" />
417
+                    <s:element name="parentIdTag" type="tns:IdToken" minOccurs="0" maxOccurs="1" />
418
+                    <s:element name="reservationId" type="s:int" minOccurs="1" maxOccurs="1" />
419
+                </s:sequence>
420
+            </s:complexType>
421
+
422
+            <s:simpleType name="ReservationStatus">
423
+                <s:restriction base="s:string">
424
+                    <s:enumeration value="Accepted"/>
425
+                    <s:enumeration value="Faulted"/>
426
+                    <s:enumeration value="Occupied"/>
427
+                    <s:enumeration value="Rejected"/>
428
+                    <s:enumeration value="Unavailable"/>
429
+                </s:restriction>
430
+            </s:simpleType>
431
+
432
+            <s:complexType name="ReserveNowResponse">
433
+                <s:annotation>
434
+                    <s:documentation>Defines the ReserveNow.conf PDU</s:documentation>
435
+                </s:annotation>
436
+                <s:sequence>
437
+                    <s:element name="status" type="tns:ReservationStatus" minOccurs="1" maxOccurs="1" />
438
+                </s:sequence>
439
+            </s:complexType>
440
+
441
+            <s:complexType name="AuthorisationData">
442
+                <s:sequence>
443
+                    <s:element name="idTag" type="tns:IdToken" minOccurs="1" maxOccurs="1"/>
444
+                    <s:element name="idTagInfo" type="tns:IdTagInfo" minOccurs="0" maxOccurs="1"/>
445
+                </s:sequence>
446
+            </s:complexType>
447
+
448
+            <s:simpleType name="UpdateType">
449
+                <s:restriction base="s:string">
450
+                    <s:enumeration value="Differential"/>
451
+                    <s:enumeration value="Full"/>
452
+                </s:restriction>
453
+            </s:simpleType>
454
+
455
+            <s:complexType name="SendLocalListRequest">
456
+                <s:annotation>
457
+                    <s:documentation>Defines the SendLocalList.req PDU</s:documentation>
458
+                </s:annotation>
459
+                <s:sequence>
460
+                    <s:element name="updateType" type="tns:UpdateType" minOccurs="1" maxOccurs="1" />
461
+                    <s:element name="listVersion" type="s:int" minOccurs="1" maxOccurs="1" />
462
+                    <s:element name="localAuthorisationList" type="tns:AuthorisationData" minOccurs="0" maxOccurs="unbounded" />
463
+                    <s:element name="hash" type="s:string" minOccurs="0" maxOccurs="1" />
464
+                </s:sequence>
465
+            </s:complexType>
466
+
467
+            <s:simpleType name="UpdateStatus">
468
+                <s:restriction base="s:string">
469
+                    <s:enumeration value="Accepted"/>
470
+                    <s:enumeration value="Failed"/>
471
+                    <s:enumeration value="HashError"/>
472
+                    <s:enumeration value="NotSupported"/>
473
+                    <s:enumeration value="VersionMismatch"/>
474
+                </s:restriction>
475
+            </s:simpleType>
476
+
477
+            <s:complexType name="SendLocalListResponse">
478
+                <s:annotation>
479
+                    <s:documentation>Defines the SendLocalList.conf PDU</s:documentation>
480
+                </s:annotation>
481
+                <s:sequence>
482
+                    <s:element name="status" type="tns:UpdateStatus" minOccurs="1" maxOccurs="1" />
483
+                    <s:element name="hash" type="s:string" minOccurs="0" maxOccurs="1" />
484
+                </s:sequence>
485
+            </s:complexType>
486
+
487
+            <s:element name="chargeBoxIdentity" type="s:string" />
488
+            <s:element name="unlockConnectorRequest" type="tns:UnlockConnectorRequest" />
489
+            <s:element name="unlockConnectorResponse" type="tns:UnlockConnectorResponse" />
490
+            <s:element name="resetRequest" type="tns:ResetRequest" />
491
+            <s:element name="resetResponse" type="tns:ResetResponse" />
492
+            <s:element name="changeAvailabilityRequest" type="tns:ChangeAvailabilityRequest" />
493
+            <s:element name="changeAvailabilityResponse" type="tns:ChangeAvailabilityResponse" />
494
+            <s:element name="getDiagnosticsRequest" type="tns:GetDiagnosticsRequest" />
495
+            <s:element name="getDiagnosticsResponse" type="tns:GetDiagnosticsResponse" />
496
+            <s:element name="clearCacheRequest" type="tns:ClearCacheRequest" />
497
+            <s:element name="clearCacheResponse" type="tns:ClearCacheResponse" />
498
+            <s:element name="updateFirmwareRequest" type="tns:UpdateFirmwareRequest" />
499
+            <s:element name="updateFirmwareResponse" type="tns:UpdateFirmwareResponse" />
500
+            <s:element name="changeConfigurationRequest" type="tns:ChangeConfigurationRequest" />
501
+            <s:element name="changeConfigurationResponse" type="tns:ChangeConfigurationResponse" />
502
+            <s:element name="remoteStartTransactionRequest" type="tns:RemoteStartTransactionRequest" />
503
+            <s:element name="remoteStartTransactionResponse" type="tns:RemoteStartTransactionResponse" />
504
+            <s:element name="remoteStopTransactionRequest" type="tns:RemoteStopTransactionRequest" />
505
+            <s:element name="remoteStopTransactionResponse" type="tns:RemoteStopTransactionResponse" />
506
+            <s:element name="cancelReservationRequest" type="tns:CancelReservationRequest" />
507
+            <s:element name="cancelReservationResponse" type="tns:CancelReservationResponse" />
508
+            <s:element name="dataTransferRequest" type="tns:DataTransferRequest" />
509
+            <s:element name="dataTransferResponse" type="tns:DataTransferResponse" />
510
+            <s:element name="getConfigurationRequest" type="tns:GetConfigurationRequest" />
511
+            <s:element name="getConfigurationResponse" type="tns:GetConfigurationResponse" />
512
+            <s:element name="getLocalListVersionRequest" type="tns:GetLocalListVersionRequest" />
513
+            <s:element name="getLocalListVersionResponse" type="tns:GetLocalListVersionResponse" />
514
+            <s:element name="reserveNowRequest" type="tns:ReserveNowRequest" />
515
+            <s:element name="reserveNowResponse" type="tns:ReserveNowResponse" />
516
+            <s:element name="sendLocalListRequest" type="tns:SendLocalListRequest" />
517
+            <s:element name="sendLocalListResponse" type="tns:SendLocalListResponse" />
518
+        </s:schema>
519
+    </wsdl:types>
520
+
521
+    <wsdl:message name="Header">
522
+        <wsdl:part name="ChargeBoxIdentity" element="tns:chargeBoxIdentity" />
523
+    </wsdl:message>
524
+
525
+    <wsdl:message name="UnlockConnectorInput">
526
+        <wsdl:part name="parameters" element="tns:unlockConnectorRequest" />
527
+    </wsdl:message>
528
+
529
+    <wsdl:message name="UnlockConnectorOutput">
530
+        <wsdl:part name="parameters" element="tns:unlockConnectorResponse" />
531
+    </wsdl:message>
532
+
533
+    <wsdl:message name="ResetInput">
534
+        <wsdl:part name="parameters" element="tns:resetRequest" />
535
+    </wsdl:message>
536
+
537
+    <wsdl:message name="ResetOutput">
538
+        <wsdl:part name="parameters" element="tns:resetResponse" />
539
+    </wsdl:message>
540
+
541
+    <wsdl:message name="ChangeAvailabilityInput">
542
+        <wsdl:part name="parameters" element="tns:changeAvailabilityRequest" />
543
+    </wsdl:message>
544
+
545
+    <wsdl:message name="ChangeAvailabilityOutput">
546
+        <wsdl:part name="parameters" element="tns:changeAvailabilityResponse" />
547
+    </wsdl:message>
548
+
549
+    <wsdl:message name="GetDiagnosticsInput">
550
+        <wsdl:part name="parameters" element="tns:getDiagnosticsRequest" />
551
+    </wsdl:message>
552
+
553
+    <wsdl:message name="GetDiagnosticsOutput">
554
+        <wsdl:part name="parameters" element="tns:getDiagnosticsResponse" />
555
+    </wsdl:message>
556
+
557
+    <wsdl:message name="ClearCacheInput">
558
+        <wsdl:part name="parameters" element="tns:clearCacheRequest" />
559
+    </wsdl:message>
560
+
561
+    <wsdl:message name="ClearCacheOutput">
562
+        <wsdl:part name="parameters" element="tns:clearCacheResponse" />
563
+    </wsdl:message>
564
+
565
+    <wsdl:message name="UpdateFirmwareInput">
566
+        <wsdl:part name="parameters" element="tns:updateFirmwareRequest" />
567
+    </wsdl:message>
568
+
569
+    <wsdl:message name="UpdateFirmwareOutput">
570
+        <wsdl:part name="parameters" element="tns:updateFirmwareResponse" />
571
+    </wsdl:message>
572
+
573
+    <wsdl:message name="ChangeConfigurationInput">
574
+        <wsdl:part name="parameters" element="tns:changeConfigurationRequest" />
575
+    </wsdl:message>
576
+
577
+    <wsdl:message name="ChangeConfigurationOutput">
578
+        <wsdl:part name="parameters" element="tns:changeConfigurationResponse" />
579
+    </wsdl:message>
580
+
581
+    <wsdl:message name="RemoteStartTransactionInput">
582
+        <wsdl:part name="parameters" element="tns:remoteStartTransactionRequest" />
583
+    </wsdl:message>
584
+
585
+    <wsdl:message name="RemoteStartTransactionOutput">
586
+        <wsdl:part name="parameters" element="tns:remoteStartTransactionResponse" />
587
+    </wsdl:message>
588
+
589
+    <wsdl:message name="RemoteStopTransactionInput">
590
+        <wsdl:part name="parameters" element="tns:remoteStopTransactionRequest" />
591
+    </wsdl:message>
592
+
593
+    <wsdl:message name="RemoteStopTransactionOutput">
594
+        <wsdl:part name="parameters" element="tns:remoteStopTransactionResponse" />
595
+    </wsdl:message>
596
+
597
+    <wsdl:message name="CancelReservationInput">
598
+        <wsdl:part name="parameters" element="tns:cancelReservationRequest" />
599
+    </wsdl:message>
600
+
601
+    <wsdl:message name="CancelReservationOutput">
602
+        <wsdl:part name="parameters" element="tns:cancelReservationResponse" />
603
+    </wsdl:message>
604
+
605
+    <wsdl:message name="DataTransferInput">
606
+        <wsdl:part name="parameters" element="tns:dataTransferRequest" />
607
+    </wsdl:message>
608
+
609
+    <wsdl:message name="DataTransferOutput">
610
+        <wsdl:part name="parameters" element="tns:dataTransferResponse" />
611
+    </wsdl:message>
612
+
613
+    <wsdl:message name="GetConfigurationInput">
614
+        <wsdl:part name="parameters" element="tns:getConfigurationRequest" />
615
+    </wsdl:message>
616
+
617
+    <wsdl:message name="GetConfigurationOutput">
618
+        <wsdl:part name="parameters" element="tns:getConfigurationResponse" />
619
+    </wsdl:message>
620
+
621
+    <wsdl:message name="GetLocalListVersionInput">
622
+        <wsdl:part name="parameters" element="tns:getLocalListVersionRequest" />
623
+    </wsdl:message>
624
+
625
+    <wsdl:message name="GetLocalListVersionOutput">
626
+        <wsdl:part name="parameters" element="tns:getLocalListVersionResponse" />
627
+    </wsdl:message>
628
+
629
+    <wsdl:message name="ReserveNowInput">
630
+        <wsdl:part name="parameters" element="tns:reserveNowRequest" />
631
+    </wsdl:message>
632
+
633
+    <wsdl:message name="ReserveNowOutput">
634
+        <wsdl:part name="parameters" element="tns:reserveNowResponse" />
635
+    </wsdl:message>
636
+
637
+    <wsdl:message name="SendLocalListInput">
638
+        <wsdl:part name="parameters" element="tns:sendLocalListRequest" />
639
+    </wsdl:message>
640
+
641
+    <wsdl:message name="SendLocalListOutput">
642
+        <wsdl:part name="parameters" element="tns:sendLocalListResponse" />
643
+    </wsdl:message>
644
+
645
+    <wsdl:portType name="ChargePointService">
646
+
647
+        <wsdl:operation name="UnlockConnector">
648
+            <wsdl:input message="tns:UnlockConnectorInput" wsaw:Action="/UnlockConnector" />
649
+            <wsdl:output message="tns:UnlockConnectorOutput" wsaw:Action="/UnlockConnectorResponse" />
650
+        </wsdl:operation>
651
+
652
+        <wsdl:operation name="Reset">
653
+            <wsdl:input message="tns:ResetInput" wsaw:Action="/Reset" />
654
+            <wsdl:output message="tns:ResetOutput" wsaw:Action="/ResetResponse" />
655
+        </wsdl:operation>
656
+
657
+        <wsdl:operation name="ChangeAvailability">
658
+            <wsdl:input message="tns:ChangeAvailabilityInput" wsaw:Action="/ChangeAvailability" />
659
+            <wsdl:output message="tns:ChangeAvailabilityOutput" wsaw:Action="/ChangeAvailabilityResponse" />
660
+        </wsdl:operation>
661
+
662
+        <wsdl:operation name="GetDiagnostics">
663
+            <wsdl:input message="tns:GetDiagnosticsInput" wsaw:Action="/GetDiagnostics" />
664
+            <wsdl:output message="tns:GetDiagnosticsOutput" wsaw:Action="/GetDiagnosticsResponse" />
665
+        </wsdl:operation>
666
+
667
+        <wsdl:operation name="ClearCache">
668
+            <wsdl:input message="tns:ClearCacheInput" wsaw:Action="/ClearCache" />
669
+            <wsdl:output message="tns:ClearCacheOutput" wsaw:Action="/ClearCacheResponse" />
670
+        </wsdl:operation>
671
+
672
+        <wsdl:operation name="UpdateFirmware">
673
+            <wsdl:input message="tns:UpdateFirmwareInput" wsaw:Action="/UpdateFirmware" />
674
+            <wsdl:output message="tns:UpdateFirmwareOutput" wsaw:Action="/UpdateFirmwareResponse" />
675
+        </wsdl:operation>
676
+
677
+        <wsdl:operation name="ChangeConfiguration">
678
+            <wsdl:input message="tns:ChangeConfigurationInput" wsaw:Action="/ChangeConfiguration" />
679
+            <wsdl:output message="tns:ChangeConfigurationOutput" wsaw:Action="/ChangeConfigurationResponse" />
680
+        </wsdl:operation>
681
+
682
+        <wsdl:operation name="RemoteStartTransaction">
683
+            <wsdl:input message="tns:RemoteStartTransactionInput" wsaw:Action="/RemoteStartTransaction" />
684
+            <wsdl:output message="tns:RemoteStartTransactionOutput" wsaw:Action="/RemoteStartTransactionResponse" />
685
+        </wsdl:operation>
686
+
687
+        <wsdl:operation name="RemoteStopTransaction">
688
+            <wsdl:input message="tns:RemoteStopTransactionInput" wsaw:Action="/RemoteStopTransaction" />
689
+            <wsdl:output message="tns:RemoteStopTransactionOutput" wsaw:Action="/RemoteStopTransactionResponse" />
690
+        </wsdl:operation>
691
+
692
+        <wsdl:operation name="CancelReservation">
693
+            <wsdl:input message="tns:CancelReservationInput" wsaw:Action="/CancelReservation" />
694
+            <wsdl:output message="tns:CancelReservationOutput" wsaw:Action="/CancelReservationResponse" />
695
+        </wsdl:operation>
696
+
697
+        <wsdl:operation name="DataTransfer">
698
+            <wsdl:input message="tns:DataTransferInput" wsaw:Action="/DataTransfer" />
699
+            <wsdl:output message="tns:DataTransferOutput" wsaw:Action="/DataTransferResponse" />
700
+        </wsdl:operation>
701
+
702
+        <wsdl:operation name="GetConfiguration">
703
+            <wsdl:input message="tns:GetConfigurationInput" wsaw:Action="/GetConfiguration" />
704
+            <wsdl:output message="tns:GetConfigurationOutput" wsaw:Action="/GetConfigurationResponse" />
705
+        </wsdl:operation>
706
+
707
+        <wsdl:operation name="GetLocalListVersion">
708
+            <wsdl:input message="tns:GetLocalListVersionInput" wsaw:Action="/GetLocalListVersion" />
709
+            <wsdl:output message="tns:GetLocalListVersionOutput" wsaw:Action="/GetLocalListVersionResponse" />
710
+        </wsdl:operation>
711
+
712
+        <wsdl:operation name="ReserveNow">
713
+            <wsdl:input message="tns:ReserveNowInput" wsaw:Action="/ReserveNow" />
714
+            <wsdl:output message="tns:ReserveNowOutput" wsaw:Action="/ReserveNowResponse" />
715
+        </wsdl:operation>
716
+
717
+        <wsdl:operation name="SendLocalList">
718
+            <wsdl:input message="tns:SendLocalListInput" wsaw:Action="/SendLocalList" />
719
+            <wsdl:output message="tns:SendLocalListOutput" wsaw:Action="/SendLocalListResponse" />
720
+        </wsdl:operation>
721
+
722
+    </wsdl:portType>
723
+
724
+    <wsdl:binding name="ChargePointServiceSoap" type="tns:ChargePointService">
725
+
726
+        <wsp:PolicyReference URI="#ServicePolicy" />
727
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
728
+
729
+        <wsdl:operation name="UnlockConnector">
730
+            <soap12:operation soapAction="/UnlockConnector" style="document" />
731
+            <wsdl:input>
732
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
733
+                <soap12:body use="literal" />
734
+            </wsdl:input>
735
+            <wsdl:output>
736
+                <soap12:body use="literal" />
737
+            </wsdl:output>
738
+        </wsdl:operation>
739
+
740
+        <wsdl:operation name="Reset">
741
+            <soap12:operation soapAction="/Reset" style="document" />
742
+            <wsdl:input>
743
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
744
+                <soap12:body use="literal" />
745
+            </wsdl:input>
746
+            <wsdl:output>
747
+                <soap12:body use="literal" />
748
+            </wsdl:output>
749
+        </wsdl:operation>
750
+
751
+        <wsdl:operation name="ChangeAvailability">
752
+            <soap12:operation soapAction="/ChangeAvailability" style="document" />
753
+            <wsdl:input>
754
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
755
+                <soap12:body use="literal" />
756
+            </wsdl:input>
757
+            <wsdl:output>
758
+                <soap12:body use="literal" />
759
+            </wsdl:output>
760
+        </wsdl:operation>
761
+
762
+        <wsdl:operation name="GetDiagnostics">
763
+            <soap12:operation soapAction="/GetDiagnostics" style="document" />
764
+            <wsdl:input>
765
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
766
+                <soap12:body use="literal" />
767
+            </wsdl:input>
768
+            <wsdl:output>
769
+                <soap12:body use="literal" />
770
+            </wsdl:output>
771
+        </wsdl:operation>
772
+
773
+        <wsdl:operation name="ClearCache">
774
+            <soap12:operation soapAction="/ClearCache" style="document" />
775
+            <wsdl:input>
776
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
777
+                <soap12:body use="literal" />
778
+            </wsdl:input>
779
+            <wsdl:output>
780
+                <soap12:body use="literal" />
781
+            </wsdl:output>
782
+        </wsdl:operation>
783
+
784
+        <wsdl:operation name="UpdateFirmware">
785
+            <soap12:operation soapAction="/UpdateFirmware" style="document" />
786
+            <wsdl:input>
787
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
788
+                <soap12:body use="literal" />
789
+            </wsdl:input>
790
+            <wsdl:output>
791
+                <soap12:body use="literal" />
792
+            </wsdl:output>
793
+        </wsdl:operation>
794
+
795
+        <wsdl:operation name="ChangeConfiguration">
796
+            <soap12:operation soapAction="/ChangeConfiguration" style="document" />
797
+            <wsdl:input>
798
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
799
+                <soap12:body use="literal" />
800
+            </wsdl:input>
801
+            <wsdl:output>
802
+                <soap12:body use="literal" />
803
+            </wsdl:output>
804
+        </wsdl:operation>
805
+
806
+        <wsdl:operation name="RemoteStartTransaction">
807
+            <soap12:operation soapAction="/RemoteStartTransaction" style="document" />
808
+            <wsdl:input>
809
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
810
+                <soap12:body use="literal" />
811
+            </wsdl:input>
812
+            <wsdl:output>
813
+                <soap12:body use="literal" />
814
+            </wsdl:output>
815
+        </wsdl:operation>
816
+
817
+        <wsdl:operation name="RemoteStopTransaction">
818
+            <soap12:operation soapAction="/RemoteStopTransaction" style="document" />
819
+            <wsdl:input>
820
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
821
+                <soap12:body use="literal" />
822
+            </wsdl:input>
823
+            <wsdl:output>
824
+                <soap12:body use="literal" />
825
+            </wsdl:output>
826
+        </wsdl:operation>
827
+
828
+        <wsdl:operation name="CancelReservation">
829
+            <soap12:operation soapAction="/CancelReservation" style="document" />
830
+            <wsdl:input>
831
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
832
+                <soap12:body use="literal" />
833
+            </wsdl:input>
834
+            <wsdl:output>
835
+                <soap12:body use="literal" />
836
+            </wsdl:output>
837
+        </wsdl:operation>
838
+
839
+        <wsdl:operation name="DataTransfer">
840
+            <soap12:operation soapAction="/DataTransfer" style="document" />
841
+            <wsdl:input>
842
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
843
+                <soap12:body use="literal" />
844
+            </wsdl:input>
845
+            <wsdl:output>
846
+                <soap12:body use="literal" />
847
+            </wsdl:output>
848
+        </wsdl:operation>
849
+
850
+        <wsdl:operation name="GetConfiguration">
851
+            <soap12:operation soapAction="/GetConfiguration" style="document" />
852
+            <wsdl:input>
853
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
854
+                <soap12:body use="literal" />
855
+            </wsdl:input>
856
+            <wsdl:output>
857
+                <soap12:body use="literal" />
858
+            </wsdl:output>
859
+        </wsdl:operation>
860
+
861
+        <wsdl:operation name="GetLocalListVersion">
862
+            <soap12:operation soapAction="/GetLocalListVersion" style="document" />
863
+            <wsdl:input>
864
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
865
+                <soap12:body use="literal" />
866
+            </wsdl:input>
867
+            <wsdl:output>
868
+                <soap12:body use="literal" />
869
+            </wsdl:output>
870
+        </wsdl:operation>
871
+
872
+        <wsdl:operation name="ReserveNow">
873
+            <soap12:operation soapAction="/ReserveNow" style="document" />
874
+            <wsdl:input>
875
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
876
+                <soap12:body use="literal" />
877
+            </wsdl:input>
878
+            <wsdl:output>
879
+                <soap12:body use="literal" />
880
+            </wsdl:output>
881
+        </wsdl:operation>
882
+
883
+        <wsdl:operation name="SendLocalList">
884
+            <soap12:operation soapAction="/SendLocalList" style="document" />
885
+            <wsdl:input>
886
+                <soap12:header use="literal" message="tns:Header" part="ChargeBoxIdentity"/>
887
+                <soap12:body use="literal" />
888
+            </wsdl:input>
889
+            <wsdl:output>
890
+                <soap12:body use="literal" />
891
+            </wsdl:output>
892
+        </wsdl:operation>
893
+
894
+    </wsdl:binding>
895
+
896
+
897
+    <!-- The OCPP ChargePoint service -->
898
+    <wsdl:service name="ChargePointService">
899
+        <wsdl:documentation>The ChargePoint Service for the Open Charge Point Protocol</wsdl:documentation>
900
+        <wsdl:port name="ChargePointServiceSoap12" binding="tns:ChargePointServiceSoap">
901
+            <soap12:address location="http://localhost:9000/Ocpp/ChargePointService/" />
902
+        </wsdl:port>
903
+    </wsdl:service>
904
+</wsdl:definitions>

+ 20 - 0
charger-simulator/src/soap/xmlUtils.ts

@@ -0,0 +1,20 @@
1
+import {Builder, parseString} from "xml2js"
2
+
3
+export async function prettyPrintXml(xml): Promise<string> {
4
+  return new Promise<string>((resolve, reject) => {
5
+    parseString(xml, (err, parsed) => {
6
+      if (err) {
7
+        reject(err)
8
+        return
9
+      }
10
+
11
+      try {
12
+        const formatted = new Builder({headless: true}).buildObject(parsed)
13
+
14
+        resolve("\n" + formatted.replace(/n\/  \n/g))
15
+      } catch (e) {
16
+        reject(e)
17
+      }
18
+    })
19
+  })
20
+}

+ 12 - 0
charger-simulator/tsconfig.json

@@ -0,0 +1,12 @@
1
+{
2
+  "compilerOptions": {
3
+    "target": "es5",
4
+    "module": "CommonJS",
5
+    "outDir": "dist",
6
+    "lib": [
7
+      "es6"
8
+    ],
9
+    "declaration": true
10
+  },
11
+  "include": ["src/**/*.ts"]
12
+}

File diff suppressed because it is too large
+ 1094 - 0
charger-simulator/yarn.lock


+ 65 - 0
cs.py

@@ -0,0 +1,65 @@
1
+import asyncio
2
+import logging
3
+import websockets
4
+from datetime import datetime
5
+
6
+from ocpp.routing import on
7
+from ocpp.v201 import ChargePoint as cp
8
+from ocpp.v201 import call_result
9
+from ocpp.v201.enums import RegistrationStatusType
10
+
11
+logging.basicConfig(level=logging.INFO)
12
+
13
+
14
+class ChargePoint(cp):
15
+    @on('BootNotification')
16
+    async def on_boot_notification(self, charging_station, reason, **kwargs):
17
+        return call_result.BootNotificationPayload(
18
+            current_time=datetime.utcnow().isoformat(),
19
+            interval=10,
20
+            status=RegistrationStatusType.accepted
21
+        )
22
+
23
+
24
+async def on_connect(websocket, path):
25
+    """ For every new charge point that connects, create a ChargePoint
26
+    instance and start listening for messages.
27
+    """
28
+    try:
29
+        requested_protocols = websocket.request_headers[
30
+            'Sec-WebSocket-Protocol']
31
+    except KeyError:
32
+        logging.info("Client hasn't requested any Subprotocol. "
33
+                 "Closing Connection")
34
+        return await websocket.close()
35
+
36
+    if websocket.subprotocol:
37
+        logging.info("Protocols Matched: %s", websocket.subprotocol)
38
+    else:
39
+        # In the websockets lib if no subprotocols are supported by the
40
+        # client and the server, it proceeds without a subprotocol,
41
+        # so we have to manually close the connection.
42
+        logging.warning('Protocols Mismatched | Expected Subprotocols: %s,'
43
+                        ' but client supports  %s | Closing connection',
44
+                        websocket.available_subprotocols,
45
+                        requested_protocols)
46
+        return await websocket.close()
47
+
48
+    charge_point_id = path.strip('/')
49
+    cp = ChargePoint(charge_point_id, websocket)
50
+
51
+    await cp.start()
52
+
53
+
54
+async def main():
55
+    server = await websockets.serve(
56
+        on_connect,
57
+        '0.0.0.0',
58
+        9000,
59
+        subprotocols=['ocpp1.6']
60
+    )
61
+    logging.info("WebSocket Server Started")
62
+    await server.wait_closed()
63
+
64
+if __name__ == '__main__':
65
+    asyncio.run(main())

+ 190 - 0
cs1_6.py

@@ -0,0 +1,190 @@
1
+import asyncio
2
+import logging
3
+from datetime import datetime
4
+from pprint import pprint
5
+
6
+try:
7
+	import websockets
8
+except ModuleNotFoundError:
9
+	print("This example relies on the 'websockets' package.")
10
+	print("Please install it by running: ")
11
+	print()
12
+	print(" $ pip install websockets")
13
+	import sys
14
+
15
+	sys.exit(1)
16
+
17
+from ocpp.routing import on, after
18
+from ocpp.v16 import ChargePoint as cp
19
+from ocpp.v16 import call_result
20
+from ocpp.v16.datatypes import IdTagInfo
21
+from ocpp.v16.enums import Action, RegistrationStatus, AuthorizationStatus
22
+from ocpp.messages import Call, MessageType, unpack, validate_payload
23
+
24
+
25
+logging.basicConfig(level=logging.INFO)
26
+
27
+class CustomCP(cp):
28
+    def __init__(self, id, connection, response_timeout=30):
29
+        super().__init__(id, connection, response_timeout)
30
+
31
+    async def _handle_call(self, msg):
32
+        """
33
+        Execute all hooks installed for based on the Action of the message.
34
+
35
+        First the '_on_action' hook is executed and its response is returned to
36
+        the client. If there is no '_on_action' hook for Action in the message
37
+        a CallError with a NotImplementedError is returned. If the Action is
38
+        not supported by the OCPP version a NotSupportedError is returned.
39
+
40
+        Next the '_after_action' hook is executed.
41
+
42
+        """
43
+        try:
44
+            handlers = self.route_map[msg.action]
45
+        except KeyError:
46
+            _raise_key_error(msg.action, self._ocpp_version)
47
+            return
48
+
49
+        if not handlers.get("_skip_schema_validation", False):
50
+            validate_payload(msg, self._ocpp_version)
51
+        # OCPP uses camelCase for the keys in the payload. It's more pythonic
52
+        # to use snake_case for keyword arguments. Therefore the keys must be
53
+        # 'translated'. Some examples:
54
+        #
55
+        # * chargePointVendor becomes charge_point_vendor
56
+        # * firmwareVersion becomes firmwareVersion
57
+        if msg.payload is None:
58
+            msg.payload = {}
59
+        snake_case_payload = camel_to_snake_case(msg.payload)
60
+
61
+        try:
62
+            handler = handlers["_on_action"]
63
+        except KeyError:
64
+            _raise_key_error(msg.action, self._ocpp_version)
65
+
66
+        try:
67
+            response = handler(**snake_case_payload)
68
+            if inspect.isawaitable(response):
69
+                response = await response
70
+        except Exception as e:
71
+            LOGGER.exception("Error while handling request '%s'", msg)
72
+            response = msg.create_call_error(e).to_json()
73
+            await self._send(response)
74
+
75
+            return
76
+
77
+        temp_response_payload = asdict(response)
78
+
79
+        # Remove nones ensures that we strip out optional arguments
80
+        # which were not set and have a default value of None
81
+        response_payload = remove_nones(temp_response_payload)
82
+
83
+        # The response payload must be 'translated' from snake_case to
84
+        # camelCase. So:
85
+        #
86
+        # * charge_point_vendor becomes chargePointVendor
87
+        # * firmware_version becomes firmwareVersion
88
+        camel_case_payload = snake_to_camel_case(response_payload)
89
+
90
+        response = msg.create_call_result(camel_case_payload)
91
+
92
+        if not handlers.get("_skip_schema_validation", False):
93
+            validate_payload(response, self._ocpp_version)
94
+
95
+        await self._send(response.to_json())
96
+
97
+        try:
98
+            handler = handlers["_after_action"]
99
+            # Create task to avoid blocking when making a call inside the
100
+            # after handler
101
+            response = handler(**snake_case_payload)
102
+            if inspect.isawaitable(response):
103
+                asyncio.ensure_future(response)
104
+        except KeyError:
105
+            # '_on_after' hooks are not required. Therefore ignore exception
106
+            # when no '_on_after' hook is installed.
107
+            pass
108
+        return response
109
+	
110
+
111
+class ChargePoint(cp):
112
+
113
+	@on(Action.BootNotification)
114
+	def on_boot_notification(
115
+			self, charge_point_vendor: str, charge_point_model: str, **kwargs):
116
+		pprint(kwargs)
117
+		return call_result.BootNotificationPayload(
118
+				current_time=datetime.utcnow().isoformat(),
119
+				interval=10,
120
+				status=RegistrationStatus.accepted,
121
+				)
122
+
123
+	@on(Action.Authorize)
124
+	def on_authorization(self, id_tag):
125
+		# pprint(kwargs)
126
+		idti = IdTagInfo(status=AuthorizationStatus.accepted)
127
+		# idti.status = AuthorizationStatus.accepted
128
+
129
+		return call_result.AuthorizePayload(
130
+				id_tag_info=idti
131
+				)
132
+
133
+	@on(Action.StatusNotification)
134
+	def on_status_notification(self, id_tag):
135
+		# pprint(kwargs)
136
+		# idti = IdTagInfo(status=AuthorizationStatus.accepted)
137
+		# idti.status = AuthorizationStatus.accepted
138
+		return call_result.StatusNotificationPayload()
139
+
140
+	@on(Action.Heartbeat, skip_schema_validation=True)
141
+	def on_heartbeat(self, **kwargs):  # receives empty payload from CP
142
+		print("--HeartBeat--")
143
+		print(kwargs)
144
+		return call_result.HeartbeatPayload(
145
+				current_time=datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
146
+				)
147
+
148
+
149
+
150
+async def on_connect(websocket, path):
151
+	"""For every new charge point that connects, create a ChargePoint
152
+	instance and start listening for messages.
153
+	"""
154
+	try:
155
+		requested_protocols = websocket.request_headers["Sec-WebSocket-Protocol"]
156
+	except KeyError:
157
+		logging.error("Client hasn't requested any Subprotocol. Closing Connection")
158
+		return await websocket.close()
159
+	if websocket.subprotocol:
160
+		logging.info("Protocols Matched: %s", websocket.subprotocol)
161
+	else:
162
+		# In the websockets lib if no subprotocols are supported by the
163
+		# client and the server, it proceeds without a subprotocol,
164
+		# so we have to manually close the connection.
165
+		logging.warning(
166
+				"Protocols Mismatched | Expected Subprotocols: %s,"
167
+				" but client supports  %s | Closing connection",
168
+				websocket.available_subprotocols,
169
+				requested_protocols,
170
+				)
171
+		return await websocket.close()
172
+
173
+	charge_point_id = path.strip("/")
174
+	cp = ChargePoint(charge_point_id, websocket)
175
+
176
+	await cp.start()
177
+
178
+
179
+async def main():
180
+	server = await websockets.serve(
181
+			on_connect, "0.0.0.0", 9000, subprotocols=["ocpp1.6"]
182
+			)
183
+
184
+	logging.info("Server Started listening to new connections...")
185
+	await server.wait_closed()
186
+
187
+
188
+if __name__ == "__main__":
189
+	# asyncio.run() is used when running this example with Python >= 3.7v
190
+	asyncio.run(main())

+ 1 - 0
ocpp

@@ -0,0 +1 @@
1
+Subproject commit a9df8ebdaee922c323be1d06eace2d5a35a5f747

tum/whitesports - Gogs: Simplico Git Service

Sin descripción

class-wp-admin-bar.php 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. <?php
  2. /**
  3. * Toolbar API: WP_Admin_Bar class
  4. *
  5. * @package WordPress
  6. * @subpackage Toolbar
  7. * @since 3.1.0
  8. */
  9. /**
  10. * Core class used to implement the Toolbar API.
  11. *
  12. * @since 3.1.0
  13. */
  14. class WP_Admin_Bar {
  15. private $nodes = array();
  16. private $bound = false;
  17. public $user;
  18. /**
  19. * @param string $name
  20. * @return string|array|void
  21. */
  22. public function __get( $name ) {
  23. switch ( $name ) {
  24. case 'proto':
  25. return is_ssl() ? 'https://' : 'http://';
  26. case 'menu':
  27. _deprecated_argument( 'WP_Admin_Bar', '3.3.0', 'Modify admin bar nodes with WP_Admin_Bar::get_node(), WP_Admin_Bar::add_node(), and WP_Admin_Bar::remove_node(), not the <code>menu</code> property.' );
  28. return array(); // Sorry, folks.
  29. }
  30. }
  31. /**
  32. */
  33. public function initialize() {
  34. $this->user = new stdClass;
  35. if ( is_user_logged_in() ) {
  36. /* Populate settings we need for the menu based on the current user. */
  37. $this->user->blogs = get_blogs_of_user( get_current_user_id() );
  38. if ( is_multisite() ) {
  39. $this->user->active_blog = get_active_blog_for_user( get_current_user_id() );
  40. $this->user->domain = empty( $this->user->active_blog ) ? user_admin_url() : trailingslashit( get_home_url( $this->user->active_blog->blog_id ) );
  41. $this->user->account_domain = $this->user->domain;
  42. } else {
  43. $this->user->active_blog = $this->user->blogs[ get_current_blog_id() ];
  44. $this->user->domain = trailingslashit( home_url() );
  45. $this->user->account_domain = $this->user->domain;
  46. }
  47. }
  48. add_action( 'wp_head', 'wp_admin_bar_header' );
  49. add_action( 'admin_head', 'wp_admin_bar_header' );
  50. if ( current_theme_supports( 'admin-bar' ) ) {
  51. /**
  52. * To remove the default padding styles from WordPress for the Toolbar, use the following code:
  53. * add_theme_support( 'admin-bar', array( 'callback' => '__return_false' ) );
  54. */
  55. $admin_bar_args = get_theme_support( 'admin-bar' );
  56. $header_callback = $admin_bar_args[0]['callback'];
  57. }
  58. if ( empty( $header_callback ) ) {
  59. $header_callback = '_admin_bar_bump_cb';
  60. }
  61. add_action( 'wp_head', $header_callback );
  62. wp_enqueue_script( 'admin-bar' );
  63. wp_enqueue_style( 'admin-bar' );
  64. /**
  65. * Fires after WP_Admin_Bar is initialized.
  66. *
  67. * @since 3.1.0
  68. */
  69. do_action( 'admin_bar_init' );
  70. }
  71. /**
  72. * Add a node (menu item) to the Admin Bar menu.
  73. *
  74. * @since 3.3.0
  75. *
  76. * @param array $node The attributes that define the node.
  77. */
  78. public function add_menu( $node ) {
  79. $this->add_node( $node );
  80. }
  81. /**
  82. * Remove a node from the admin bar.
  83. *
  84. * @since 3.1.0
  85. *
  86. * @param string $id The menu slug to remove.
  87. */
  88. public function remove_menu( $id ) {
  89. $this->remove_node( $id );
  90. }
  91. /**
  92. * Adds a node to the menu.
  93. *
  94. * @since 3.1.0
  95. * @since 4.5.0 Added the ability to pass 'lang' and 'dir' meta data.
  96. *
  97. * @param array $args {
  98. * Arguments for adding a node.
  99. *
  100. * @type string $id ID of the item.
  101. * @type string $title Title of the node.
  102. * @type string $parent Optional. ID of the parent node.
  103. * @type string $href Optional. Link for the item.
  104. * @type bool $group Optional. Whether or not the node is a group. Default false.
  105. * @type array $meta Meta data including the following keys: 'html', 'class', 'rel', 'lang', 'dir',
  106. * 'onclick', 'target', 'title', 'tabindex'. Default empty.
  107. * }
  108. */
  109. public function add_node( $args ) {
  110. // Shim for old method signature: add_node( $parent_id, $menu_obj, $args ).
  111. if ( func_num_args() >= 3 && is_string( $args ) ) {
  112. $args = array_merge( array( 'parent' => $args ), func_get_arg( 2 ) );
  113. }
  114. if ( is_object( $args ) ) {
  115. $args = get_object_vars( $args );
  116. }
  117. // Ensure we have a valid title.
  118. if ( empty( $args['id'] ) ) {
  119. if ( empty( $args['title'] ) ) {
  120. return;
  121. }
  122. _doing_it_wrong( __METHOD__, __( 'The menu ID should not be empty.' ), '3.3.0' );
  123. // Deprecated: Generate an ID from the title.
  124. $args['id'] = esc_attr( sanitize_title( trim( $args['title'] ) ) );
  125. }
  126. $defaults = array(
  127. 'id' => false,
  128. 'title' => false,
  129. 'parent' => false,
  130. 'href' => false,
  131. 'group' => false,
  132. 'meta' => array(),
  133. );
  134. // If the node already exists, keep any data that isn't provided.
  135. $maybe_defaults = $this->get_node( $args['id'] );
  136. if ( $maybe_defaults ) {
  137. $defaults = get_object_vars( $maybe_defaults );
  138. }
  139. // Do the same for 'meta' items.
  140. if ( ! empty( $defaults['meta'] ) && ! empty( $args['meta'] ) ) {
  141. $args['meta'] = wp_parse_args( $args['meta'], $defaults['meta'] );
  142. }
  143. $args = wp_parse_args( $args, $defaults );
  144. $back_compat_parents = array(
  145. 'my-account-with-avatar' => array( 'my-account', '3.3' ),
  146. 'my-blogs' => array( 'my-sites', '3.3' ),
  147. );
  148. if ( isset( $back_compat_parents[ $args['parent'] ] ) ) {
  149. list( $new_parent, $version ) = $back_compat_parents[ $args['parent'] ];
  150. _deprecated_argument( __METHOD__, $version, sprintf( 'Use <code>%s</code> as the parent for the <code>%s</code> admin bar node instead of <code>%s</code>.', $new_parent, $args['id'], $args['parent'] ) );
  151. $args['parent'] = $new_parent;
  152. }
  153. $this->_set_node( $args );
  154. }
  155. /**
  156. * @param array $args
  157. */
  158. final protected function _set_node( $args ) {
  159. $this->nodes[ $args['id'] ] = (object) $args;
  160. }
  161. /**
  162. * Gets a node.
  163. *
  164. * @param string $id
  165. * @return object|void Node.
  166. */
  167. final public function get_node( $id ) {
  168. $node = $this->_get_node( $id );
  169. if ( $node ) {
  170. return clone $node;
  171. }
  172. }
  173. /**
  174. * @param string $id
  175. * @return object|void
  176. */
  177. final protected function _get_node( $id ) {
  178. if ( $this->bound ) {
  179. return;
  180. }
  181. if ( empty( $id ) ) {
  182. $id = 'root';
  183. }
  184. if ( isset( $this->nodes[ $id ] ) ) {
  185. return $this->nodes[ $id ];
  186. }
  187. }
  188. /**
  189. * @return array|void
  190. */
  191. final public function get_nodes() {
  192. $nodes = $this->_get_nodes();
  193. if ( ! $nodes ) {
  194. return;
  195. }
  196. foreach ( $nodes as &$node ) {
  197. $node = clone $node;
  198. }
  199. return $nodes;
  200. }
  201. /**
  202. * @return array|void
  203. */
  204. final protected function _get_nodes() {
  205. if ( $this->bound ) {
  206. return;
  207. }
  208. return $this->nodes;
  209. }
  210. /**
  211. * Add a group to a toolbar menu node.
  212. *
  213. * Groups can be used to organize toolbar items into distinct sections of a toolbar menu.
  214. *
  215. * @since 3.3.0
  216. *
  217. * @param array $args {
  218. * Array of arguments for adding a group.
  219. *
  220. * @type string $id ID of the item.
  221. * @type string $parent Optional. ID of the parent node. Default 'root'.
  222. * @type array $meta Meta data for the group including the following keys:
  223. * 'class', 'onclick', 'target', and 'title'.
  224. * }
  225. */
  226. final public function add_group( $args ) {
  227. $args['group'] = true;
  228. $this->add_node( $args );
  229. }
  230. /**
  231. * Remove a node.
  232. *
  233. * @param string $id The ID of the item.
  234. */
  235. public function remove_node( $id ) {
  236. $this->_unset_node( $id );
  237. }
  238. /**
  239. * @param string $id
  240. */
  241. final protected function _unset_node( $id ) {
  242. unset( $this->nodes[ $id ] );
  243. }
  244. /**
  245. */
  246. public function render() {
  247. $root = $this->_bind();
  248. if ( $root ) {
  249. $this->_render( $root );
  250. }
  251. }
  252. /**
  253. * @return object|void
  254. */
  255. final protected function _bind() {
  256. if ( $this->bound ) {
  257. return;
  258. }
  259. // Add the root node.
  260. // Clear it first, just in case. Don't mess with The Root.
  261. $this->remove_node( 'root' );
  262. $this->add_node(
  263. array(
  264. 'id' => 'root',
  265. 'group' => false,
  266. )
  267. );
  268. // Normalize nodes: define internal 'children' and 'type' properties.
  269. foreach ( $this->_get_nodes() as $node ) {
  270. $node->children = array();
  271. $node->type = ( $node->group ) ? 'group' : 'item';
  272. unset( $node->group );
  273. // The Root wants your orphans. No lonely items allowed.
  274. if ( ! $node->parent ) {
  275. $node->parent = 'root';
  276. }
  277. }
  278. foreach ( $this->_get_nodes() as $node ) {
  279. if ( 'root' === $node->id ) {
  280. continue;
  281. }
  282. // Fetch the parent node. If it isn't registered, ignore the node.
  283. $parent = $this->_get_node( $node->parent );
  284. if ( ! $parent ) {
  285. continue;
  286. }
  287. // Generate the group class (we distinguish between top level and other level groups).
  288. $group_class = ( 'root' === $node->parent ) ? 'ab-top-menu' : 'ab-submenu';
  289. if ( 'group' === $node->type ) {
  290. if ( empty( $node->meta['class'] ) ) {
  291. $node->meta['class'] = $group_class;
  292. } else {
  293. $node->meta['class'] .= ' ' . $group_class;
  294. }
  295. }
  296. // Items in items aren't allowed. Wrap nested items in 'default' groups.
  297. if ( 'item' === $parent->type && 'item' === $node->type ) {
  298. $default_id = $parent->id . '-default';
  299. $default = $this->_get_node( $default_id );
  300. // The default group is added here to allow groups that are
  301. // added before standard menu items to render first.
  302. if ( ! $default ) {
  303. // Use _set_node because add_node can be overloaded.
  304. // Make sure to specify default settings for all properties.
  305. $this->_set_node(
  306. array(
  307. 'id' => $default_id,
  308. 'parent' => $parent->id,
  309. 'type' => 'group',
  310. 'children' => array(),
  311. 'meta' => array(
  312. 'class' => $group_class,
  313. ),
  314. 'title' => false,
  315. 'href' => false,
  316. )
  317. );
  318. $default = $this->_get_node( $default_id );
  319. $parent->children[] = $default;
  320. }
  321. $parent = $default;
  322. // Groups in groups aren't allowed. Add a special 'container' node.
  323. // The container will invisibly wrap both groups.
  324. } elseif ( 'group' === $parent->type && 'group' === $node->type ) {
  325. $container_id = $parent->id . '-container';
  326. $container = $this->_get_node( $container_id );
  327. // We need to create a container for this group, life is sad.
  328. if ( ! $container ) {
  329. // Use _set_node because add_node can be overloaded.
  330. // Make sure to specify default settings for all properties.
  331. $this->_set_node(
  332. array(
  333. 'id' => $container_id,
  334. 'type' => 'container',
  335. 'children' => array( $parent ),
  336. 'parent' => false,
  337. 'title' => false,
  338. 'href' => false,
  339. 'meta' => array(),
  340. )
  341. );
  342. $container = $this->_get_node( $container_id );
  343. // Link the container node if a grandparent node exists.
  344. $grandparent = $this->_get_node( $parent->parent );
  345. if ( $grandparent ) {
  346. $container->parent = $grandparent->id;
  347. $index = array_search( $parent, $grandparent->children, true );
  348. if ( false === $index ) {
  349. $grandparent->children[] = $container;
  350. } else {
  351. array_splice( $grandparent->children, $index, 1, array( $container ) );
  352. }
  353. }
  354. $parent->parent = $container->id;
  355. }
  356. $parent = $container;
  357. }
  358. // Update the parent ID (it might have changed).
  359. $node->parent = $parent->id;
  360. // Add the node to the tree.
  361. $parent->children[] = $node;
  362. }
  363. $root = $this->_get_node( 'root' );
  364. $this->bound = true;
  365. return $root;
  366. }
  367. /**
  368. * @param object $root
  369. */
  370. final protected function _render( $root ) {
  371. // Add browser classes.
  372. // We have to do this here since admin bar shows on the front end.
  373. $class = 'nojq nojs';
  374. if ( wp_is_mobile() ) {
  375. $class .= ' mobile';
  376. }
  377. ?>
  378. <div id="wpadminbar" class="<?php echo $class; ?>">
  379. <?php if ( ! is_admin() && ! did_action( 'wp_body_open' ) ) { ?>
  380. <a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1"><?php _e( 'Skip to toolbar' ); ?></a>
  381. <?php } ?>
  382. <div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e( 'Toolbar' ); ?>">
  383. <?php
  384. foreach ( $root->children as $group ) {
  385. $this->_render_group( $group );
  386. }
  387. ?>
  388. </div>
  389. <?php if ( is_user_logged_in() ) : ?>
  390. <a class="screen-reader-shortcut" href="<?php echo esc_url( wp_logout_url() ); ?>"><?php _e( 'Log Out' ); ?></a>
  391. <?php endif; ?>
  392. </div>
  393. <?php
  394. }
  395. /**
  396. * @param object $node
  397. */
  398. final protected function _render_container( $node ) {
  399. if ( 'container' !== $node->type || empty( $node->children ) ) {
  400. return;
  401. }
  402. echo '<div id="' . esc_attr( 'wp-admin-bar-' . $node->id ) . '" class="ab-group-container">';
  403. foreach ( $node->children as $group ) {
  404. $this->_render_group( $group );
  405. }
  406. echo '</div>';
  407. }
  408. /**
  409. * @param object $node
  410. */
  411. final protected function _render_group( $node ) {
  412. if ( 'container' === $node->type ) {
  413. $this->_render_container( $node );
  414. return;
  415. }
  416. if ( 'group' !== $node->type || empty( $node->children ) ) {
  417. return;
  418. }
  419. if ( ! empty( $node->meta['class'] ) ) {
  420. $class = ' class="' . esc_attr( trim( $node->meta['class'] ) ) . '"';
  421. } else {
  422. $class = '';
  423. }
  424. echo "<ul id='" . esc_attr( 'wp-admin-bar-' . $node->id ) . "'$class>";
  425. foreach ( $node->children as $item ) {
  426. $this->_render_item( $item );
  427. }
  428. echo '</ul>';
  429. }
  430. /**
  431. * @param object $node
  432. */
  433. final protected function _render_item( $node ) {
  434. if ( 'item' !== $node->type ) {
  435. return;
  436. }
  437. $is_parent = ! empty( $node->children );
  438. $has_link = ! empty( $node->href );
  439. $is_root_top_item = 'root-default' === $node->parent;
  440. $is_top_secondary_item = 'top-secondary' === $node->parent;
  441. // Allow only numeric values, then casted to integers, and allow a tabindex value of `0` for a11y.
  442. $tabindex = ( isset( $node->meta['tabindex'] ) && is_numeric( $node->meta['tabindex'] ) ) ? (int) $node->meta['tabindex'] : '';
  443. $aria_attributes = ( '' !== $tabindex ) ? ' tabindex="' . $tabindex . '"' : '';
  444. $menuclass = '';
  445. $arrow = '';
  446. if ( $is_parent ) {
  447. $menuclass = 'menupop ';
  448. $aria_attributes .= ' aria-haspopup="true"';
  449. }
  450. if ( ! empty( $node->meta['class'] ) ) {
  451. $menuclass .= $node->meta['class'];
  452. }
  453. // Print the arrow icon for the menu children with children.
  454. if ( ! $is_root_top_item && ! $is_top_secondary_item && $is_parent ) {
  455. $arrow = '<span class="wp-admin-bar-arrow" aria-hidden="true"></span>';
  456. }
  457. if ( $menuclass ) {
  458. $menuclass = ' class="' . esc_attr( trim( $menuclass ) ) . '"';
  459. }
  460. echo "<li id='" . esc_attr( 'wp-admin-bar-' . $node->id ) . "'$menuclass>";
  461. if ( $has_link ) {
  462. $attributes = array( 'onclick', 'target', 'title', 'rel', 'lang', 'dir' );
  463. echo "<a class='ab-item'$aria_attributes href='" . esc_url( $node->href ) . "'";
  464. } else {
  465. $attributes = array( 'onclick', 'target', 'title', 'rel', 'lang', 'dir' );
  466. echo '<div class="ab-item ab-empty-item"' . $aria_attributes;
  467. }
  468. foreach ( $attributes as $attribute ) {
  469. if ( empty( $node->meta[ $attribute ] ) ) {
  470. continue;
  471. }
  472. if ( 'onclick' === $attribute ) {
  473. echo " $attribute='" . esc_js( $node->meta[ $attribute ] ) . "'";
  474. } else {
  475. echo " $attribute='" . esc_attr( $node->meta[ $attribute ] ) . "'";
  476. }
  477. }
  478. echo ">{$arrow}{$node->title}";
  479. if ( $has_link ) {
  480. echo '</a>';
  481. } else {
  482. echo '</div>';
  483. }
  484. if ( $is_parent ) {
  485. echo '<div class="ab-sub-wrapper">';
  486. foreach ( $node->children as $group ) {
  487. $this->_render_group( $group );
  488. }
  489. echo '</div>';
  490. }
  491. if ( ! empty( $node->meta['html'] ) ) {
  492. echo $node->meta['html'];
  493. }
  494. echo '</li>';
  495. }
  496. /**
  497. * Renders toolbar items recursively.
  498. *
  499. * @since 3.1.0
  500. * @deprecated 3.3.0 Use WP_Admin_Bar::_render_item() or WP_Admin_bar::render() instead.
  501. * @see WP_Admin_Bar::_render_item()
  502. * @see WP_Admin_Bar::render()
  503. *
  504. * @param string $id Unused.
  505. * @param object $node
  506. */
  507. public function recursive_render( $id, $node ) {
  508. _deprecated_function( __METHOD__, '3.3.0', 'WP_Admin_bar::render(), WP_Admin_Bar::_render_item()' );
  509. $this->_render_item( $node );
  510. }
  511. /**
  512. */
  513. public function add_menus() {
  514. // User-related, aligned right.
  515. add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 0 );
  516. add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 4 );
  517. add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_item', 7 );
  518. add_action( 'admin_bar_menu', 'wp_admin_bar_recovery_mode_menu', 8 );
  519. // Site-related.
  520. add_action( 'admin_bar_menu', 'wp_admin_bar_sidebar_toggle', 0 );
  521. add_action( 'admin_bar_menu', 'wp_admin_bar_wp_menu', 10 );
  522. add_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 20 );
  523. add_action( 'admin_bar_menu', 'wp_admin_bar_site_menu', 30 );
  524. add_action( 'admin_bar_menu', 'wp_admin_bar_customize_menu', 40 );
  525. add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 50 );
  526. // Content-related.
  527. if ( ! is_network_admin() && ! is_user_admin() ) {
  528. add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );
  529. add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 70 );
  530. }
  531. add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 80 );
  532. add_action( 'admin_bar_menu', 'wp_admin_bar_add_secondary_groups', 200 );
  533. /**
  534. * Fires after menus are added to the menu bar.
  535. *
  536. * @since 3.1.0
  537. */
  538. do_action( 'add_admin_bar_menus' );
  539. }
  540. }