Foros del Web » Programación para mayores de 30 ;) » Programación General »

Tipo de datos en Web Services

Estas en el tema de Tipo de datos en Web Services en el foro de Programación General en Foros del Web. Saludos. Tengo el siguiente Web Services, donde el tipo de dato que regreso es un array: <cfcomponent> <cffunction name="getMessage" access="remote" returntype=" array " output="false"> <cfargument ...
  #1 (permalink)  
Antiguo 25/01/2005, 10:05
 
Fecha de Ingreso: octubre-2004
Mensajes: 24
Antigüedad: 19 años, 6 meses
Puntos: 0
Tipo de datos en Web Services

Saludos.

Tengo el siguiente Web Services, donde el tipo de dato que regreso es un array:

<cfcomponent>
<cffunction name="getMessage" access="remote" returntype="array" output="false">
<cfargument name="buscaparam" type="string" required="yes">
<cfset criterio=Replace(buscaparam,"("," ","ALL")>
<cfset criterio=Replace(criterio,")"," ","ALL")>
<cfset criterio=Trim(criterio)>
<cfset criterio=Replace(criterio," "," ","ALL")>
<cfset criterio=UCase(Replace(criterio," ",",","ALL"))>
<cfset criterio=Replace(criterio,",AND","","ALL")>
<cfset criterio=Replace(criterio,",OR","","ALL")>
<cfset criterio=Replace(criterio,".",",","ALL")>
<cfif len(criterio) gt 0>
<cfsearch collection="mapserver_geografia" name="Busca" criteria=#criterio#>
<cfif Busca.RecordCount is not 0>
<cfset cnt = 1>
<cfoutput query="Busca">
<cfif len(trim(Busca.title)) lt 1>
<cfset Titulo = "Sin Título">
<cfelse>
<cfset Titulo = Busca.title>
</cfif>
<cfif len(trim(Busca.summary)) lt 1>
<cfset Descrip = "Sin descripcion">
<cfelse>
<cfset Descrip = Busca.summary>
</cfif>
<cfset Direcc=Replace(Busca.url,"á","%E1","ALL")>
<cfset Direcc=Replace(Direcc,"Á","%C1","ALL")>
<cfset Direcc=Replace(Direcc,"é","%E9","ALL")>
<cfset Direcc=Replace(Direcc,"É","%C9","ALL")>
<cfset Direcc=Replace(Direcc,"í","%ED","ALL")>
<cfset Direcc=Replace(Direcc,"Í","%CD","ALL")>
<cfset Direcc=Replace(Direcc,"ó","%F3","ALL")>
<cfset Direcc=Replace(Direcc,"Ó","%D3","ALL")>
<cfset Direcc=Replace(Direcc,"ú","%FA","ALL")>
<cfset Direcc=Replace(Direcc,"Ú","%DA","ALL")>
<cfset Direcc=Replace(Direcc,"ñ","%F1","ALL")>
<cfset Direcc=Replace(Direcc,"Ñ","%D1","ALL")>
<cfset vec_col[cnt]=Titulo & "|" & Descrip & "|" & Direcc>
<cfset cnt = cnt + 1>
</cfoutput>
<cfelse>
<cfset vec_col[1]="a|b|c">
<cfset vec_col[2]=" |No existen registros|">
</cfif>
<cfelse>
<cfset vec_col[1]="a|b|c">
<cfset vec_col[2]=" |No existen registros|">
</cfif>
<cfreturn vec_col>
</cffunction>
</cfcomponent>


El WSDL, me manda la siguiente información:

<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://WebService.actual.Mi_Sitio" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:intf="http://WebService.actual.Mi_Sitio" xmlns:impl="http://WebService.actual.Mi_Sitio-impl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://schemas.xmlsoap.org/wsdl/">
- <types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://WebService.actual.Mi_Sitio">
- <complexType name="ArrayOf_xsd_anyType">
- <complexContent>
- <restriction base="SOAP-ENC:Array">
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:anyType[]" />
</restriction>
</complexContent>
</complexType>
<element name="ArrayOf_xsd_anyType" nillable="true" type="intf:ArrayOf_xsd_anyType" />


Mi problema, es que no se como cambiar el tipo de dato: ArrayOf_xsd_anyType por ArrayOf_xsd_String




</schema>
</types>
- <wsdl:message name="getMessageRequest">
<wsdl:part name="buscaparam" type="SOAP-ENC:string" />
</wsdl:message>
<wsdl:message name="CFCInvocationException" />
- <wsdl:message name="getMessageResponse">
<wsdl:part name="return" type="intf:ArrayOf_xsd_anyType" />
</wsdl:message>
- <wsdl:portType name="lib_busqueda">
- <wsdl:operation name="getMessage" parameterOrder="buscaparam">
<wsdl:input message="intf:getMessageRequest" />
<wsdl:output message="intf:getMessageResponse" />
<wsdl:fault name="CFCInvocationException" message="intf:CFCInvocationException" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="lib_busqueda.cfcSoapBinding" type="intf:lib_busqueda">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="getMessage">
<wsdlsoap:operation soapAction="" />
- <wsdl:input>
<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://WebService.actual.Mi_Sitio" />
</wsdl:input>
- <wsdl:output>
<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://WebService.actual.Mi_Sitio" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="lib_busquedaService">
- <wsdl:port name="lib_busqueda.cfc" binding="intf:lib_busqueda.cfcSoapBinding">
<wsdlsoap:address location="http://localhost:8500/Mi_Sitio/actual/WebService/lib_busqueda.cfc" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>


Alguna idea?

Última edición por heavybalderas; 26/01/2005 a las 12:47
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:46.