This is probably a noob question, but I am having problem setting up my
wsdl file so that the SOAP request sent by my client is accepted by the
service.
There are two places where the xmlns="" is put, first at the "Command"
element, and later at the "Properties"'
The service requires xmlns="" in the "StoredProcess" element, i.e. the
first child of where in now ends up, and does not accept that it is in
the "Properties" element.
Can someone please hint me what I am doing wrong here? How can I make
the xmlns="" disappear from <Command> and <Properties>,
and make it appear in <StoredProcess> ?
(btw, I am using wsdl2java with the -sp option to suppress all ns
prefixes, and also state "unqualified" for both elements and attributes)
---- LISTING OF ACCEPTABLE SOAP REQUEST -----
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<Execute xmlns="urn:schemas-microsoft-com:xml-analysis">
<Command>
<StoredProcess xmlns="" name="Online Scoring">
<Stream name="instream">
<Table>
<PM_SOK>
<Naeringsinteresser_a>22</Naeringsinteresser_a>
<Anm_Antall_a>43</Anm_Antall_a>
<D_Inntekt_Skatt_t0_t2_R>44</D_Inntekt_Skatt_t0_t2_R>
<D_Formue_t0_t2_R>45</D_Formue_t0_t2_R>
<Overtrekk_belop_mean_6>46</Overtrekk_belop_mean_6>
<Purring_1_gang_Nye_YY>47</Purring_1_gang_Nye_YY>
<Dager_Eldste_Konto_a>48</Dager_Eldste_Konto_a>
<Omsetning_KR_Mean_3>49</Omsetning_KR_Mean_3>
</PM_SOK>
</Table>
</Stream>
</StoredProcess>
</Command>
<Properties>
<PropertyList>
<DataSourceInfo>Provider=SASSPS</DataSourceInfo>
<Content>Data</Content>
</PropertyList>
</Properties>
</Execute>
</soapenv:Body>
</soapenv:Envelope>
----- AND THIS IS REJECTED DUE TO THE SMALL DIFFERENCES MENTIONED ------
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<Execute xmlns="urn:schemas-microsoft-com:xml-analysis">
<Command xmlns="">
<StoredProcess name="Online Scoring">
<Stream name="instream">
<Table>
<PM_SOK>
<Naeringsinteresser_a>22</Naeringsinteresser_a>
<Anm_Antall_a>43</Anm_Antall_a>
<D_Inntekt_Skatt_t0_t2_R>44</D_Inntekt_Skatt_t0_t2_R>
<D_Formue_t0_t2_R>45</D_Formue_t0_t2_R>
<Overtrekk_belop_mean_6>46</Overtrekk_belop_mean_6>
<Purring_1_gang_Nye_YY>47</Purring_1_gang_Nye_YY>
<Dager_Eldste_Konto_a>48</Dager_Eldste_Konto_a>
<Omsetning_KR_Mean_3>49</Omsetning_KR_Mean_3>
</PM_SOK>
</Table>
</Stream>
</StoredProcess>
</Command>
<Properties xmlns="">
<PropertyList>
<DataSourceInfo>Provider=SASSPS</DataSourceInfo>
<Content>Data</Content>
</PropertyList>
</Properties>
</Execute>
</soapenv:Body>
</soapenv:Envelope>
----- Complete WSDL: -----
<?xml version=" 1.0" encoding="utf-8"?>
<q1:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tm="
http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:s0="urn:schemas-microsoft-com:xml-analysis"
xmlns:q1="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:schemas-microsoft-com:xml-analysis">
<q1:types>
<s:schema
targetNamespace="urn:schemas-microsoft-com:xml-analysis"
elementFormDefault="unqualified" attributeFormDefault="unqualified">
<s:element name="Discover">
<s:complexType>
<s:sequence>
<s:element name="RequestType" type="s:string"
nillable="true"/>
<s:element name="Restrictions" nillable="true">
<s:complexType>
<s:sequence>
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Properties" nillable="true">
<s:complexType>
<s:sequence>
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="DiscoverResponse">
<s:complexType>
<s:sequence>
<s:element name="return" minOccurs="0">
<s:complexType>
<s:sequence>
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Execute">
<s:complexType>
<s:sequence>
<s:element name="Command" nillable="true">
<s:complexType>
<s:sequence>
<s:element name="StoredProcess">
<s:complexType>
<s:sequence>
<s:element name="Stream">
<s:complexType>
<s:sequence>
<s:element
name="Table">
<s:complexType>
<s:sequence>
<s:element name="PM_SOK">
<s:complexType>
<s:sequence>
<s:element name="Naeringsinteresser_a" type="s:string"/>
<s:element name="Anm_Antall_a" type="s:string"/>
<s:element name="D_Inntekt_Skatt_t0_t2_R" type="s:string"/>
<s:element name="D_Formue_t0_t2_R" type="s:string"/>
<s:element name="Overtrekk_belop_mean_6" type="s:string"/>
<s:element name="Purring_1_gang_Nye_YY" type="s:string"/>
<s:element name="Dager_Eldste_Konto_a" type="s:string"/>
<s:element name="Omsetning_KR_Mean_3" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
<s:attribute
name="name" use="required">
<s:simpleType>
<s:restriction base="s:string">
<s:enumeration value="instream"/>
</s:restriction>
</s:simpleType>
</s:attribute>
</s:complexType>
</s:element>
</s:sequence>
<s:attribute name="name"
use="required">
<s:simpleType>
<s:restriction
base="s:string">
<s:enumeration
value="Online Scoring"/>
</s:restriction>
</s:simpleType>
</s:attribute>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Properties" nillable="true">
<s:complexType>
<s:sequence>
<s:element name="PropertyList">
<s:complexType>
<s:sequence>
<s:element
name="DataSourceInfo">
<s:simpleType>
<s:restriction
base="s:string">
<s:enumeration value="Provider=SASSPS"/>
</s:restriction>
</s:simpleType>
</s:element>
<s:element name="Content">
<s:simpleType>
<s:restriction
base="s:string">
<s:enumeration value="Data"/>
</s:restriction>
</s:simpleType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ExecuteResponse">
<s:complexType>
<s:sequence>
<s:element name="return" minOccurs="0">
<s:complexType>
<s:sequence>
<s:element name="TABLE">
<s:complexType>
<s:sequence>
<s:element
name="SCORE_RESULT">
<s:complexType>
<s:sequence>
<s:element
name="PD_FLT" type="s:string"/>
<s:element
name="RISK_CLASS_CHR" type="s:string"/>
<s:element
name="SCORE_INT" type="s:string"/>
<s:element
name="TIMESTAMP_DT" type="s:string"/>
<s:element
name="SCORECARD_ID" type="s:string"/>
<s:element
name="LINDORFF_ZONE" type="s:string"/>
<s:element
name="SCORE_NAERING_INT" type="s:string"/>
<s:element
name="SCORE_ANT_ANT_INT" type="s:string"/>
<s:element
name="SCORE_INNTEKT_SKATT_ENDRING_FLT" type="s:string"/>
<s:element
name="SCORE_FORMUE_ENDRING_FLT" type="s:string"/>
<s:element
name="SCORE_OVERTREKK_AMT" type="s:string"/>
<s:element
name="SCORE_PURRINGER_INT" type="s:string"/>
<s:element
name="SCORE_DAGER_ELDSTE_KONTO_INT" type="s:string"/>
<s:element
name="SCORE_OMSETNING_KR_INT" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</q1:types>
<q1:message name="DiscoverSoapIn">
<q1:part name="parameters" element="s0:Discover"/>
</q1:message>
<q1:message name="DiscoverSoapOut">
<q1:part name="parameters" element="s0:DiscoverResponse"/>
</q1:message>
<q1:message name="ExecuteSoapIn">
<q1:part name="parameters" element="s0:Execute"/>
</q1:message>
<q1:message name="ExecuteSoapOut">
<q1:part name="parameters" element="s0:ExecuteResponse"/>
</q1:message>
<q1:portType name="MsXmlAnalysisSoap">
<q1:operation name="Discover">
<q1:input message="s0:DiscoverSoapIn"/>
<q1:output message="s0:DiscoverSoapOut"/>
</q1:operation>
<q1:operation name="Execute">
<q1:input message="s0:ExecuteSoapIn"/>
<q1:output message="s0:ExecuteSoapOut"/>
</q1:operation>
</q1:portType>
<q1:portType name="MsXmlAnalysisHttpGet"/>
<q1:portType name="MsXmlAnalysisHttpPost"/>
<q1:binding name="MsXmlAnalysisSoap" type="s0:MsXmlAnalysisSoap">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http
<http://schemas.xmlsoap.org/soap/http>"/>
<q1:operation name="Discover">
<soap:operation
soapAction="urn:schemas-microsoft-com:xml-analysis:Discover"
style="document"/>
<q1:input>
<soap:body use="literal"/>
</q1:input>
<q1:output>
<soap:body use="literal"/>
</q1:output>
</q1:operation>
<q1:operation name="Execute">
<soap:operation
soapAction="urn:schemas-microsoft-com:xml-analysis:Execute"
style="document"/>
<q1:input>
<soap:body use="literal"/>
</q1:input>
<q1:output>
<soap:body use="literal"/>
</q1:output>
</q1:operation>
</q1:binding>
<q1:binding name="MsXmlAnalysisHttpGet" type="s0:MsXmlAnalysisHttpGet">
<http:binding verb="GET"/>
</q1:binding>
<q1:binding name="MsXmlAnalysisHttpPost"
type="s0:MsXmlAnalysisHttpPost">
<http:binding verb="POST"/>
</q1:binding>
<q1:service name="MsXmlAnalysis">
<q1:port name="MsXmlAnalysisSoap" binding="s0:MsXmlAnalysisSoap">
<soap:address location="http://xxxx"/>
</q1:port>
<q1:port name="MsXmlAnalysisHttpGet"
binding="s0:MsXmlAnalysisHttpGet">
<http:address location="http://xxxx"/>
</q1:port>
<q1:port name="MsXmlAnalysisHttpPost"
binding="s0:MsXmlAnalysisHttpPost">
<http:address location="xxxx"/>
</q1:port>
</q1:service>
</q1:definitions>
: