Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generated bad code: 104:11: expected expression (and 1 more errors) #78

Closed
Fank opened this issue Dec 29, 2017 · 2 comments
Closed

generated bad code: 104:11: expected expression (and 1 more errors) #78

Fank opened this issue Dec 29, 2017 · 2 comments

Comments

@Fank
Copy link
Contributor

Fank commented Dec 29, 2017

@kernle32dll the last changes you did in #75 causes:

2017/12/29 10:24:37 generated bad code: 104:11: expected expression (and 1 more errors)
    1	package brokerbin
    2	
    3	import (
    4	"github.com/fiorix/wsdl2go/soap"
    5	)
    6	
    7	// Namespace was auto-generated from WSDL.
    8	var Namespace = "urn:HandleSearch"
    9	
   10	
   11	// NewHandleSearchPort creates an initializes a HandleSearchPort.
   12	func NewHandleSearchPort(cli *soap.Client) HandleSearchPort {
   13		return &handleSearchPort{cli}
   14	}
   15	
   16	// HandleSearchPort was auto-generated from WSDL
   17	// and defines interface for the remote service. Useful for testing.
   18	type HandleSearchPort interface {
   19	// Authenticate was auto-generated from WSDL.
   20	Authenticate(reqUsername string,reqPassword string,reqOptions interface{}) (string,error)
   21	
   22	// Search was auto-generated from WSDL.
   23	Search(reqPart interface{},reqOptions interface{}) (interface{},error)
   24	
   25	}
   26	// Operation wrapper for Authenticate.
   27	// OperationAuthenticateRequest was auto-generated from WSDL.
   28	type OperationAuthenticateRequest struct {
   29	ReqUsername *string `xml:"reqUsername,omitempty" json:"reqUsername,omitempty" yaml:"reqUsername,omitempty"`
   30	ReqPassword *string `xml:"reqPassword,omitempty" json:"reqPassword,omitempty" yaml:"reqPassword,omitempty"`
   31	ReqOptions *interface{} `xml:"reqOptions,omitempty" json:"reqOptions,omitempty" yaml:"reqOptions,omitempty"`
   32	}
   33	
   34	// Operation wrapper for Authenticate.
   35	// OperationAuthenticateResponse was auto-generated from WSDL.
   36	type OperationAuthenticateResponse struct {
   37	ResSession *string `xml:"resSession,omitempty" json:"resSession,omitempty" yaml:"resSession,omitempty"`
   38	}
   39	
   40	// Operation wrapper for Search.
   41	// OperationSearchRequest was auto-generated from WSDL.
   42	type OperationSearchRequest struct {
   43	ReqPart *interface{} `xml:"reqPart,omitempty" json:"reqPart,omitempty" yaml:"reqPart,omitempty"`
   44	ReqOptions *interface{} `xml:"reqOptions,omitempty" json:"reqOptions,omitempty" yaml:"reqOptions,omitempty"`
   45	}
   46	
   47	// Operation wrapper for Search.
   48	// OperationSearchResponse was auto-generated from WSDL.
   49	type OperationSearchResponse struct {
   50	ResParam *interface{} `xml:"resParam,omitempty" json:"resParam,omitempty" yaml:"resParam,omitempty"`
   51	}
   52	
   53	
   54	// handleSearchPort implements the HandleSearchPort interface.
   55	type handleSearchPort struct {
   56		cli *soap.Client
   57	}
   58	
   59	// Authenticate was auto-generated from WSDL.
   60	func (p *handleSearchPort) Authenticate(reqUsername string,reqPassword string,reqOptions interface{}) (string,error) {
   61		α := struct {
   62			
   63				M OperationAuthenticateRequest `xml:"tns:Authenticate"`
   64			
   65		}{
   66			OperationAuthenticateRequest {
   67				&reqUsername,
   68				&reqPassword,
   69				&reqOptions,
   70				
   71			},
   72		}
   73	
   74		γ := struct {
   75			
   76				M OperationAuthenticateResponse `xml:"AuthenticateResponse"`
   77			
   78		}{}
   79		if err := p.cli.RoundTripWithAction("urn:brokerbin#HandleSearch#Authenticate", α, &γ); err != nil {
   80			return "",err
   81		}
   82		return *γ.M.ResSession, nil
   83	}
   84	// Search was auto-generated from WSDL.
   85	func (p *handleSearchPort) Search(reqPart interface{},reqOptions interface{}) (interface{},error) {
   86		α := struct {
   87			
   88				M OperationSearchRequest `xml:"tns:Search"`
   89			
   90		}{
   91			OperationSearchRequest {
   92				&reqPart,
   93				&reqOptions,
   94				
   95			},
   96		}
   97	
   98		γ := struct {
   99			
  100				M OperationSearchResponse `xml:"SearchResponse"`
  101			
  102		}{}
  103		if err := p.cli.RoundTripWithAction("urn:brokerbin#HandleSearch#Search", α, &γ); err != nil {
  104			return &interface{}{},err
  105		}
  106		return *γ.M.ResParam, nil
  107	}

It worked until here: #75 (comment)
wsdl file in #65

@fiorix
Copy link
Owner

fiorix commented Dec 29, 2017

Probably worth waiting until this is resolved to cut a new release as suggested in #77

kernle32dll added a commit to kernle32dll/wsdl2go that referenced this issue Dec 29, 2017
Along the way of fiorix#75 the correct default value for an interface{} type was lost. This causes default returns such as &interface{}{}
fiorix pushed a commit that referenced this issue Dec 29, 2017
Along the way of #75 the correct default value for an interface{} type was lost. This causes default returns such as &interface{}{}
@fiorix
Copy link
Owner

fiorix commented Dec 29, 2017

Just merged the fix for this, closing.

@fiorix fiorix closed this as completed Dec 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants