Hi Miguel Angel , i sent you this, hope this works for you
For the complex response just create a java bean and this has to be the
response of your method in the web service response, or also could me a
simpls xml string
1) Bajar última versión de war de axis2 y deployar en tomcat
2) Ir a "Directorio de instalacion Tomcat\" webapps y buscar la carpeta
axis2, entrar a WEB-INF y copiar todo lo que contiene
3) Pegar la seleccion anterior dentro de la carpeta WEB-INF del proyecto
que se creo. Los cambios en adelante seran en las carpetas del proyecto
web
4) Crear la carpeta services dentro de WEB-INF (si es que no existe)
5) Escribir las clases que se necesiten para el webservice (bottom up)
6) En services (del paso 4) crear una carpeta(este nombre debe ser
descriptivo del WebService) y dentro de ella copiar la estructura de
directorios resultante de las clases (estructura de directorios =
paquetes)
7) En la carpeta services se encuentra un archivo .aar, el cual se debe
descomprimir y extraer de el el archivo services.xml
8) Dentro de la carpeta del punto 6 crear la carpeta META-INF y ahí copiar
el archivo services.xml
9) Editar el services XML para especificarle cuál es la clase fachada. En
el tag service, en su atributo name, poner el nombre de la carpeta de paso
6. En el tag parameter cambiar el texto contenido en el tag opr el nombre
de la clase fachada. En tag operation en su atributo name, escribir el
nombre del metodo de la clase escrita.
10) Compilar el proyecto
11) deployar en tomcat
12) Para comprobar que el WS (web service) se hizo bien se debe de abrir
un navegador web y escribir lo siguiente:
http://localhost:8080/NombreDelProyecto/services/CarpetaCreadaPaso6?wsdl
Regards
Miguel Pardo
Lider de Proyecto
De:
Miguel Angel Iglesias <[email protected]>
Para:
[email protected]
Fecha:
11/08/2009 12:00 pm
Asunto:
complex response in a response without a complex type
Hello, one of our clients ask us to process a soap 1.1 request like this
one:
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&qu ot;
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/&q uot;>
<soap:Body>
<Consulta xmlns="<< URL del comercio >>">
<referencia>123456</referencia>
<facturador>000001</facturador>
<estatus>000</estatus>
<referencia1></referencia1>
<fecha>0 0000000</fecha>
<importe>00000000000000</importe>
</Consulta>
</soap:Body>
</soap:Envelope>
I can process the request without problems, but they want the response
in this way:
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&qu ot;
xmlns:xsd="http://www.w3.org/2001/XMLSchema" ;
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/&q uot;>
<soap:Body>
<ConsultaResponse xmlns="<< URL del comercio >>">
<referencia>123456</referencia>
<facturador>000001</facturador>
<estatus>001</estatus>
<referencia1>123456</referencia1>
<fecha>20081129</fecha>
<importe>10012</importe>
</ConsultaResponse>
</soap:Body>
</soap:Envelope>
I do not have much experience in web services or axis2, but I dont get
how to send a complex response without a wrapper...
So please, any suggestion you might have will be very helpful
--
Ing. Miguel Angel Iglesias
Gerente de Producción
CellnPay SA de CV
Oficina: 52 (55) 55498918 ext 136
Cel: +52 (55)5530384897