java - How to configure JibxMarshalling & unmarshalling in Spring 3+ WS 2+ using Annotation, JibxMarshalling or using xml config? -


i using jibxmarshalling & unmarshalling in spring 2.5, spring-ws-1.5.8 , weblogic 9/10 in project.

but, want migrate spring 3+ , ws 2+ , weblogic 12x.

below current code,

pom.xml

<plugin>         <groupid>org.jibx</groupid>                     <artifactid>maven-jibx-plugin</artifactid>                     <version>1.1.6a</version>                     <executions>                         <execution>                             <goals>                                 <goal>bind</goal>                             </goals>                         </execution>                     </executions>                 </plugin>   <dependency>             <groupid>org.jibx</groupid>             <artifactid>jibx-bind</artifactid>             <version>1.1.6a</version>         </dependency>         <dependency>             <groupid>org.jibx</groupid>             <artifactid>jibx-extras</artifactid>             <version>1.1.5</version>         </dependency>         <dependency>             <groupid>org.jibx</groupid>             <artifactid>jibx-run</artifactid>             <version>1.1.6a</version>         </dependency> 

endpoint class

import org.springframework.ws.server.endpoint.abstractmarshallingpayloadendpoint;  public class myorderendpoint extends  abstractmarshallingpayloadendpoint {      private static final logger log = logger             .getlogger(getfinancialperiodsendpoint.class);      /**      * vendor data loader wrapper      */     private vendordataloader vendordataloader;     /**      * id translation instance      */     private idtranslator idtranslator;      public vendordataloader getvendordataloader() {         return vendordataloader;     }      public void setvendordataloader(vendordataloader vendordataloader) {         this.vendordataloader = vendordataloader;     }      public idtranslator getidtranslator() {         return idtranslator;     }      public void setidtranslator(idtranslator idtranslator) {         this.idtranslator = idtranslator;     }      @override     protected object invokeinternal(object request) throws exception {         getfinancialperiods strequest = (getfinancialperiods) request;         list<statement> statementlist = strequest.getstatements();         string requestor = strequest.getrequestor();         long start = system.currenttimemillis();          .............         ............         return response;     } 

spring-ws-servlet.xml

<?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:util="http://www.springframework.org/schema/util"      xsi:schemalocation="     http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">      <bean id="payloadmapping"         class="org.springframework.ws.server.endpoint.mapping.payloadrootqnameendpointmapping">         <property name="endpointmap">             <map>                 <entry key="{http://integration.pabi.com/serviceschema/v3/order}getmyorder"                     value-ref="getmyorderendpoint" />                     ..........                     .........                 </map>         </property>     </bean>      <bean id="getfinancialperiodsendpoint" class="com.pabi.ws.myorderendpoint">         <property name="marshaller" ref="jibxresponsemarshaller" />         <property name="unmarshaller" ref="jibxunmarshaller" />         <property name="vendordataloader" ref="cacheloader"/>         <property name="idtranslator" ref="idtranslator"/>     </bean>      <bean id="jibxresponsemarshaller" class="org.springframework.oxm.jibx.jibxmarshaller">         <property name="targetclass"             value="com.pabi.ws.myorderresponse" />         <property name="encoding" value="utf-8"/>     </bean>     <bean id="jibxunmarshaller" class="org.springframework.oxm.jibx.jibxmarshaller">         <property name="targetclass"             value="com.pabi.ws.myorder" />     </bean>       <bean id="financialstatement"         class="org.springframework.ws.wsdl.wsdl11.simplewsdl11definition">         <property name="wsdl" value="classpath:/wsdl/myorders.wsdl" />     </bean> </beans> 

web.xml

<servlet>       <servlet-name>springmvc</servlet-name>       <servlet-class>org.springframework.web.servlet.dispatcherservlet</servlet-class>       <load-on-startup>1</load-on-startup>     </servlet>      <!-- take especial notice of name of servlet -->     <servlet>         <servlet-name>spring-ws</servlet-name>         <servlet-class>org.springframework.ws.transport.http.messagedispatcherservlet</servlet-class>         <init-param>             <param-name>transformwsdllocations</param-name>             <param-value>true</param-value>         </init-param>         <load-on-startup>2</load-on-startup>     </servlet>      <servlet-mapping>         <servlet-name>spring-ws</servlet-name>         <url-pattern>/services/*</url-pattern>     </servlet-mapping>      <servlet-mapping>       <servlet-name>springmvc</servlet-name>       <url-pattern>*.do</url-pattern>     </servlet-mapping> 


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -