1

I get the following error in my wsdl:

The document is not a definitions@http://schemas.xmlsoap.org/wsdl/: document element namespace mismatch expected "http://schemas.xmlsoap.org/wsdl/" got ""

Does anyone have a clue?

Thanks in advance, Emma

<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="http://osb.vodafone.com/gr/RTI_OSB_Siebel" xmlns:tns="http://osb.vodafone.com/gr/RTI_OSB_Siebel" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema/">
<types>
    <xsd:schema targetNamespace="http://osb.vodafone.com/gr/RTI_OSB_Siebel">
    <xsd:element name="retrieveInformationResponse" type="xsd:retrieveInformationResponseInfo"/>
      <xsd:complexType name="retrieveInformationResponseInfo">
        <xsd:sequence>
          <xsd:element name="retrieveInformationResponse" maxOccurs="1" minOccurs="1" type="xsd:retrieveInformationResponseInfo"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="retrieveInformationResponse">
        <xsd:sequence>
          <xsd:element name="Response" maxOccurs="1" minOccurs="1" type="xsd:retrieveInformationResponse"/>
        </xsd:sequence>
      </xsd:complexType>      
        <xsd:complexType name="retrieveInformationResponseInfo">
            <xsd:sequence>
                <xsd:element name="Customer" maxOccurs="1" minOccurs="0" type="xsd:customerInfo"/>
                <xsd:element name="Asset" maxOccurs="1" minOccurs="0" type="xsd:assetInfo"/>
                <xsd:element name="TroubleTicket" maxOccurs="1" minOccurs="0" type="xsd:troubleTicketInfo"/>
                <xsd:element name="Order" maxOccurs="1" minOccurs="0" type="xsd:orderInfo"/>
            </xsd:sequence>
        </xsd:complexType>

. . . .

</xsd:schema>
</types>
<message name="retrieveInformationRequest">
    <part name="voiceNumber" type="xsd:string"/>
<part name="serviceId" type="xsd:string"/>
<part name="ttId" type="xsd:string"/>
</message>
<message name="retrieveInformationResponse">
    <part name="errorCode" type="xsd:string"/>
    <part name="errorMessage" type="xsd:string"/>
    <part name="Response" type="xsd:retrieveInformationResponseInfo"/>
</message>
<portType name="retrieveInformation">
    <operation name="retrieveInformation">
        <input message="tns:retrieveInformationRequest"/>
        <output message="tns:retrieveInformationResponse"/>
    </operation>
</portType>
<binding name="retrieveInformation" type="tns:retrieveInformation">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
    <operation name="retrieveInformation">
        <soap:operation soapAction=""/>
        <input>
            <soap:body use="literal"/>
        </input>
        <output>
            <soap:body use="literal"/>
        </output>
    </operation>
</binding>
<service name="retrieveInformationService">
    <port binding="tns:retrieveInformation" name="retrieveInformation">
        <soap:address location="http://OSBhostname.org:8080/RTI_OSB_Siebel"/>
    </port>
</service>

1 Answers1

0

You need to specify explicitly the wsdl namespace for the wsdl specific elements by prefixing with the alias "wsdl" as defined in xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/".

E.g.

<wsdl:definitions ...etc.>
<wsdl:types>
spodger
  • 1,668
  • 1
  • 12
  • 16
  • Well, I don't understand, then. The error is saying that the `` element, which is the document element, has no namespace. Which in your example above is true. Are you sure you get the same error if you change it to ``? – spodger Jul 19 '18 at 08:25
  • No, i get a different error: The WSDL is not semantically valid: The element or type specified for part'voiceNumber' in message '{http:// osb.vodafone.com/gr/RTI_OSB_Siebel}retrieveInformationRequest' cannot be found in any schemas referenced by this wsdl. which i didn't get before still can't undestand what' wrong.. – Emma Andreadaki Jul 19 '18 at 08:34
  • You're making progress. You've eradicated your first error - now you need to correct the errors in your supporting schema definitions. Can you put your definition of element `retrieveInformationRequest` in your question? – spodger Jul 19 '18 at 08:58
  • i have nothing else regarding the retrieveInformationRequest than the ones listed above, in the middle code all i do is define the retrieveInformationResponse element – Emma Andreadaki Jul 19 '18 at 09:04
  • Well I'm not sure exactly what's causing that error but in your `` section you have defined elements such as "retrieveInformationResponse" as having a type "xsd:retrieveInformationResponseInfo". That's surely wrong as it's part of your target namespace, "http://osb.vodafone.com/gr/RTI_OSB_Siebel", not part of the "xsd" namespace. Try getting rid of the "xsd" alias on types you have defined yourself. – spodger Jul 19 '18 at 10:49