https://github.com/binatify/wsclient
农村电子商务平台数据提交客户端
https://github.com/binatify/wsclient
Last synced: about 2 months ago
JSON representation
农村电子商务平台数据提交客户端
- Host: GitHub
- URL: https://github.com/binatify/wsclient
- Owner: binatify
- Created: 2017-12-08T15:13:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-13T01:48:18.000Z (over 8 years ago)
- Last Synced: 2025-03-02T10:43:45.100Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```