diff --git a/client.go b/client.go index ec2dc24..5eeafb2 100644 --- a/client.go +++ b/client.go @@ -4,8 +4,12 @@ import ( "github.com/fiorix/wsdl2go/soap" ) -//CityCODPaymentLimit represents default C.O.D. payment limit for all dpd cities in which C.O.D. is available -const CityCODPaymentLimit = 250000 +const ( + trackingByDPDOrderNamespace = "http://dpd.ru/ws/tracing/2012-06-25" + + //CityCODPaymentLimit represents default C.O.D. payment limit for all dpd cities in which C.O.D. is available + CityCODPaymentLimit = 250000 +) //Client for DPD soap api type Client struct { @@ -343,7 +347,8 @@ func (cl *Client) GetStatesByDPDOrder(req *TrackByDPDOrderRequest) (*ParcelsStat }{ operationGetStatesByDPDOrder{ &getStatesByDPDOrder{ - req, + Namespace: trackingByDPDOrderNamespace, + Request: req, }, }, } diff --git a/tracking.go b/tracking.go index 701b42d..e2a2a28 100644 --- a/tracking.go +++ b/tracking.go @@ -77,11 +77,13 @@ type operationGetStatesByDPDOrder struct { } type getStatesByDPDOrder struct { - Request *TrackByDPDOrderRequest `xml:"request,omitempty"` + Namespace string `xml:"xmlns,attr"` + Request *TrackByDPDOrderRequest `xml:"request,omitempty"` } //TrackByDPDOrderRequest GetStatesByDPDOrder request body type TrackByDPDOrderRequest struct { + Namespace string `xml:"xmlns,attr"` Auth *Auth `xml:"auth,omitempty"` DpdOrderNr *string `xml:"dpdOrderNr,omitempty"` PickupYear *int `xml:"pickupYear,omitempty"`