← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6274: Fix 406 error for mobile

 

------------------------------------------------------------
revno: 6274
committer: Long <thanhlongngo1988>
branch nick: dhis2
timestamp: Fri 2012-03-16 13:36:41 +0700
message:
  Fix 406 error for mobile
modified:
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java
  dhis-2/dhis-web/dhis-web-api-mobile/pom.xml
  dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java
  dhis-2/dhis-web/dhis-web-api-mobile/src/main/resources/META-INF/dhis/servlet.xml
  dhis-2/dhis-web/dhis-web-api/pom.xml
  dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml
  dhis-2/dhis-web/dhis-web-portal/pom.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java	2011-11-04 11:27:33 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java	2012-03-16 06:36:41 +0000
@@ -113,7 +113,7 @@
 
         org.hisp.dhis.program.Program program = programService.getProgram( programId );
 
-        program = i18n( i18nService, locale, program );
+        //program = i18n( i18nService, locale, program );
 
         Program pr = new Program();
 
@@ -125,7 +125,7 @@
 
         for ( org.hisp.dhis.program.ProgramStage programStage : program.getProgramStages() )
         {
-            programStage = i18n( i18nService, locale, programStage );
+            //programStage = i18n( i18nService, locale, programStage );
 
             ProgramStage prStg = new ProgramStage();
 
@@ -139,7 +139,7 @@
 
             for ( ProgramStageDataElement programStagedataElement : programStageDataElements )
             {
-                programStagedataElement = i18n( i18nService, locale, programStagedataElement );
+                //programStagedataElement = i18n( i18nService, locale, programStagedataElement );
 
                 org.hisp.dhis.dataelement.DataElement dataElement = programStagedataElement.getDataElement();
 

=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/pom.xml'
--- dhis-2/dhis-web/dhis-web-api-mobile/pom.xml	2012-02-20 12:01:56 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/pom.xml	2012-03-16 06:36:41 +0000
@@ -10,7 +10,7 @@
   
 
   <artifactId>dhis-web-api-mobile</artifactId>
-  <packaging>war</packaging>
+  <packaging>jar</packaging>
   <name>DHIS Mobile API</name>
 
   <dependencies>

=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java	2012-01-20 10:38:11 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java	2012-03-16 06:36:41 +0000
@@ -70,7 +70,7 @@
     private static String getUrl( HttpServletRequest request, int id, String path )
     {
         String url = UrlUtils.buildFullRequestUrl( request );
-        url = url + "orgUnits/" + id + "/" + path;
+        url = url + "/orgUnits/" + id + "/" + path;
         return url;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/src/main/resources/META-INF/dhis/servlet.xml'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/resources/META-INF/dhis/servlet.xml	2012-01-06 12:12:16 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/resources/META-INF/dhis/servlet.xml	2012-03-16 06:36:41 +0000
@@ -1,21 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/mvc";
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-	xmlns:beans="http://www.springframework.org/schema/beans";
-	xmlns:context="http://www.springframework.org/schema/context";
-	xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
-		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
-		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd";>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="http://www.springframework.org/schema/beans";
+       xmlns:context="http://www.springframework.org/schema/context";
+       xmlns:mvc="http://www.springframework.org/schema/mvc";
+       xmlns:sec="http://www.springframework.org/schema/security";
+       xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
+    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
+    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd";>
 
 	<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
 	
 	<!-- Enables the Spring MVC @Controller programming model -->
-	<annotation-driven>
-    <message-converters>
-        <beans:bean class="org.hisp.dhis.api.mobile.support.DataStreamSerializableMessageConverter"/>
-    </message-converters>
-	</annotation-driven>
+	<mvc:annotation-driven>
+		<mvc:message-converters>
+			<bean class="org.hisp.dhis.api.mobile.support.DataStreamSerializableMessageConverter"/>
+		</mvc:message-converters>
+	</mvc:annotation-driven>
 
 	<context:component-scan base-package="org.hisp.dhis.api.mobile" />
 	
-</beans:beans>
+</beans>

=== modified file 'dhis-2/dhis-web/dhis-web-api/pom.xml'
--- dhis-2/dhis-web/dhis-web-api/pom.xml	2012-02-20 12:01:56 +0000
+++ dhis-2/dhis-web/dhis-web-api/pom.xml	2012-03-16 06:36:41 +0000
@@ -53,6 +53,11 @@
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-service-sms</artifactId>
     </dependency>
+	<dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-web-api-mobile</artifactId>
+	  <version>${project.version}</version>
+    </dependency>
 	
     <dependency>
       <groupId>javax.servlet</groupId>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml	2012-03-05 14:43:22 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml	2012-03-16 06:36:41 +0000
@@ -11,7 +11,11 @@
 
   <sec:global-method-security pre-post-annotations="enabled" />
 
-  <mvc:annotation-driven />
+	<mvc:annotation-driven>
+		<mvc:message-converters>
+			<bean class="org.hisp.dhis.api.mobile.support.DataStreamSerializableMessageConverter"/>
+		</mvc:message-converters>
+	</mvc:annotation-driven>
 
   <context:component-scan base-package="org.hisp.dhis.api" />
 

=== modified file 'dhis-2/dhis-web/dhis-web-portal/pom.xml'
--- dhis-2/dhis-web/dhis-web-portal/pom.xml	2012-02-20 12:01:56 +0000
+++ dhis-2/dhis-web/dhis-web-portal/pom.xml	2012-03-16 06:36:41 +0000
@@ -131,7 +131,7 @@
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-api-mobile</artifactId>
       <version>${project.version}</version>
-      <type>war</type>
+      <type>jar</type>
     </dependency>
     <dependency>
       <groupId>org.hisp.dhis</groupId>