axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank J. Øynes" <heksem...@gmail.com>
Subject Re: xmlns="" on wrong element
Date Sun, 21 Oct 2007 22:42:57 GMT
I now know that I know close to nothing, but I made it work:

step 1:
By setting elementFormDefault to "qualified",
and attributeFormDefault to "unqualified" I got rid of both the unwanted
xmlns="".

step 2:
By putting form="unqualified" in the element where I *needed* xmlns="";
<s:element name="StoredProcess" form="unqualified">
I managed to create an exact replica of the correct soap request.

>From the little I still think I do know, I agree with Philipp, but as long
as the
service provider only accepts *exactly* this soap template all I can do is
try to comply.

Thanks for all your help, your ideas and references together with Google
brought me a big step ahead, even if it is not done the correct way....
--Frank

2007/10/21, Philipp Leitner <philipp.leitner@gmx.at>:
>
> Seems strange to me. If I remember my XML basics course correctly then
> 'xmlns=""' is the same as having no namespace declaration at all
> (supposing that you do not have a default namespace). If that is correct
> then both SOAP requests that you mentioned are absolutely identical.
>
> Personally I would recommend to 'not' use the -sp options and give it a
> try with the default ns settings ...
>
> /philipp
>
> Frank J. Øynes wrote:
> > 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>
> >
> > :
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Mime
View raw message