2

I have been trying to parse a WDSL file in FuseIt and also in SFDC, but I get an error that it is not allowing me to generate the apex classes I need.

This the error I get in SFDC:

Apex Generation Failed No type specified for element name

And this is the one om FuseIT:

Unable to determine parameterType for 'name' Parameter name: parameterTypeInfo.ParameterType

This is the WSDL I'm trying to parse:

<wsdl:definitions
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://schemas.telecomframework.cordys.com/1.0/external/SubmitOrder"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:inst="http://schemas.cordys.com/bpm/instance/1.0"
name="SubmitOrder"
targetNamespace="http://schemas.telecomframework.cordys.com/1.0/external/SubmitOrder">
<wsdl:types>
    <xsd:schema
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:cws="http://schemas.cordys.com/cws/1.0"
        xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:tns1="http://schemas.telecomframework.cordys.com/1.0/external/SubmitOrder"
        attributeFormDefault="unqualified"
        elementFormDefault="qualified"
        targetNamespace="http://schemas.telecomframework.cordys.com/1.0/external/SubmitOrder">
        <xsd:import
            namespace="http://schemas.cordys.com/bpm/instance/1.0"
        />
        <xsd:element
            name="body">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element
                        name="order">
                        <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element
                                        xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                    name="orderType"
                                    type="xs:string"
                                />
                                <xsd:element
                                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                    name="requestor"
                                    type="xs:string"
                                />
                                <xsd:element
                                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                    name="externalOrderId"
                                    type="xs:string"
                                />
                                <xsd:element
                                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                    name="relatedOrderId"
                                    type="xs:string"
                                />
                                <xsd:element
                                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                    name="interactionDateTime"
                                    type="xs:dateTime"
                                />
                                <xsd:element
                                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                    name="description"
                                    type="xs:string"
                                />
                                <xsd:element
                                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                    name="purchaseOrderNumber"
                                    type="xs:string"
                                />
                                <xsd:element
                                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                    name="requestedDate"
                                    type="xs:dateTime"
                                />
                                <xsd:element
                                    name="orderCharacteristics">
                                    <xsd:complexType>
                                        <xsd:sequence>
                                            <xsd:element
                                                maxOccurs="unbounded"
                                                minOccurs="0"
                                                name="orderCharacteristic">
                                                <xsd:complexType>
                                                    <xsd:sequence>
                                                        <xsd:element
xmlns:xs="http://www.w3.org/2001/XMLSchema"
name="name"
type="xs:string"
                                                        />
                                                        <xsd:element
xmlns:xs="http://www.w3.org/2001/XMLSchema"
name="value"
type="xs:string"
                                                        />
                                                    </xsd:sequence>
                                                </xsd:complexType>
                                            </xsd:element>
                                        </xsd:sequence>
                                    </xsd:complexType>
                                </xsd:element>
                                <xsd:element
                                    name="lineItems">
                                    <xsd:complexType>
                                        <xsd:sequence>
                                            <xsd:element
                                                name="lineItem">
                                                <xsd:complexType>
                                                    <xsd:sequence>
                                                        <xsd:element
xmlns:xs="http://www.w3.org/2001/XMLSchema"
name="itemName"
type="xs:string"
                                                        />
                                                        <xsd:element
xmlns:xs="http://www.w3.org/2001/XMLSchema"
name="action"
type="xs:string"
                                                        />
                                                        <xsd:element
xmlns:xs="http://www.w3.org/2001/XMLSchema"
name="lineItemId"
type="xs:int"
                                                        />
                                                        <xsd:element
xmlns:xs="http://www.w3.org/2001/XMLSchema"
name="itemId"
type="xs:long"
                                                        />
                                                        <xsd:element
name="itemCharacteristics">
<xsd:complexType>
        <xsd:sequence>
                <xsd:element
                        maxOccurs="unbounded"
                        minOccurs="0"
                        name="itemCharacteristic">
                        <xsd:complexType>
                                <xsd:sequence>
                                        <xsd:element
                                                name="name">
                                                                </xsd:element>
                                        <xsd:element
                                                name="value">
                                                                </xsd:element>
                                        <xsd:element
                                                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                                name="action"
                                                type="xs:string"
                                        />
                                </xsd:sequence>
                        </xsd:complexType>
                </xsd:element>
        </xsd:sequence>
