Commit 252b3fe51d50dd5bbbce1b3e01f1e6ec64d356d0

Authored by daniel@ruoso.com
1 parent e2dbffbf
Exists in master

Corrigindo alguns bugs,


git-svn-id: http://svn.softwarepublico.gov.br/svn/sistemadeatendimento/sistema/trunk@7 63db2ce5-8a6c-0410-abb9-a418dd412890
Apache2/fila-vhost.conf
... ... @@ -14,21 +14,24 @@
14 14 # Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o
15 15 # título "LICENCA.txt", junto com este programa, se não, escreva para a
16 16 # Fundação do Software Livre(FSF) Inc., 51 Franklin St, Fifth Floor,
17   -PerlSwitches -I/home/oktiva/fila/Fila-Administracao/lib/
  17 +PerlSetEnv FILA_ADMINISTRACAO_HOME /usr/share/fila/Fila-Administracao
  18 +SetEnv FILA_WEBAPP_HOME /usr/share/fila/Fila-Web
  19 +SetEnv FILA_WEB_HOME /usr/share/fila/Fila-Web
  20 +PerlSwitches -I/usr/share/fila/Fila-Administracao/lib/
18 21 PerlModule Fila::Administracao
19 22  
20 23 <VirtualHost *:80>
21 24  
22 25 ServerName localhost
23   - DocumentRoot /home/oktiva/fila/Fila-Web/root/
  26 + DocumentRoot /usr/share/fila/Fila-Web/root/
24 27  
25 28 <Location /static>
26 29 SetHandler default-handler
27 30 </Location>
28 31  
29 32 # nph-app.cgi
30   - ScriptAlias /cgi-bin/ /home/oktiva/fila/Fila-Web/cgi-bin/
31   - <Directory /home/oktiva/fila/Fila-Web/cgi-bin>
  33 + ScriptAlias /cgi-bin/ /usr/share/fila/Fila-Web/cgi-bin/
  34 + <Directory /usr/share/fila/Fila-Web/cgi-bin>
32 35 Options +ExecCGI
33 36 AddHandler cgi-script .cgi
34 37 </Directory>
... ... @@ -37,15 +40,15 @@ PerlModule Fila::Administracao
37 40 SetHandler cgi-script
38 41 </Location>
39 42  
40   - FastCgiServer /home/oktiva/fila/Fila-Web/script/fila_web_fastcgi.pl -processes 10
41   - Alias / /home/oktiva/fila/Fila-Web/script/fila_web_fastcgi.pl/
  43 + FastCgiServer /usr/share/fila/Fila-Web/script/fila_web_fastcgi.pl -processes 10 -initial-env FILA_WEB_HOME=/usr/share/fila/Fila-Web -initial-env FILA_WEBAPP_HOME=/usr/share/fila/Fila-Web
  44 + Alias / /usr/share/fila/Fila-Web/script/fila_web_fastcgi.pl/
42 45  
43 46 </VirtualHost>
44 47  
45 48 <VirtualHost *:8081>
46 49  
47 50 ServerName localhost
48   - DocumentRoot /home/oktiva/fila/Fila-Administracao/root/
  51 + DocumentRoot /usr/share/fila/Fila-Administracao/root/
