Skip to content

Commit

Permalink
Fix broken tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Eure committed Sep 13, 2021
1 parent 020ae25 commit 3aaab23
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
34 changes: 17 additions & 17 deletions fixtures/epcis/epcisquery.src
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ type Document struct {
// The version of the schema corresponding to which the instance conforms.
//

SchemaVersion float64 `xml:"schemaVersion,attr,omitempty" json:"schemaVersion,omitempty"`
SchemaVersion float64 `xml:"urn:epcglobal:xsd:1 schemaVersion,attr,omitempty" json:"schemaVersion,omitempty"`

//
// The date the message was created. Used for auditing and logging.
//

CreationDate soap.XSDDateTime `xml:"creationDate,attr,omitempty" json:"creationDate,omitempty"`
CreationDate soap.XSDDateTime `xml:"urn:epcglobal:xsd:1 creationDate,attr,omitempty" json:"creationDate,omitempty"`
}

type EPC string
Expand Down Expand Up @@ -132,25 +132,25 @@ type BusinessService struct {
}

type ServiceTransaction struct {
TypeOfServiceTransaction *TypeOfServiceTransaction `xml:"TypeOfServiceTransaction,attr,omitempty" json:"TypeOfServiceTransaction,omitempty"`
TypeOfServiceTransaction *TypeOfServiceTransaction `xml:"http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader TypeOfServiceTransaction,attr,omitempty" json:"TypeOfServiceTransaction,omitempty"`

IsNonRepudiationRequired string `xml:"IsNonRepudiationRequired,attr,omitempty" json:"IsNonRepudiationRequired,omitempty"`
IsNonRepudiationRequired string `xml:"http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader IsNonRepudiationRequired,attr,omitempty" json:"IsNonRepudiationRequired,omitempty"`

IsAuthenticationRequired string `xml:"IsAuthenticationRequired,attr,omitempty" json:"IsAuthenticationRequired,omitempty"`
IsAuthenticationRequired string `xml:"http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader IsAuthenticationRequired,attr,omitempty" json:"IsAuthenticationRequired,omitempty"`

IsNonRepudiationOfReceiptRequired string `xml:"IsNonRepudiationOfReceiptRequired,attr,omitempty" json:"IsNonRepudiationOfReceiptRequired,omitempty"`
IsNonRepudiationOfReceiptRequired string `xml:"http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader IsNonRepudiationOfReceiptRequired,attr,omitempty" json:"IsNonRepudiationOfReceiptRequired,omitempty"`

IsIntegrityCheckRequired string `xml:"IsIntegrityCheckRequired,attr,omitempty" json:"IsIntegrityCheckRequired,omitempty"`
IsIntegrityCheckRequired string `xml:"http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader IsIntegrityCheckRequired,attr,omitempty" json:"IsIntegrityCheckRequired,omitempty"`

IsApplicationErrorResponseRequested string `xml:"IsApplicationErrorResponseRequested,attr,omitempty" json:"IsApplicationErrorResponseRequested,omitempty"`
IsApplicationErrorResponseRequested string `xml:"http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader IsApplicationErrorResponseRequested,attr,omitempty" json:"IsApplicationErrorResponseRequested,omitempty"`

TimeToAcknowledgeReceipt string `xml:"TimeToAcknowledgeReceipt,attr,omitempty" json:"TimeToAcknowledgeReceipt,omitempty"`
TimeToAcknowledgeReceipt string `xml:"http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader TimeToAcknowledgeReceipt,attr,omitempty" json:"TimeToAcknowledgeReceipt,omitempty"`

TimeToAcknowledgeAcceptance string `xml:"TimeToAcknowledgeAcceptance,attr,omitempty" json:"TimeToAcknowledgeAcceptance,omitempty"`
TimeToAcknowledgeAcceptance string `xml:"http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader TimeToAcknowledgeAcceptance,attr,omitempty" json:"TimeToAcknowledgeAcceptance,omitempty"`

TimeToPerform string `xml:"TimeToPerform,attr,omitempty" json:"TimeToPerform,omitempty"`
TimeToPerform string `xml:"http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader TimeToPerform,attr,omitempty" json:"TimeToPerform,omitempty"`

Recurrence string `xml:"Recurrence,attr,omitempty" json:"Recurrence,omitempty"`
Recurrence string `xml:"http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader Recurrence,attr,omitempty" json:"Recurrence,omitempty"`
}

type StandardBusinessDocumentHeader struct {
Expand Down Expand Up @@ -268,7 +268,7 @@ type VocabularyType struct {

Items []string `xml:",any" json:"items,omitempty"`

Type AnyURI `xml:"type,attr,omitempty" json:"type,omitempty"`
Type AnyURI `xml:"urn:epcglobal:epcis:xsd:1 type,attr,omitempty" json:"type,omitempty"`
}

type VocabularyElementListType struct {
Expand All @@ -284,13 +284,13 @@ type VocabularyElementType struct {

Items []string `xml:",any" json:"items,omitempty"`

Id AnyURI `xml:"id,attr,omitempty" json:"id,omitempty"`
Id AnyURI `xml:"urn:epcglobal:epcis:xsd:1 id,attr,omitempty" json:"id,omitempty"`
}

type AttributeType struct {
AnyType

Id AnyURI `xml:"id,attr,omitempty" json:"id,omitempty"`
Id AnyURI `xml:"urn:epcglobal:epcis:xsd:1 id,attr,omitempty" json:"id,omitempty"`
}

type IDListType struct {
Expand Down Expand Up @@ -378,7 +378,7 @@ type BusinessLocationExtensionType struct {
type BusinessTransactionType struct {
Value *BusinessTransactionIDType `xml:",chardata" json:"-,"`

Type *BusinessTransactionTypeIDType `xml:"type,attr,omitempty" json:"type,omitempty"`
Type *BusinessTransactionTypeIDType `xml:"urn:epcglobal:epcis:xsd:1 type,attr,omitempty" json:"type,omitempty"`
}

type BusinessTransactionListType struct {
Expand All @@ -388,7 +388,7 @@ type BusinessTransactionListType struct {
type SourceDestType struct {
Value *SourceDestIDType `xml:",chardata" json:"-,"`

Type *SourceDestTypeIDType `xml:"type,attr,omitempty" json:"type,omitempty"`
Type *SourceDestTypeIDType `xml:"urn:epcglobal:epcis:xsd:1 type,attr,omitempty" json:"type,omitempty"`
}

type SourceListType struct {
Expand Down
4 changes: 2 additions & 2 deletions gowsdl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ func TestAttributeRef(t *testing.T) {
Status []struct {
Value string ` + "`" + `xml:",chardata" json:"-,"` + "`" + `
Code string ` + "`" + `xml:"code,attr,omitempty" json:"code,omitempty"` + "`" + `
Code string ` + "`" + `xml:"http://www.mnb.hu/webservices/ code,attr,omitempty" json:"code,omitempty"` + "`" + `
} ` + "`" + `xml:"status,omitempty" json:"status,omitempty"` + "`" + `
ResponseCode string ` + "`" + `xml:"responseCode,attr,omitempty" json:"responseCode,omitempty"` + "`" + `
ResponseCode string ` + "`" + `xml:"http://www.mnb.hu/webservices/ responseCode,attr,omitempty" json:"responseCode,omitempty"` + "`" + `
}`
actual = string(bytes.ReplaceAll([]byte(actual), []byte("\t"), []byte(" ")))
expected = string(bytes.ReplaceAll([]byte(expected), []byte("\t"), []byte(" ")))
Expand Down

0 comments on commit 3aaab23

Please sign in to comment.