I am attempting to use IBM cast iron with the softlayer SOAP services. out of the gate, i get a validation error with the softlayer wsdl that is downloadable here. the validation fails in oxygen v18 as well. in both cases, the error occurs on this include spec in the wsdl:
<xsd:schema targetNamespace="http://api.service.softlayer.com/soap/v3/">
<xsd:include namespace="http://api.service.softlayer.com/soap/v3/"
schemaLocation="https://api.softlayer.com/soap/v3/SoftLayer_Account?xsd"/>
</xsd:schema>
and this is the error.
cvc-complex-type.3.2.2: Attribute 'namespace' is not allowed to appear in element 'xsd:include'.
ok, namespace is not a valid attribute for the include spec. hard to believe that softlayer's wsdl used by the whole world uses successfully (except for me) is not valid. i remove the namespace attribute and then i see that the type definition cannot be resolved on the element spec reference to tns:SoftLayer_Account.
<xsd:schema targetNamespace="http://api.service.softlayer.com/soap/v3/">
<xsd:complexType name="SoftLayer_AccountObjectMask">
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="mask" type="tns:SoftLayer_Account"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
and a whole slew of errors like this in the context of the wsdl operation specs.
The namespace for the SOAP header is not specified. When the use is encoded a namespace URI must be defined.
here is one of the operations where the error occurs.
<operation name="addReferralPartnerPaymentOption">
<soap:operation soapAction="http://api.service.softlayer.com/soap/v3/SoftLayer_AccountAction"/>
<input>
<soap:header message="tns:authenticateHeader" part="authenticate" use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
...
For context, here are the beginning lines of the wsdl.
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://api.service.softlayer.com/soap/v3/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="slApi"
targetNamespace="http://api.service.softlayer.com/soap/v3/">
<types>
<xsd:schema targetNamespace="http://api.service.softlayer.com/soap/v3/">
<xsd:include namespace="http://api.service.softlayer.com/soap/v3/"
schemaLocation="https://api.softlayer.com/soap/v3/SoftLayer_Account?xsd"/>
</xsd:schema>
<xsd:schema targetNamespace="http://api.service.softlayer.com/soap/v3/">
<xsd:complexType name="SoftLayer_AccountObjectMask">
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="mask" type="tns:SoftLayer_Account"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
<message name="activatePartner">
<part name="accountId" type="xsd:string"/>
<part name="hashCode" type="xsd:string"/>
</message>
...
And the head of the included schema, SoftLayer_Account.xsd.
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://api.service.softlayer.com/soap/v3/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="slApi"
targetNamespace="http://api.service.softlayer.com/soap/v3/">
<types>
<xsd:schema targetNamespace="http://api.service.softlayer.com/soap/v3/">
<xsd:include namespace="http://api.service.softlayer.com/soap/v3/"
schemaLocation="https://api.softlayer.com/soap/v3/SoftLayer_Account?xsd"/>
</xsd:schema>
<xsd:schema targetNamespace="http://api.service.softlayer.com/soap/v3/">
<xsd:complexType name="SoftLayer_AccountObjectMask">
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="mask" type="tns:SoftLayer_Account"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
<message name="activatePartner">
<part name="accountId" type="xsd:string"/>
<part name="hashCode" type="xsd:string"/>
</message>
...
I was expecting a well-formed WSDL from softlayer, and it probably is. it's just that I am an idiot on the topic of wsdl and xml, so any help out there is appreciated!
Thanks, Parke