You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/08/15 14:01:55 UTC
[GitHub] [dubbo-go-pixiu] MasterKenway edited a comment on issue #240: Request for a none params integration request which is on dubbo protocol failed
MasterKenway edited a comment on issue #240:
URL: https://github.com/apache/dubbo-go-pixiu/issues/240#issuecomment-899054471
After my debug and discuss with @XavierNiu, I changed my code to
```
// Call invoke service
func (dc *Client) Call(req *client.Request) (res interface{}, err error) {
// method, paramType, paramValue
gsReq := make([]interface{}, 3)
// if GET with no args, values would be nil
values, err := dc.genericArgs(req)
if err != nil {
return nil, err
}
val, ok := values.(*dubboTarget)
if !ok {
return nil, errors.New("map parameters failed")
}
dm := req.API.Method.IntegrationRequest
method := dm.Method
gsReq[0] = method
if val != nil {
logger.Debugf("[dubbo-go-pixiu] dubbo invoke, method:%s, types:%s, reqData:%v", method, val.Types, val.Values)
gsReq[1], gsReq[2] = val.Types, val.Values
} else {
logger.Debugf("[dubbo-go-pixiu] dubbo invoke, method:%s, types:%s, reqData:%v", method, nil, nil)
gsReq[1], gsReq[2] = []hessian.Object{}, []hessian.Object{}
}
gs := dc.Get(dm)
rst, err := gs.Invoke(req.Context, gsReq)
if err != nil {
return nil, err
}
logger.Debugf("[dubbo-go-pixiu] dubbo client resp:%v", rst)
return rst, nil
}
```
But this lead to server error:
```
2021-08-15T22:00:59.795+0800 INFO dubbo-getty/session.go:578 {server:TCP_SERVER:1:172.17.161.60:20000<->172.17.161.60:47748}, [session.conn.read] = error:EOF
github.com/apache/dubbo-getty.(*gettyTCPConn).recv
D:/WorkSpace/GoLandProjects/dubbo-go-pixiu/vendor/github.com/apache/dubbo-getty/connection.go:262
github.com/apache/dubbo-getty.(*session).handleTCPPackage
D:/WorkSpace/GoLandProjects/dubbo-go-pixiu/vendor/github.com/apache/dubbo-getty/session.go:629
github.com/apache/dubbo-getty.(*session).handlePackage
D:/WorkSpace/GoLandProjects/dubbo-go-pixiu/vendor/github.com/apache/dubbo-getty/session.go:578
runtime.goexit
C:/Users/Kenway/gosdk/go1.16.4/src/runtime/asm_amd64.s:1371
github.com/apache/dubbo-getty.(*session).handleTCPPackage
D:/WorkSpace/GoLandProjects/dubbo-go-pixiu/vendor/github.com/apache/dubbo-getty/session.go:635
github.com/apache/dubbo-getty.(*session).handlePackage
D:/WorkSpace/GoLandProjects/dubbo-go-pixiu/vendor/github.com/apache/dubbo-getty/session.go:578
runtime.goexit
C:/Users/Kenway/gosdk/go1.16.4/src/runtime/asm_amd64.s:1371
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org