I changed my type to xsd:anyType, Interestingly enough now If I pass a string Such as <wfnp:value>aValue</wfnp:value>
I get a null pointer on the resulting OMElement Evidently the string is not treated as a text node, nor is it Serialized into on OMElement with a string value of "aValue". -----Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Friday, October 19, 2007 8:25 AM To: [email protected] Subject: Re: unexpected subelement 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 <[EMAIL PROTECTED]> wrote: > > > > On 10/18/07, Kahler, Jason J (US SSA) <[EMAIL PROTECTED]> 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="<"/> > > <xsd:enumeration value="<="/> > > <xsd:enumeration value=">"/> > > <xsd:enumeration value=">="/> > > <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: > [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > Amila Suriarachchi, > WSO2 Inc. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
