欧美第十页,成人网成人A片,宾馆内激干人妻,偷偷内射,一区二区另类TS

webclient服務(wù)(webclient post)

前沿拓展:

webclient服務(wù)

運行>cmd>輸入:net start Web縣這現(xiàn)慶過活才機精革雙Client回車就可以了


WebService三要素:

WebService的三要素是:

SOAP (Simple Object Access Protocol):簡易對象訪問協(xié)議,soap用來描述傳遞信息的格式。

WSDL (WebServices Description Language):Web服務(wù)描述語言,用來描述如何訪問具體的接口。

UDDI (Universal Description Discovery and Integration):通用描述、發(fā)現(xiàn)及整合,用來管理、分發(fā)、查詢webService。

1234

XML+XSD,SOAP和WSDL就是構(gòu)成WebService平臺的三大技術(shù)。

一 搭建服務(wù)端

第一在pom中加入cxf的依賴

<dependency>

<groupId>org.apache.cxf</groupId>

<artifactId>cxf-rt-frontend-jaxws</artifactId>

<version>3.1.8</version>

</dependency>

<dependency>

<groupId>org.apache.cxf</groupId>

<artifactId>cxf-rt-transports-http</artifactId>

<version>3.1.8</version>

</dependency>

12345678910

第二編寫需要暴露在外的程序接口:

接口需要@webservice注解:

package com.customer.web.ws;

import java.util.List;

import javax.jws.WebService;

import com.customer.entity.Shops;

import com.customer.entity.Users;

@WebService

public interface IShopWS {

/**

* 查詢未關(guān)聯(lián)定區(qū)的店鋪

* @return

*/

public List<Shops> queryAllShop**yNotAssociate();

/**

* 查詢指定定區(qū)關(guān)聯(lián)的店鋪

* @param decidedzoneId

* @return

*/

public List<Shops> queryAllShop**yAssociate(int decidedzoneId);

/**

* 修改指定定區(qū)關(guān)聯(lián)的店鋪

* @param decidedzoneId

* @param shopIds

*/

public void updateShopsDecidedzoneId(int decidedzoneId, List<Integer> shopIds);

/**

* 根據(jù)電話號碼查詢指定用戶

* @param phone

* @return

*/

public Users queryByPhone(String phone);

}

12345678910111213141516171819202122232425262728293031323334353637383940414243

編寫實現(xiàn)類

@Service(“shopWS”)

public class ShopWSImpl implements IShopWS{

@Autowired

private Shop**apper shopMapper;

@Autowired

private User**apper userMapper;

@Override

public List<Shops> queryAllShop**yNotAssociate() {

ShopsExample se = new ShopsExample();

Criteria c1 = se.createCriteria().andShopRemarkIsNull();

Criteria c2 = se.createCriteria().andShopAddressEqualTo(“”);

se.or(c1);

se.or(c2);

return shopMapper.selectByExample(se);

}

@Override

public List<Shops> queryAllShop**yAssociate(int decidedzoneId) {

ShopsExample se = new ShopsExample();

se.createCriteria().andShopRemarkEqualTo(decidedzoneId + “”);

return shopMapper.selectByExample(se);

}

@Override

public void updateShopsDecidedzoneId(int decidedzoneId, List<Integer> shopIds) {

List<Shops> slist = queryAllShop**yAssociate(decidedzoneId);

for (Shops shop : slist) {

shop.setShopRemark(null);

shopMapper.updateByPrimaryKey(shop);

}

if(shopIds != null) {

for (int i = 0; i < shopIds.size(); i++) {

Shops s = new Shops();

s.setShopId(shopIds.get(i));

s.setShopRemark(decidedzoneId + “”);

shopMapper.updateByPrimaryKeySelective(s);

}

}

}

@Override

public Users queryByPhone(String phone) {

UsersExample ue = new UsersExample();

ue.createCriteria().andUsersTelephoneEqualTo(phone);

List<Users> list = userMapper.selectByExample(ue);

return list != null && list.size() > 0 ? list.get(0) : null;

}

}

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

配置文件spring-cxf(需要添加到spring管理)

<?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:jaxws=”http://cxf.apache.org/jaxws”

