views:

39

answers:

1

I have the following service definition (incomplete, but demonstrates the error. Visual Studio tells me (translated from german) "In this Schema Namespace http://schemas.xmlsoap.org/wsdl/ is not available" at the line where I define OffertXML.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="TestOffertverwaltung"
 targetNamespace="urn:TestOffertverwaltung"
 xmlns:tns="urn:TestOffertverwaltung"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:types="urn:Test/types"
 xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
 xmlns="http://schemas.xmlsoap.org/wsdl/"&gt;

    <wsdl:types>

        <xsd:schema targetNamespace="urn:Test/types">

            <xsd:element name="OffertXML" type="string"/>
            <xsd:element name="OffertPDF" xmime:expectedContentTypes='image/jpeg' type="xmime:base64Binary"/>
            <xsd:element name="OffertMeta" type="string"/>
            <xsd:element name="OffertId" type="string"/>

        </xsd:schema>

    </wsdl:types>

<!-- ... -->
</wsdl:definitions>
A: 

You need to set your type with

type="xsd:string"

Currently use are setting the type to string in the default namespace which is http://schemas.xmlsoap.org/wsdl/string, hence which is a type which is not available.

Nick Jones
Why is it not available? The surrounding element is in namespace xsd.
codymanix
Just because the surrounding element is in the xsd namespace that does not change the default namespace (xmlns="...") - this is what the types will be expanded against.
Nick Jones