I'm doing a project and our structure of our page should be based to a current XML. now i am having difficult to find out how to generate the simpleType SOAP value found in the XML.
and XML code looks like this.
...

<simpleType name="useraccount">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="username"/>
<xsd:enumeration value="password"/>
<xsd:enumeration value="accounttype"/>
</xsd:restriction>
</simpleType>

...
and my code for the ComplexType in PHP is:

$this->__typedef['userprofiles'] = array( //NEEDED //OK
                        "username"      => "string",
                        "password"      => "string",
                        "firstName"     => "string",
                        "lastName"      => "string",
                        "organization"  => "string",
                        "tel"           => "string",
                        "email"         => "string",
                        "country"       => "string",
                        "city"          => "string"
                );

with an output:
...

<complexType name="userprofiles">
<sequence>
<element name="username" nillable="true" type="xsd:string"/>
<element name="password" nillable="true" type="xsd:string"/>
<element name="firstName" nillable="true" type="xsd:string"/>
<element name="lastName" nillable="true" type="xsd:string"/>
<element name="organization" nillable="true" type="xsd:string"/>
<element name="tel" nillable="true" type="xsd:string"/>
<element name="email" nillable="true" type="xsd:string"/>
<element name="country" nillable="true" type="xsd:string"/>
<element name="city" nillable="true" type="xsd:string"/>
</sequence>
</complexType>

...

Hi alpha_gear, we have the same problem... I dont have an idea how to create enumeration under the simpleType in WSDL/SERVER script..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.