xsi:schemaLocation=”

http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd”>

<!– 例子 –>

<bean >

</bean>

//address訪問服務(wù)端的地址

<jaxws:server address=”/shops”>

<jaxws:serviceBean><ref bean=”shopWs” /></jaxws:serviceBean>

</jaxws:server>

</beans>

1234567891011121314151617

web.xml需要加入以下配置:

cxf

org.apache.cxf.transport.servlet.CXFServlet

cxf

/service/*

現(xiàn)在服務(wù)端編寫完成:

訪問的方式:http://ip地址/service/shops?wsdl

二,編寫客戶端

通過cmd中輸入:wsimport -s . http://ip地址/service/shops?wsdl可以獲得服務(wù)端所暴露的接口,將所需要的接口放入客戶端中就可以調(diào)用了。

1.同樣需要cxf的pom依賴

2.編寫spring-cxf.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:p=”http://www.springframework.org/schema/p”

xmlns:aop=”http://www.springframework.org/schema/aop”

xmlns:tx=”http://www.springframework.org/schema/tx”

xmlns:jaxws=”http://cxf.apache.org/jaxws”

xmlns:soap=”http://cxf.apache.org/bindings/soap”

xmlns:context=”http://www.springframework.org/schema/context”

xsi:schemaLocation=”http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop.xsd

http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd

http://cxf.apache.org/bindings/soap

http://cxf.apache.org/schemas/configuration/soap.xsd

http://cxf.apache.org/jaxws

http://cxf.apache.org/schemas/jaxws.xsd”>

<!– 例子 –>

<jaxws:client

service

address=”http://ip地址/service/shops”>

</jaxws:client>

</beans>

12345678910111213141516171819202122232425262728

一個完整的webservice就搭建完成了。

webclient服務(wù)(webclient post)

拓展知識:

前沿拓展:

webclient服務(wù)

運行>cmd>輸入:net start Web縣這現(xiàn)慶過活才機精革雙Client回車就可以了


WebService三要素:

WebService的三要素是:

SOAP (Simple Object Access Protocol):簡易對象訪問協(xié)議,soap用來描述傳遞信息的格式。

WSDL (WebServices Description Language):Web服務(wù)描述語言,用來描述如何訪問具體的接口。

UDDI (Universal Description Discovery and Integration):通用描述、發(fā)現(xiàn)及整合,用來管理、分發(fā)、查詢webService。

1234

XML+XSD,SOAP和WSDL就是構(gòu)成WebService平臺的三大技術(shù)。

一 搭建服務(wù)端

第一在pom中加入cxf的依賴

<dependency>

<groupId>org.apache.cxf</groupId>

<artifactId>cxf-rt-frontend-jaxws</artifactId>

<version>3.1.8</version>

</dependency>

<dependency>

<groupId>org.apache.cxf</groupId>

<artifactId>cxf-rt-transports-http</artifactId>

<version>3.1.8</version>

</dependency>

12345678910

第二編寫需要暴露在外的程序接口:

接口需要@webservice注解:

package com.customer.web.ws;

import java.util.List;

import javax.jws.WebService;

import com.customer.entity.Shops;

import com.customer.entity.Users;

@WebService

public interface IShopWS {

/**

* 查詢未關(guān)聯(lián)定區(qū)的店鋪

* @return

*/

public List<Shops> queryAllShop**yNotAssociate();

/**

* 查詢指定定區(qū)關(guān)聯(lián)的店鋪

* @param decidedzoneId

* @return

*/

public List<Shops> queryAllShop**yAssociate(int decidedzoneId);

/**

* 修改指定定區(qū)關(guān)聯(lián)的店鋪

* @param decidedzoneId

* @param shopIds

*/

public void updateShopsDecidedzoneId(int decidedzoneId, List<Integer> shopIds);

/**

* 根據(jù)電話號碼查詢指定用戶

* @param phone

* @return

*/

public Users queryByPhone(String phone);

}

12345678910111213141516171819202122232425262728293031323334353637383940414243

編寫實現(xiàn)類

@Service(“shopWS”)

