hooklift / gowsdl

WSDL2Go code generation as well as its SOAP proxy
Mozilla Public License 2.0
1.16k stars 392 forks source link

Parse time #150

Closed wjurmy closed 5 years ago

wjurmy commented 5 years ago

I'm trying to connect to a EPS service, I'm able to connect and fetch the data but I encounter this error while the package tries to parse the time ( unmarshaling ).

This timestamp 2019-04-11T09:59:54.647 relates to the record I'm fetching. but I receive this error. I feel this is a bug, if it has not access to the record why it shows the correct timestamp?

Any ide?

parsing time "2019-04-11T09:59:54.647" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "Z07:00"

const WSDL_URL  = "https://eps.great.com/OrganizationService.svc?wsdl"
const PASSWORD  = ""
const USERNAME  = "James"

func GetTeam(w http.ResponseWriter, r *http.Request) {
    r.ParseForm()
    TeamID, err := strconv.Atoi(r.Form["teamId"][0])
    if err != nil {
        fmt.Println("Team id converstion error")
    }
    client := soap.NewClient(WSDL_URL)
    h := soap.NewWSSSecurityHeader(USERNAME, PASSWORD, "", "1")
    client.AddHeader(h)

    service := NewIOrganizationService(client)
    reply, err := service.GetTeam(&GetTeam{
        xml.Name{},
        int32(TeamID),
        false})
    if err != nil {
        fmt.Print(w, err)
        log.Fatalf("Failed to get the team: %+v", err)
    }
    log.Printf("Successfully got the team: %+v", reply)
}

@iszak @adlane @mjibson @md5 Thanks!

c4milo commented 5 years ago

@wjurmy, did you fix your issue?

olemorud commented 1 year ago

I have the same problem right now. How did you solve this issue?