<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee"
	xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:jaxws="http://cxf.apache.org/jaxws"
	xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/jee 
        http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
        http://cxf.apache.org/jaxws 
		http://cxf.apache.org/schemas/jaxws.xsd
		http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd">
     
    
    <context:component-scan base-package="mx.com.amx.mx.dda.ws"/>
        
	<mvc:annotation-driven/>

	
    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 
		<property name="location">
			<value>classpath:general.properties</value>
		</property>
	</bean>

	<!-- 
    <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
    	<property name="order" value="1" />     
  		<property name="mediaTypes">
		    <map>
		    	<entry key="json" value="application/json"/>	
		      	<entry key="html" value="text/html"/>      
		    </map>
  		</property>
  
	  	<property name="defaultViews">
	    	<list>
	      		<bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
	        		<property name="prefixJson" value="true"/>
	        		<property name="contentType" value="application/json;charset=UTF-8"/>
	      		</bean>
	    	</list>
	  	</property>
	  	<property name="ignoreAcceptHeader" value="true" />	 
	</bean>
	
	<bean id="jaxbMarshallerBean" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
        <property name="classesToBeBound">
            <list>
                <value>com.americamovil.dda.enviapedidocompra.DTPedidoCompra</value>
                <value>com.americamovil.dda.enviapedidocompra.DTPedidoCompraRes</value>
                
            </list>
        </property>
        <property name="marshallerProperties">
			<map>
				<entry key="jaxb.encoding">
					<value>UTF-8</value>
				</entry>
			</map>
		</property>
    </bean>
    
    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
     -->
     
    <!-- WS Orden Compra SAP -->
    <!-- 
    <bean id="wsContratosSAP" class="org.springframework.ws.client.core.WebServiceTemplate">
        <constructor-arg ref="messageFactory"/>
        <property name="marshaller" ref="jaxbMarshallerBean" />
        <property name="unmarshaller" ref="jaxbMarshallerBean" />
        
        <property name="messageSender">
	        <bean class="org.springframework.ws.transport.http.CommonsHttpMessageSender">
	            <property name="credentials">
	                <bean class="org.apache.commons.httpclient.UsernamePasswordCredentials">
	                    <constructor-arg value="${sap.services.credenciales}"/>
	                </bean>
	            </property>
	        </bean>
    	</property>                	   	        	    
    </bean>
    --> 
     
    <!-- log4j setting -->
    <bean id="log4jInitialization" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
		<property name="targetClass" value="org.springframework.util.Log4jConfigurer" />
		<property name="targetMethod" value="initLogging" />
		<property name="arguments">
			<list>
				<value>${log4j.properties.location}</value>
			</list>
		</property>
	</bean>    
     
</beans>