public class ShopWSImpl implements IShopWS{

@Autowired

private Shop**apper shopMapper;

@Autowired

private User**apper userMapper;

@Override

public List<Shops> queryAllShop**yNotAssociate() {

ShopsExample se = new ShopsExample();

Criteria c1 = se.createCriteria().andShopRemarkIsNull();

Criteria c2 = se.createCriteria().andShopAddressEqualTo(“”);

se.or(c1);

se.or(c2);

return shopMapper.selectByExample(se);

}

@Override

public List<Shops> queryAllShop**yAssociate(int decidedzoneId) {

ShopsExample se = new ShopsExample();

se.createCriteria().andShopRemarkEqualTo(decidedzoneId + “”);

return shopMapper.selectByExample(se);

}

@Override

public void updateShopsDecidedzoneId(int decidedzoneId, List<Integer> shopIds) {

List<Shops> slist = queryAllShop**yAssociate(decidedzoneId);

for (Shops shop : slist) {

shop.setShopRemark(null);

shopMapper.updateByPrimaryKey(shop);

}

if(shopIds != null) {

for (int i = 0; i < shopIds.size(); i++) {

Shops s = new Shops();

s.setShopId(shopIds.get(i));

s.setShopRemark(decidedzoneId + “”);

shopMapper.updateByPrimaryKeySelective(s);

}

}

}

@Override

public Users queryByPhone(String phone) {

UsersExample ue = new UsersExample();

ue.createCriteria().andUsersTelephoneEqualTo(phone);

List<Users> list = userMapper.selectByExample(ue);

return list != null && list.size() > 0 ? list.get(0) : null;

}

}

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

配置文件spring-cxf(需要添加到spring管理)

<?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:jaxws=”http://cxf.apache.org/jaxws”

xsi:schemaLocation=”

http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd”>

<!– 例子 –>

<bean >

</bean>

//address訪問服務(wù)端的地址

<jaxws:server address=”/shops”>

<jaxws:serviceBean><ref bean=”shopWs” /></jaxws:serviceBean>

</jaxws:server>

</beans>

1234567891011121314151617

web.xml需要加入以下配置:

cxf

org.apache.cxf.transport.servlet.CXFServlet

cxf

/service/*

現(xiàn)在服務(wù)端編寫完成:

訪問的方式:http://ip地址/service/shops?wsdl

二,編寫客戶端

通過cmd中輸入:wsimport -s . http://ip地址/service/shops?wsdl可以獲得服務(wù)端所暴露的接口,將所需要的接口放入客戶端中就可以調(diào)用了。

1.同樣需要cxf的pom依賴

2.編寫spring-cxf.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:p=”http://www.springframework.org/schema/p”

xmlns:aop=”http://www.springframework.org/schema/aop”

xmlns:tx=”http://www.springframework.org/schema/tx”

xmlns:jaxws=”http://cxf.apache.org/jaxws”

xmlns:soap=”http://cxf.apache.org/bindings/soap”

xmlns:context=”http://www.springframework.org/schema/context”

xsi:schemaLocation=”http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop.xsd

http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd

http://cxf.apache.org/bindings/soap

http://cxf.apache.org/schemas/configuration/soap.xsd

http://cxf.apache.org/jaxws

http://cxf.apache.org/schemas/jaxws.xsd”>

<!– 例子 –>

<jaxws:client

service

address=”http://ip地址/service/shops”>

</jaxws:client>

</beans>

12345678910111213141516171819202122232425262728

一個完整的webservice就搭建完成了。

webclient服務(wù)(webclient post)

拓展知識:

前沿拓展:

webclient服務(wù)

運行>cmd>輸入:net start Web縣這現(xiàn)慶過活才機精革雙Client回車就可以了


WebService三要素:

WebService的三要素是:

SOAP (Simple Object Access Protocol):簡易對象訪問協(xié)議,soap用來描述傳遞信息的格式。

WSDL (WebServices Description Language):Web服務(wù)描述語言,用來描述如何訪問具體的接口。

UDDI (Universal Description Discovery and Integration):通用描述、發(fā)現(xiàn)及整合,用來管理、分發(fā)、查詢webService。

1234

XML+XSD,SOAP和WSDL就是構(gòu)成WebService平臺的三大技術(shù)。

一 搭建服務(wù)端

第一在pom中加入cxf的依賴

<dependency>

<groupId>org.apache.cxf</groupId>

<artifactId>cxf-rt-frontend-jaxws</artifactId>

<version>3.1.8</version>

</dependency>

<dependency>

<groupId>org.apache.cxf</groupId>

<artifactId>cxf-rt-transports-http</artifactId>

<version>3.1.8</version>

</dependency>

12345678910

第二編寫需要暴露在外的程序接口:

接口需要@webservice注解:

package com.customer.web.ws;

import java.util.List;

import javax.jws.WebService;

import com.customer.entity.Shops;

import com.customer.entity.Users;

@WebService

public interface IShopWS {

/**

* 查詢未關(guān)聯(lián)定區(qū)的店鋪

* @return

*/

