質問

What is the problem in my WSDL file? The Visual Studio complains about an undefined complex type.

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns1="http://osmc.synium.com/services/presence" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns2="http://types.osqq.syqq.com" xmlns:impl="com.syqq.osqq.services.presence" xmlns:intf="com.syqq.osqq.services.presence" targetNamespace="com.syqq.osqq.services.presence" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://types.osqq.syqq.com">
          <xsd:import namespace="http://osqq.syqq.com/services/presence" />
          <xsd:import namespace="com.syqq.osqq.services.presence" />
          <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
          <xsd:complexType name="SoapBinaryMessage" abstract="true">
            <xsd:sequence>
              <xsd:element name="data64" nillable="true" type="xsd:string" />
              <xsd:element name="version" nillable="true" type="xsd:int" />
            </xsd:sequence>
          </xsd:complexType>
        </xsd:schema>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://osmc.synium.com/services/presence">
          <xsd:import namespace="com.syqq.osqq.services.presence" />
          <xsd:import namespace="http://types.osqq.syqq.com" />
          <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
          <xsd:complexType name="PresenceStatusBinary">
            <xsd:complexContent mixed="false">
              <xsd:extension base="tns2:SoapBinaryMessage">
                <xsd:sequence />
              </xsd:extension>
            </xsd:complexContent>
          </xsd:complexType>
        </xsd:schema>
...
</wsdl:types>

Any ideas?

The problem occurs in line xsd:extension base="tns2:SoapBinaryMessage

役に立ちましたか?

解決

You're missing the prefix declaration for tns2; this needs to be added somewhere such that it'll be in scope for the <xsd:extension base="tns2:SoapBinaryMessage"> node (the best place as far as I am concerned might be the second xsd:schema declaration):

xmlns:tns2="http://types.osqq.syqq.com"
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top