49 52  
50 53 <Location />
51 54 SetHandler modperl
... ...
Fila-Servico/lib/Fila/Servico/Controller.pm
... ... @@ -91,7 +91,7 @@ sub end : Private {
91 91 for my $id_guiche (@{$c->stash->{refresh_guiche}}) {
92 92 $c->model('SOAP')->transport->connection($c->engine->connection($c));
93 93 $c->model('SOAP')->transport->addrs(['motor@gestao.fila.vhost/ws/scheduler']);
94   - $c->model('SOAP::Scheduler')->escalonar_senha({ local => { id_guiche => $id_guiche } });
  94 + $c->model('SOAP::Scheduler')->refresh_guiche({ guiche => { id_guiche => $id_guiche } });
95 95 }
96 96 }
97 97  
... ...
Fila-Servico/lib/Fila/Servico/Controller/WS/Gestao/Local.pm
... ... @@ -105,7 +105,7 @@ sub refresh_gerente :Private {
105 105 # Essa operação é somente leitura, dessa forma, vamos mandar o
106 106 # model alterar o tipo da transação, de forma a reduzir a
107 107 # contenção de locks
108   - $storage->dbh_do('SET TRANSACTION READ ONLY');
  108 + $storage->dbh->do('SET TRANSACTION READ ONLY');
109 109  
110 110 my $local = $self->status_local($c, {});
111 111 my $guiches = $self->status_guiches($c, {});
... ...
Fila-Servico/lib/Fila/Servico/Controller/WS/Scheduler.pm
... ... @@ -44,7 +44,6 @@ sub auto :Private {
44 44  
45 45 # todas essas operações são read-only, então não precisamos fazer
46 46 # nenhuma checagem de autenticação.
47   -
48 47 sub escalonar_senha :WSDLPort('Scheduler') :DBICTransaction('DB') :MI {
49 48 my ($self, $c, $query) = @_;
50 49  
... ... @@ -54,6 +53,7 @@ sub escalonar_senha :WSDLPort(&#39;Scheduler&#39;) :DBICTransaction(&#39;DB&#39;) :MI {
54 53 $c->stash->{funcionario} = $c->stash->{gerente}->funcionario;
55 54 $c->forward('/ws/gestao/local/escalonar_senha');
56 55  
  56 + $c->stash->{soap}->compile_return(undef);
57 57 }
58 58  
59 59 sub refresh_gerente :WSDLPort('Scheduler') :DBICTransaction('DB') :MI {
... ... @@ -65,6 +65,7 @@ sub refresh_gerente :WSDLPort(&#39;Scheduler&#39;) :DBICTransaction(&#39;DB&#39;) :MI {
65 65 $c->stash->{funcionario} = $c->stash->{gerente}->funcionario;
66 66 $c->forward('/ws/gestao/local/refresh_gerente');
67 67  
  68 + $c->stash->{soap}->compile_return(undef);
68 69 }
69 70  
70 71 sub refresh_painel :WSDLPort('Scheduler') :DBICTransaction('DB') :MI {
... ... @@ -76,6 +77,7 @@ sub refresh_painel :WSDLPort(&#39;Scheduler&#39;) :DBICTransaction(&#39;DB&#39;) :MI {
76 77 $c->stash->{funcionario} = $c->stash->{gerente}->funcionario;
77 78 $c->forward('/ws/gestao/local/refresh_painel');
78 79  
  80 + $c->stash->{soap}->compile_return(undef);
79 81 }
80 82  
81 83 sub refresh_guiche :WSDLPort('Scheduler') :DBICTransaction('DB') :MI {
... ... @@ -85,10 +87,11 @@ sub refresh_guiche :WSDLPort(&#39;Scheduler&#39;) :DBICTransaction(&#39;DB&#39;) :MI {
85 87 $c->stash->{guiche} = $c->model('DB::Guiche')->find({ id_guiche => $id_guiche });
86 88 $c->stash->{atendente} = $c->stash->{guiche}->atendente_atual->first;
87 89 $c->stash->{funcionario} = $c->stash->{atendente}->funcionario;
88   - $c->stash->{local} = $c->model->{guiche}->local;
  90 + $c->stash->{local} = $c->stash->{guiche}->local;
89 91 $c->stash->{gerente} = $c->stash->{local}->gerente_atual->first;
90 92 $c->forward('/ws/gestao/atendente/refresh_atendente');
91 93  
  94 + $c->stash->{soap}->compile_return(undef);
92 95 }
93 96  
94 97 1;
... ...
Fila-Servico/schemas/soap-envelope.xsd 0 → 100644
... ... @@ -0,0 +1,116 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!-- Schema for the SOAP/1.1 envelope
  3 +
  4 +Portions © 2001 DevelopMentor.
  5 +© 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.
  6 +
  7 +This document is governed by the W3C Software License [1] as described in the FAQ [2].
  8 +[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
  9 +[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
  10 +By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
  11 +
  12 +Permission to use, copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make:
  13 +
  14 +1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
  15 +
  16 +2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright © 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/"
  17 +
  18 +3. Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
  19 +
  20 +Original W3C files; http://www.w3.org/2001/06/soap-envelope
  21 +Changes made:
  22 + - reverted namespace to http://schemas.xmlsoap.org/soap/envelope/
  23 + - reverted mustUnderstand to only allow 0 and 1 as lexical values
  24 + - made encodingStyle a global attribute 20020825
  25 + - removed default value from mustUnderstand attribute declaration
  26 +
  27 +THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
  28 +
  29 +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
  30 +
  31 +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
  32 +
  33 +-->
  34 +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" targetNamespace="http://schemas.xmlsoap.org/soap/envelope/">
  35 +
  36 + <!-- Envelope, header and body -->
  37 + <xs:element name="Envelope" type="tns:Envelope"/>
  38 + <xs:complexType name="Envelope">
  39 + <xs:sequence>
  40 + <xs:element ref="tns:Header" minOccurs="0"/>
  41 + <xs:element ref="tns:Body" minOccurs="1"/>
  42 + <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
  43 + </xs:sequence>
  44 + <xs:anyAttribute namespace="##other" processContents="lax"/>
  45 + </xs:complexType>
  46 +
  47 + <xs:element name="Header" type="tns:Header"/>
  48 + <xs:complexType name="Header">
  49 + <xs:sequence>
  50 + <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
  51 + </xs:sequence>
  52 + <xs:anyAttribute namespace="##other" processContents="lax"/>
  53 + </xs:complexType>
  54 +
  55 + <xs:element name="Body" type="tns:Body"/>
  56 + <xs:complexType name="Body">
  57 + <xs:sequence>
  58 + <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
  59 + </xs:sequence>
  60 + <xs:anyAttribute namespace="##any" processContents="lax">
  61 + <xs:annotation>
  62 + <xs:documentation>
  63 + Prose in the spec does not specify that attributes are allowed on the Body element
  64 + </xs:documentation>
  65 + </xs:annotation>
  66 + </xs:anyAttribute>
  67 + </xs:complexType>
  68 +
  69 +
  70 + <!-- Global Attributes. The following attributes are intended to be usable via qualified attribute names on any complex type referencing them. -->
  71 + <xs:attribute name="mustUnderstand">
  72 + <xs:simpleType>
  73 + <xs:restriction base="xs:boolean">
  74 + <xs:pattern value="0|1"/>
  75 + </xs:restriction>
  76 + </xs:simpleType>
  77 + </xs:attribute>
  78 + <xs:attribute name="actor" type="xs:anyURI"/>
  79 +
  80 + <xs:simpleType name="encodingStyle">
  81 + <xs:annotation>
  82 + <xs:documentation>
  83 + 'encodingStyle' indicates any canonicalization conventions followed in the contents of the containing element. For example, the value 'http://schemas.xmlsoap.org/soap/encoding/' indicates the pattern described in SOAP specification
  84 + </xs:documentation>
  85 + </xs:annotation>
  86 + <xs:list itemType="xs:anyURI"/>
  87 + </xs:simpleType>
  88 +
  89 + <xs:attribute name="encodingStyle" type="tns:encodingStyle"/>
  90 + <xs:attributeGroup name="encodingStyle">
  91 + <xs:attribute ref="tns:encodingStyle"/>
  92 + </xs:attributeGroup>
  93 +
  94 + <xs:element name="Fault" type="tns:Fault"/>
  95 + <xs:complexType name="Fault" final="extension">
  96 + <xs:annotation>
  97 + <xs:documentation>
  98 + Fault reporting structure
  99 + </xs:documentation>
  100 + </xs:annotation>
  101 + <xs:sequence>
  102 + <xs:element name="faultcode" type="xs:QName" />
  103 + <xs:element name="faultstring" type="xs:string" />
  104 + <xs:element name="faultactor" type="xs:anyURI" minOccurs="0" />
  105 + <xs:element name="detail" type="tns:detail" minOccurs="0" />
  106 + </xs:sequence>
  107 + </xs:complexType>
  108 +
  109 + <xs:complexType name="detail">
  110 + <xs:sequence>
  111 + <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
  112 + </xs:sequence>
  113 + <xs:anyAttribute namespace="##any" processContents="lax"/>
  114 + </xs:complexType>
  115 +
  116 +</xs:schema>
... ...