An open API service indexing awesome lists of open source software.

https://github.com/binatify/wsclient

农村电子商务平台数据提交客户端
https://github.com/binatify/wsclient

Last synced: about 2 months ago
JSON representation

农村电子商务平台数据提交客户端

Awesome Lists containing this project

README

          

# wsclient

[农村电子商务平台](http://sqsyscjss.mofcom.gov.cn/login.jhtml) 日报,月报,年报数据提交客户端(Golang 版本)。

## Usage

Use `go get github.com/binatify/wsclient`

```golang
package main

import (
"fmt"

"github.com/binatify/wsclient"
)

type serviceStation struct{}

func main() {
client := wsclient.NewClient(nil)

var in serviceStation

body, err := client.Do(in)

fmt.Println(in)
fmt.Println(string(body))
}
```

## WSAL SOAP协议声明

通过[链接](http://211.88.20.132:8040/services/syncServiceStation?wsdl)可以访问 syncServiceStation 服务的声明。

以 Restful 方式提交数据:

- `POST` 请求
- 设置对应的 Header 信息:
```golang
req.Header.Set("Content-Type", "text/xml;charset=UTF-8")
req.Header.Set("Accept", "application/soap+xml, application/dime, multipart/related, text/*")
req.Header.Set("User-Agent", "Axis/1.4")
req.Header.Set("Host", "211.88.20.132:8040")
req.Header.Set("SOAPAction", "http://www.cvicse.com/service/syncServiceStationOperation")
```
- Body 格式:

```xml





xxx
2017-12-08

xx
xx
1
5
28

5
123


28
123





```