Please check whether the incoming message maps with the given wsdl for the
service.

thanks,
Amila.

On Thu, Feb 23, 2012 at 11:38 PM, Jorge Infante Osorio <jorg...@uci.cu>wrote:

> Hi all.****
>
> ** **
>
> I use AS 4.1.2 and I have a data  service query with this structure:****
>
> ** **
>
> ** **
>
>    <query id="ObtenerPersonaDadoCIQuery"
> useConfig="default">                        ****
>
>       <sql>SELECT nombre,  CI, IdMunicipio FROM tabla1 WHERE  CId =
> ?</sql>                        ****
>
>       <properties>                                    ****
>
>          <property
> name="org.wso2.ws.dataservice.query_timeout">2</property>
> ****
>
>          <property
> name="org.wso2.ws.dataservice.max_rows">100</property>
> ****
>
>       </properties>                        ****
>
>       <result element="Personas" rowName="Persona" defaultNamespace="
> http://uci.cu/WSDL/PersonalWS2/ObtenerPersonaDadoCIQuery";>
> ****
>
>          <element name="nombre" column="nombre" xsdType="xs:string"
> />                                    ****
>
>          <element name="CI" column="CI" xsdType="xs:string"
> />                                    ****
>
>          <call-query href="ObtenerMunicipioDadoIdMunicipioQuery"
> requiredRoles="">                                                ****
>
>             <with-param name="IdMunicipio" column="IdMunicipio"
> />                                    ****
>
>          </call-query>                                    ****
>
>       </result>                        ****
>
>       <param name="pCI" sqlType="STRING" ordinal="1" />            ****
>
>    </query>   ****
>
> ** **
>
> ** **
>
>    <query id="ObtenerMunicipioDadoIdMunicipioQuery"
> useConfig="test1">                        ****
>
>       <sql>SELECT IdMunicipio, NombreMunicipio, IdProvincia,
> NombreProvincia  FROM tabla2  WHERE dbo.RH_Municipios.Id_Municipio =
> ?</sql>                        ****
>
> ** **
>
>       <result element="Municipio" rowName="" defaultNamespace="
> http://uci.cu/WSDL/PersonalWS2/ObtenerMunicipioDadoIdMunicipioQuery";>
> ****
>
>          <element name="IdMunicipio" column="IdMunicipio"
> xsdType="xs:string" />                                    ****
>
>          <element name="NombreMunicipio" column="NombreMunicipio"
> xsdType="xs:string" />                                    ****
>
>          <element name="Provincia">
>                      ****
>
>             <element name="IdProvincia" column="IdProvincia"
> xsdType="xs:string" />                                                ****
>
>             <element name="NombreProvincia" column="NombreProvincia"
> xsdType="xs:string" />                                    ****
>
>          </element>                        ****
>
>       </result>                        ****
>
>       <param name="IdMunicipio" sqlType="STRING" ordinal="1"
> defaultValue="0" />            ****
>
>    </query>****
>
> ** **
>
>    <operation name="ObtenerPersonaDadoCI">                        ****
>
>       <call-query href="ObtenerPersonaDadoCIQuery">
>                          ****
>
>          <with-param name="pCI" query-param="pCI"
> />                        ****
>
>       </call-query>            ****
>
>    </operation>    ****
>
> ** **
>
> When I call this operation using a java client, in Eclipse, and the
> Persona result have an IdMunicipio value like [1], my client work fine, but
> when Persona  have this [2] I receive this error [3].****
>
> ** **
>
> ** **
>
> [1]****
>
>   <soapenv:Body>****
>
>       <Personas xmlns="
> http://uci.cu/WSDL/PersonalWS2/ObtenerPersonaDadoCIQuery";>****
>
>          <Persona>****
>
>             <CI>12345678912</CI>****
>
>             <nombre>Pepe</nombre>****
>
>             <Municipio xmlns="
> http://uci.cu/WSDL/PersonalWS2/ObtenerMunicipioDadoIdMunicipioQuery";>****
>
>                <IdMunicipio>123 </IdMunicipio>****
>
>                <NombreMunicipio>municipio1</NombreMunicipio>****
>
>                <Provincia>****
>
>                   <IdProvincia>345 </IdProvincia>****
>
>                   <NombreProvincia>provincia1</NombreProvincia>****
>
>                </Provincia>****
>
>             </Municipio>****
>
>          </Persona>****
>
>       </Personas>****
>
>    </soapenv:Body>****
>
> ** **
>
> ** **
>
> [2]****
>
>    <soapenv:Body>****
>
>       <Personas xmlns="
> http://uci.cu/WSDL/PersonalWS2/ObtenerPersonaDadoCIQuery";>****
>
>          <Persona>****
>
>             <CI>45678987654</CI>****
>
>             <nombre>tyui</nombre>****
>
>             <Municipio xmlns="
> http://uci.cu/WSDL/PersonalWS2/ObtenerMunicipioDadoIdMunicipioQuery"; />***
> *
>
>          </Persona>****
>
>       </Personas>****
>
>    </soapenv:Body>****
>
> ** **
>
> ** **
>
> [3]****
>
> Exception in thread "main" org.apache.axis2.AxisFault: *
> org.apache.axis2.databinding.ADBException*: Unexpected subelement
> Municipio****
>
>        at org.apache.axis2.AxisFault.makeFault(*AxisFault.java:430*)****
>
>        at cu.uci.informatizacion.servicios.personal.PersonalWS2Stub.fromOM(
> *PersonalWS2Stub.java:39239*)****
>
>        at
> cu.uci.informatizacion.servicios.personal.PersonalWS2Stub.obtenerPersonaDadoCI(
> *PersonalWS2Stub.java:1621*)****
>
>        at
> cu.uci.informatizacion.servicios.personal.Cliente.obtenerPersonasporID(*
> Cliente.java:112*)****
>
>        at cu.uci.informatizacion.servicios.personal.Cliente.main(*
> Cliente.java:197*)****
>
> Caused by: *java.lang.Exception*: *
> org.apache.axis2.databinding.ADBException*: Unexpected subelement
> Municipio****
>
>        at
> cu.uci.informatizacion.servicios.personal.PersonalWS2Stub$Municipio$Factory.parse(
> *PersonalWS2Stub.java:25551*)****
>
>        at
> cu.uci.informatizacion.servicios.personal.PersonalWS2Stub$Persona25$Factory.parse(
> *PersonalWS2Stub.java:13460*)****
>
>        at
> cu.uci.informatizacion.servicios.personal.PersonalWS2Stub$Personas24$Factory.parse(
> *PersonalWS2Stub.java:28114*)****
>
>        at
> cu.uci.informatizacion.servicios.personal.PersonalWS2Stub$Personas26$Factory.parse(
> *PersonalWS2Stub.java:25868*)****
>
>        at
> cu.uci.informatizacion.servicios.personal.PersonalWS2Stub.fromOM(*
> PersonalWS2Stub.java:39191*)****
>
>        ... 3 more****
>
> Caused by: *org.apache.axis2.databinding.ADBException*: Unexpected
> subelement Municipio****
>
>        at
> cu.uci.informatizacion.servicios.personal.PersonalWS2Stub$Municipio$Factory.parse(
> *PersonalWS2Stub.java:25493*)****
>
>        ... 7 more****
>
> ** **
>
> ** **
>
> ** **
>
> Any idea? The problem are in the Stub client class.****
>
> ** **
>
> Saludos,****
>
> Ing. Jorge Infante Osorio.****
>
> J´Dpto Soluciones SOA.****
>
> CDAE.****
>
> Fac. 5.****
>
> UCI.****
>
> ** **
>
>   <http://www.antiterroristas.cu/>
>
>
> _______________________________________________
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>


-- 
*Amila Suriarachchi*

Software Architect
WSO2 Inc. ; http://wso2.com
lean . enterprise . middleware

phone : +94 71 3082805
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to