public List<Shops> queryAllShop**yNotAssociate();

/**

* 查詢指定定區(qū)關(guān)聯(lián)的店鋪

* @param decidedzoneId

* @return

*/

public List<Shops> queryAllShop**yAssociate(int decidedzoneId);

/**

* 修改指定定區(qū)關(guān)聯(lián)的店鋪

* @param decidedzoneId

* @param shopIds

*/

public void updateShopsDecidedzoneId(int decidedzoneId, List<Integer> shopIds);

/**

* 根據(jù)電話號碼查詢指定用戶

* @param phone

* @return

*/

public Users queryByPhone(String phone);

}

12345678910111213141516171819202122232425262728293031323334353637383940414243

編寫實現(xiàn)類

@Service(“shopWS”)

public class ShopWSImpl implements IShopWS{

@Autowired

private Shop**apper shopMapper;

@Autowired

private User**apper userMapper;

@Override

public List<Shops> queryAllShop**yNotAssociate() {

ShopsExample se = new ShopsExample();

Criteria c1 = se.createCriteria().andShopRemarkIsNull();

Criteria c2 = se.createCriteria().andShopAddressEqualTo(“”);

se.or(c1);

se.or(c2);

return shopMapper.selectByExample(se);

}

@Override

public List<Shops> queryAllShop**yAssociate(int decidedzoneId) {

ShopsExample se = new ShopsExample();

se.createCriteria().andShopRemarkEqualTo(decidedzoneId + “”);

return shopMapper.selectByExample(se);

}

@Override

public void updateShopsDecidedzoneId(int decidedzoneId, List<Integer> shopIds) {

List<Shops> slist = queryAllShop**yAssociate(decidedzoneId);

for (Shops shop : slist) {

shop.setShopRemark(null);

shopMapper.updateByPrimaryKey(shop);

}

if(shopIds != null) {

for (int i = 0; i < shopIds.size(); i++) {

Shops s = new Shops();

s.setShopId(shopIds.get(i));

s.setShopRemark(decidedzoneId + “”);

shopMapper.updateByPrimaryKeySelective(s);

}

}

}

@Override

public Users queryByPhone(String phone) {

UsersExample ue = new UsersExample();

ue.createCriteria().andUsersTelephoneEqualTo(phone);

List<Users> list = userMapper.selectByExample(ue);

return list != null && list.size() > 0 ? list.get(0) : null;

}

}

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

配置文件spring-cxf(需要添加到spring管理)

<?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:jaxws=”http://cxf.apache.org/jaxws”

xsi:schemaLocation=”

http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd”>

<!– 例子 –>

<bean >

</bean>

//address訪問服務(wù)端的地址

<jaxws:server address=”/shops”>

<jaxws:serviceBean><ref bean=”shopWs” /></jaxws:serviceBean>

</jaxws:server>

</beans>

1234567891011121314151617

web.xml需要加入以下配置:

cxf

org.apache.cxf.transport.servlet.CXFServlet

cxf