</xsd:complexType>
                                                        </xsd:element>
                                                    </xsd:sequence>
                                                </xsd:complexType>
                                            </xsd:element>
                                        </xsd:sequence>
                                    </xsd:complexType>
                                </xsd:element>
                            </xsd:sequence>
                        </xsd:complexType>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:element
            name="Result">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element
                        name="Status"
                        type="xsd:string"
                    />
                    <xsd:element
                        name="Reference"
                        type="xsd:string"
                    />
                    <xsd:element
                        name="Errors"
                        type="xsd:string"
                    />
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:element
            name="SubmitOrder">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element
                        ref="tns1:header"
                    />
                    <xsd:element
                        ref="tns1:body"
                    />
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:element
            name="header">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element
                        xmlns:xs="http://www.w3.org/2001/XMLSchema"
                        name="correlationId"
                        type="xs:string"
                    />
                    <xsd:element
                        xmlns:xs="http://www.w3.org/2001/XMLSchema"
                        name="messageType"
                        type="xs:string"
                    />
                    <xsd:element
                        xmlns:xs="http://www.w3.org/2001/XMLSchema"
                        name="sender"
                        type="xs:string"
                    />
                    <xsd:element
                        xmlns:xs="http://www.w3.org/2001/XMLSchema"
                        name="receiver"
                        type="xs:string"
                    />
                    <xsd:element
                        xmlns:xs="http://www.w3.org/2001/XMLSchema"
                        name="submissionTime"
                        type="xs:dateTime"
                    />
                    <xsd:element
                        xmlns:xs="http://www.w3.org/2001/XMLSchema"
                        name="messageId"
                        type="xs:short"
                    />
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:element
            name="SubmitOrderResponse">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element
                        ref="tns1:Result"
                    />
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
    </xsd:schema>
    <xsd:schema
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:cws="http://schemas.cordys.com/cws/1.0"
        xmlns="http://www.w3.org/2001/XMLSchema"
        attributeFormDefault="unqualified"
        elementFormDefault="qualified"
        targetNamespace="http://schemas.cordys.com/bpm/instance/1.0">
        <xsd:element
            name="headerInput">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element
                        name="target"
                        type="xsd:string"
                    />
                    <xsd:element
                        name="source">
                        <xsd:complexType>
                            <xsd:attribute
                                name="type"
                                type="xsd:string"
                            />
                        </xsd:complexType>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:element
            name="bpm">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element
                        name="instance_id"
                        type="xsd:string"
                    />
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
    </xsd:schema>
</wsdl:types>
<wsdl:message
    name="SubmitOrderInput">
    <wsdl:part
        name="body"
        element="tns:SubmitOrder"
    />
</wsdl:message>
<wsdl:message
    name="SubmitOrderOutput">
    <wsdl:part
        name="body"
        element="tns:SubmitOrderResponse"
    />
</wsdl:message>
<wsdl:message
    name="HeaderOutput">
    <wsdl:part
        name="BPMHeaderOutput"
        element="inst:bpm"
    />
</wsdl:message>
<wsdl:portType
    name="SubmitOrder">
    <wsdl:operation
        name="SubmitOrder">
        <wsdl:input
            message="tns:SubmitOrderInput"
        />
        <wsdl:output
            message="tns:SubmitOrderOutput"
        />
    </wsdl:operation>
</wsdl:portType>
<wsdl:binding
    name="SubmitOrder"
    type="tns:SubmitOrder">
    <soap:binding
        style="document"
        transport="http://schemas.xmlsoap.org/soap/http"
    />
    <wsdl:operation
        name="SubmitOrder">
        <soap:operation
            soapAction=""
            style="document"
        />
        <wsdl:input>
            <soap:body
                use="literal"
            />
        </wsdl:input>
        <wsdl:output>
            <soap:body
                use="literal"
            />
            <soap:header
                message="tns:HeaderOutput"
                part="BPMHeaderOutput"
                use="literal"
            />
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>
<wsdl:service
    name="SubmitOrderService">
    <wsdl:port
        name="SubmitOrderPort"
        binding="tns:SubmitOrder">
        <soap:address
            location="http://CordysServer/SubmitOrder.asmx"
        />
    </wsdl:port>
</wsdl:service>

So if anyone can give me some subjection in where I can start looking it would be very much appreciated.

Thanks.

1 Answer 1

1

The problem is with the itemCharacteristic element.

<xsd:element maxOccurs="unbounded" minOccurs="0" name="itemCharacteristic">
    <xsd:complexType>
        <xsd:sequence>
            <xsd:element name="name" />
            <xsd:element name="value" />
            <xsd:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="action" type="xs:string" />
        </xsd:sequence>
    </xsd:complexType>
</xsd:element>

Note that the name and value elements have no type defined. This is more or less what the error messages are indicating, but it can be a bit difficult to isolate as there are so many name elements. Future releases of the FuseIT Wsdl2Apex tooling I'll include the element path. E.g.

Unable to determine parameterType for 'name' from element body_order_lineItems_lineItem_itemCharacteristics_itemCharacteristic_element

I manually appended xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xs:string" to each of those elements and could then generate the Apex classes.

1
  • 1
    Thank you Daniel, that did it. After appending that line to those two elements I was able to generate the apex classes. Nov 24, 2016 at 23:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .