axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: unexpected subelement
Date Fri, 19 Oct 2007 12:24:30 GMT
Your other alternative is to define the "value" element as "xs:anyType":

   <xsd:element maxOccurs="1" minOccurs="1"
        name="value" type="xs:anyType">

Anne

On 10/19/07, Amila Suriarachchi <amilasuriarachchi@gmail.com> wrote:
>
>
>
> On 10/18/07, Kahler, Jason J (US SSA) <jason.kahler@baesystems.com> wrote:
> > I have a wsdl that uses an xsd:any in a complexType.
> > When I submit request via SoapUI I get Unexpected subelement value. I am
> > using adb as my databinding.
> >
> > Here is my WSDL snippet.
> >
> >
> > <xsd:complexType name="QueryTerm">
> >                 <xsd:sequence>
> >                     <xsd:element maxOccurs="1"
> minOccurs="1"
> > name="ParameterName" type="xsd:string"/>
> >                     <xsd:element maxOccurs="1"
> minOccurs="1"
> > name="queryOperator" type="tns:queryOperatorType"/>
> >                     <xsd:element maxOccurs="1"
> minOccurs="1"
> > name="value" type="tns:queryValueType">
> >                     </xsd:element>
> >                 </xsd:sequence>
> >             </xsd:complexType>
> >
> >             <xsd:simpleType name="queryOperatorType">
> >                 <xsd:restriction base="xsd:string">
> >                     <xsd:enumeration value="="/>
> >                     <xsd:enumeration value="&lt;"/>
> >                     <xsd:enumeration value="&lt;="/>
> >                     <xsd:enumeration value="&gt;"/>
> >                     <xsd:enumeration value="&gt;="/>
> >                     <xsd:enumeration value="!="/>
> >                     <xsd:enumeration value="like"/>
> >                     <xsd:enumeration value="not like"/>
> >                     <xsd:enumeration value="intersect"/>
> >                     <xsd:enumeration value="outside"/>
> >                     <xsd:enumeration value="inside"/>
> >                 </xsd:restriction>
> >             </xsd:simpleType>
> >
> >             <xsd:complexType name="queryValueType">
> >                 <xsd:sequence>
> >                     <xsd:any namespace="##any" processContents="lax"/>
> >
> >                 </xsd:sequence>
> >             </xsd:complexType>
> >
> >
> >
> > Soap Request:
> >
> > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:wfnp=" http://wfnp">
> >   <soapenv:Header/>
> >    <soapenv:Body>
> >     <wfnp:submitQuery>
> >          <wfnp:QueryTerm>
> >
> <wfnp:ParameterName>anyOldPAram</wfnp:ParameterName>
> >             <wfnp:queryOperator>=</wfnp:queryOperator>
> >             <wfnp:value>myValue</wfnp:value>
>
> this is an  invalid xml. since type is any then you should have a vail xml
> inside value element
> try this
>  <wfnp:value><myValue/></wfnp:value>
> >          </wfnp:QueryTerm>
> >       </wfnp:submitQuery>
> >    </soapenv:Body>
> > </soapenv:Envelope>
> >
> >
> > Soap Response:
> >
> > <soapenv:Envelope
> > xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/">
> >    <soapenv:Body>
> >       <soapenv:Fault>
> >          <faultcode>soapenv:Server</faultcode>
> >
> <faultstring>org.apache.axis2.databinding.ADBException :
> > Unexpected subelement value</faultstring>
> >          <detail/>
> >       </soapenv:Fault>
> >    </soapenv:Body>
> > </soapenv:Envelope>
> >
> > I saw some posts about bugs, but I am using a new version of axis2.
> > Also I use an xsd:any in another service with no issues?
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.

---------------------------------------------------------------------
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