/service/*

現(xiàn)在服務(wù)端編寫完成:

訪問的方式:http://ip地址/service/shops?wsdl

二,編寫客戶端

通過cmd中輸入:wsimport -s . http://ip地址/service/shops?wsdl可以獲得服務(wù)端所暴露的接口,將所需要的接口放入客戶端中就可以調(diào)用了。

1.同樣需要cxf的pom依賴

2.編寫spring-cxf.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:p=”http://www.springframework.org/schema/p”

xmlns:aop=”http://www.springframework.org/schema/aop”

xmlns:tx=”http://www.springframework.org/schema/tx”

xmlns:jaxws=”http://cxf.apache.org/jaxws”

xmlns:soap=”http://cxf.apache.org/bindings/soap”

xmlns:context=”http://www.springframework.org/schema/context”

xsi:schemaLocation=”http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop.xsd

http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd

http://cxf.apache.org/bindings/soap

http://cxf.apache.org/schemas/configuration/soap.xsd

http://cxf.apache.org/jaxws

http://cxf.apache.org/schemas/jaxws.xsd”>

<!– 例子 –>

<jaxws:client

service

address=”http://ip地址/service/shops”>

</jaxws:client>

</beans>

12345678910111213141516171819202122232425262728

一個完整的webservice就搭建完成了。

webclient服務(wù)(webclient post)

拓展知識:

前沿拓展:

webclient服務(wù)

運行>cmd>輸入:net start Web縣這現(xiàn)慶過活才機精革雙Client回車就可以了


WebService三要素:

WebService的三要素是:

SOAP (Simple Object Access Protocol):簡易對象訪問協(xié)議,soap用來描述傳遞信息的格式。

WSDL (WebServices Description Language):Web服務(wù)描述語言,用來描述如何訪問具體的接口。

UDDI (Universal Description Discovery and Integration):通用描述、發(fā)現(xiàn)及整合,用來管理、分發(fā)、查詢webService。

1234

XML+XSD,SOAP和WSDL就是構(gòu)成WebService平臺的三大技術(shù)。

一 搭建服務(wù)端

第一在pom中加入cxf的依賴

<dependency>

<groupId>org.apache.cxf</groupId>

<artifactId>cxf-rt-frontend-jaxws</artifactId>

<version>3.1.8</version>

</dependency>

<dependency>

<groupId>org.apache.cxf</groupId>

<artifactId>cxf-rt-transports-http</artifactId>

<version>3.1.8</version>

</dependency>

12345678910

第二編寫需要暴露在外的程序接口:

接口需要@webservice注解:

package com.customer.web.ws;

import java.util.List;

import javax.jws.WebService;

import com.customer.entity.Shops;

import com.customer.entity.Users;

@WebService

public interface IShopWS {

/**

* 查詢未關(guān)聯(lián)定區(qū)的店鋪

* @return

*/

public List<Shops> queryAllShop**yNotAssociate();

/**

* 查詢指定定區(qū)關(guān)聯(lián)的店鋪

* @param decidedzoneId

* @return

*/

public List<Shops> queryAllShop**yAssociate(int decidedzoneId);

/**

* 修改指定定區(qū)關(guān)聯(lián)的店鋪

* @param decidedzoneId

* @param shopIds

*/

public void updateShopsDecidedzoneId(int decidedzoneId, List<Integer> shopIds);

/**

* 根據(jù)電話號碼查詢指定用戶

* @param phone

* @return

*/

public Users queryByPhone(String phone);

}

12345678910111213141516171819202122232425262728293031323334353637383940414243

編寫實現(xiàn)類

@Service(“shopWS”)

public class ShopWSImpl implements IShopWS{

@Autowired

private Shop**apper shopMapper;

@Autowired

private User**apper userMapper;

@Override

public List<Shops> queryAllShop**yNotAssociate() {

ShopsExample se = new ShopsExample();

Criteria c1 = se.createCriteria().andShopRemarkIsNull();

Criteria c2 = se.createCriteria().andShopAddressEqualTo(“”);

se.or(c1);

se.or(c2);

return shopMapper.selectByExample(se);

}

@Override

public List<Shops> queryAllShop**yAssociate(int decidedzoneId) {

ShopsExample se = new ShopsExample();

se.createCriteria().andShopRemarkEqualTo(decidedzoneId + “”);

return shopMapper.selectByExample(se);

}

@Override

public void updateShopsDecidedzoneId(int decidedzoneId, List<Integer> shopIds) {

List<Shops> slist = queryAllShop**yAssociate(decidedzoneId);

for (Shops shop : slist) {

shop.setShopRemark(null);

shopMapper.updateByPrimaryKey(shop);

}

if(shopIds != null) {

for (int i = 0; i < shopIds.size(); i++) {

Shops s = new Shops();

s.setShopId(shopIds.get(i));

s.setShopRemark(decidedzoneId + “”);

shopMapper.updateByPrimaryKeySelective(s);

}

}

}

@Override

public Users queryByPhone(String phone) {

UsersExample ue = new UsersExample();

ue.createCriteria().andUsersTelephoneEqualTo(phone);

List<Users> list = userMapper.selectByExample(ue);

return list != null && list.size() > 0 ? list.get(0) : null;

}

}

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

