Skip to content

Commit b389097

Browse files
committed
fixing FeatureBundlesListType
1 parent 9f8b199 commit b389097

5 files changed

Lines changed: 17 additions & 13 deletions

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@ echo $flexnetOperations->echoPhrase('Hello, Flexsim!');
4444
# Type Generation
4545

4646
1. Fix types in wsdl files
47-
1. LicenseService
47+
1. ProductPackagineService
48+
- featureBundlesListType - add minOccurs="0" to the "featureBundle" property
49+
2. LicenseService
4850
- fulfillmentHistoryDetailsType - add minOccurs="0" to the "record" property
4951

52+
5053
2. Normalize Extension types in the wsdl file by extracting them from the base type into the child type
5154
3. Run the flexnet WSDL file through the xml to json tool here: https://codebeautify.org/xmlviewer
5255

flexnet/ProductPackagingService/Type/FeatureBundlesListType.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,40 @@
55
class FeatureBundlesListType
66
{
77
/**
8-
* @var \Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType|array<\Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType>
8+
* @var \Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType|array<\Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType>|null
99
*/
1010
private $featureBundle;
1111

1212
/**
1313
* Constructor
1414
*
15-
* @param \Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType|array<\Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType> $featureBundle
15+
* @param \Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType|array<\Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType>|null $featureBundle
1616
*/
17-
public function __construct(FeatureBundleIdentifierWithCountDataType|array $featureBundle)
17+
public function __construct(FeatureBundleIdentifierWithCountDataType|array|null $featureBundle = null)
1818
{
1919
$this->featureBundle = $featureBundle;
2020
}
2121

2222
/**
23-
* @param \Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType|array<\Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType> $featureBundle
23+
* @param \Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType|array<\Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType>|null $featureBundle
2424
*/
25-
public static function create(FeatureBundleIdentifierWithCountDataType|array $featureBundle)
25+
public static function create(FeatureBundleIdentifierWithCountDataType|array|null $featureBundle = null)
2626
{
2727
return new static(...\func_get_args());
2828
}
2929

3030
/**
31-
* @return \Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType|array<\Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType>
31+
* @return \Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType|array<\Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType>|null
3232
*/
33-
public function getFeatureBundle(): FeatureBundleIdentifierWithCountDataType|array
33+
public function getFeatureBundle(): FeatureBundleIdentifierWithCountDataType|array|null
3434
{
3535
return $this->featureBundle;
3636
}
3737

3838
/**
39-
* @param \Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType|array<\Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType> $featureBundle
39+
* @param \Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType|array<\Flexnet\ProductPackagingService\Type\FeatureBundleIdentifierWithCountDataType>|null $featureBundle
4040
*/
41-
public function withFeatureBundle(FeatureBundleIdentifierWithCountDataType|array $featureBundle): FeatureBundlesListType
41+
public function withFeatureBundle(FeatureBundleIdentifierWithCountDataType|array|null $featureBundle): FeatureBundlesListType
4242
{
4343
$new = clone $this;
4444
$new->featureBundle = $featureBundle;

productPackagingService.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,6 +1564,7 @@
15641564
"sequence": {
15651565
"element": {
15661566
"_maxOccurs": "unbounded",
1567+
"_minOccurs": "0",
15671568
"_name": "featureBundle",
15681569
"_type": "impl:featureBundleIdentifierWithCountDataType"
15691570
}

productPackagingService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

3+
use Flexnet\ProductPackagingService\Result;
34
use Flexsim\FlexnetOperations\Assembler as FlexnetAssembler;
4-
use Flexsim\FlexnetOperations\FlexnetOperationsResult;
55
use Phpro\SoapClient\CodeGenerator\Assembler;
66
use Phpro\SoapClient\CodeGenerator\Config\Config;
77
use Phpro\SoapClient\CodeGenerator\Rules;
@@ -49,7 +49,7 @@
4949
new Rules\IsResultRule(
5050
$engine->getMetadata(),
5151
new Rules\MultiRule([
52-
new Rules\AssembleRule(new FlexnetAssembler\ResultAssembler(FlexnetOperationsResult::class)),
52+
new Rules\AssembleRule(new FlexnetAssembler\ResultAssembler(Result::class)),
5353
])
5454
)
5555
);

productPackagingService.wsdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ Built on Apr 22, 2006 (06:55:48 PDT)-->
582582
</complexType>
583583
<complexType name="featureBundlesListType">
584584
<sequence>
585-
<element maxOccurs="unbounded" name="featureBundle" type="impl:featureBundleIdentifierWithCountDataType"/>
585+
<element maxOccurs="unbounded" minOccurs="0" name="featureBundle" type="impl:featureBundleIdentifierWithCountDataType"/>
586586
</sequence>
587587
</complexType>
588588
<complexType name="licenseModelPKType">

0 commit comments

Comments
 (0)