配置文件spring-cxf(需要添加到spring管理)

<?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:jaxws=”http://cxf.apache.org/jaxws”

xsi:schemaLocation=”

http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd”>

<!– 例子 –>

<bean >

</bean>

//address訪問服務(wù)端的地址

<jaxws:server address=”/shops”>

<jaxws:serviceBean><ref bean=”shopWs” /></jaxws:serviceBean>

</jaxws:server>

</beans>

1234567891011121314151617

web.xml需要加入以下配置:

cxf

org.apache.cxf.transport.servlet.CXFServlet

cxf

/service/*

現(xiàn)在服務(wù)端編寫完成:

訪問的方式:http://ip地址/service/shops?wsdl

二,編寫客戶端

通過cmd中輸入:wsimport -s . http://ip地址/service/shops?wsdl可以獲得服務(wù)端所暴露的接口,將所需要的接口放入客戶端中就可以調(diào)用了。

1.同樣需要cxf的pom依賴

2.編寫spring-cxf.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:p=”http://www.springframework.org/schema/p”

xmlns:aop=”http://www.springframework.org/schema/aop”

xmlns:tx=”http://www.springframework.org/schema/tx”

xmlns:jaxws=”http://cxf.apache.org/jaxws”

xmlns:soap=”http://cxf.apache.org/bindings/soap”

xmlns:context=”http://www.springframework.org/schema/context”

xsi:schemaLocation=”http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop.xsd

http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd

http://cxf.apache.org/bindings/soap

http://cxf.apache.org/schemas/configuration/soap.xsd

http://cxf.apache.org/jaxws

http://cxf.apache.org/schemas/jaxws.xsd”>

<!– 例子 –>

<jaxws:client

service

address=”http://ip地址/service/shops”>

</jaxws:client>

</beans>

12345678910111213141516171819202122232425262728

一個完整的webservice就搭建完成了。

webclient服務(wù)(webclient post)

拓展知識:

原創(chuàng)文章,作者:九賢生活小編,如若轉(zhuǎn)載,請注明出處:http://m.cxzzxj.cn/14093.html

三级a做爰全过程| 久久VS国产色婷婷| 日日射天天操夜夜吊| 亚洲国产AV玩弄放荡人妇| 99伊人久久精品亚洲午夜| 国产伊人久久久Av| 亚洲欧美综合激情二区| 亚洲国产中文制服另类久久| 五月婷婷丁香综合啪啪| 亚洲五月丁香综合色| 国产精品粉嫩无码毛片| 99国产精品无码免费一区私密| 欧美日韩电影在线观看| 日日碰狠狠躁久久躁婷婷| 在线永久视频| 日本久久一级黄色大片| 精品在线一区| 亚洲精品第一国产麻豆| 欧美一级视频| 国产电影亚洲精品| 久久AV免费电影| 国产初高中生视频| 另类亚洲日本一区二区激情妻 | 四虎精品免费永久免费视频| 99久久五月丁香| 国产av一区二区精品久久| 国产一区二区三区色欲主播| 骚女91AV| 婷婷人人爽天天| 欧美婷婷六月丁香综合| 丁香激情激情五月| 白丝袜免费又爽又黄| 人人爽人人澡人人妻免费看| 中文字幕无码6| 国产在线不卡在线| 日韩第一区2区三区| 日韩无码精品乱交| 色阿v资源| 国产精品 麻豆| 亚洲人成伊人成综合网久久| 天天看看天天爽|