« Shipment/FedEx/WSDL/TrackInterfaces/TrackService/TrackServicePort.pm
↑ Summary
Shipment/FedEx/WSDL/CloseInterfaces/CloseService/CloseServicePort.pm »
| 1 | package Shipment::UPS::WSDL::ShipInterfaces::ShipService::ShipPort; | ||
| 2 | $Shipment::UPS::WSDL::ShipInterfaces::ShipService::ShipPort::VERSION = '3.11'; | ||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use Class::Std::Fast::Storable; | ||
| 6 | use Scalar::Util qw(blessed); | ||
| 7 | use base qw(SOAP::WSDL::Client::Base); | ||
| 8 | |||
| 9 | |||
| 10 | # only load if it hasn't been loaded before | ||
| 11 | require Shipment::UPS::WSDL::ShipTypemaps::ShipService | ||
| 12 | if not Shipment::UPS::WSDL::ShipTypemaps::ShipService->can('get_class'); | ||
| 13 | |||
| 14 | |||
| 15 | sub START { | ||
| 16 | |||
| 17 | my $proxy_domain = $_[2]->{proxy_domain} || 'wwwcie.ups.com'; | ||
| 18 | |||
| 19 | $_[0]->set_proxy('https://' . $proxy_domain . '/webservices/Ship') | ||
| 20 | if not $_[2]->{proxy}; | ||
| 21 | |||
| 22 | $_[0]->set_class_resolver('Shipment::UPS::WSDL::ShipTypemaps::ShipService') | ||
| 23 | if not $_[2]->{class_resolver}; | ||
| 24 | |||
| 25 | $_[0]->set_prefix($_[2]->{use_prefix}) if exists $_[2]->{use_prefix}; | ||
| 26 | } | ||
| 27 | |||
| 28 | sub ProcessShipment { | ||
| 29 | my ($self, $body, $header) = @_; | ||
| 30 | die "ProcessShipment must be called as object method (\$self is <$self>)" | ||
| 31 | if not blessed($self); | ||
| 32 | return $self->SUPER::call( | ||
| 33 | { operation => 'ProcessShipment', | ||
| 34 | soap_action => | ||
| 35 | 'http://onlinetools.ups.com/webservices/ShipBinding/v1.0', | ||
| 36 | style => 'document', | ||
| 37 | body => { | ||
| 38 | |||
| 39 | |||
| 40 | 'use' => 'literal', | ||
| 41 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 42 | encodingStyle => '', | ||
| 43 | parts => | ||
| 44 | [qw( Shipment::UPS::WSDL::ShipElements::ShipmentRequest )], | ||
| 45 | }, | ||
| 46 | header => { | ||
| 47 | |||
| 48 | 'use' => 'literal', | ||
| 49 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 50 | encodingStyle => '', | ||
| 51 | parts => | ||
| 52 | [qw( Shipment::UPS::WSDL::ShipElements::UPSSecurity )], | ||
| 53 | |||
| 54 | }, | ||
| 55 | headerfault => { | ||
| 56 | |||
| 57 | }, | ||
| 58 | response => { | ||
| 59 | header => { | ||
| 60 | |||
| 61 | }, | ||
| 62 | body => { | ||
| 63 | |||
| 64 | |||
| 65 | 'use' => 'literal', | ||
| 66 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 67 | encodingStyle => '', | ||
| 68 | parts => [ | ||
| 69 | qw( Shipment::UPS::WSDL::ShipElements::ShipmentResponse ) | ||
| 70 | ], | ||
| 71 | }, | ||
| 72 | } | ||
| 73 | }, | ||
| 74 | $body, | ||
| 75 | $header | ||
| 76 | ); | ||
| 77 | } | ||
| 78 | |||
| 79 | |||
| 80 | sub ProcessShipConfirm { | ||
| 81 | my ($self, $body, $header) = @_; | ||
| 82 | die | ||
| 83 | "ProcessShipConfirm must be called as object method (\$self is <$self>)" | ||
| 84 | if not blessed($self); | ||
| 85 | return $self->SUPER::call( | ||
| 86 | { operation => 'ProcessShipConfirm', | ||
| 87 | soap_action => | ||
| 88 | 'http://onlinetools.ups.com/webservices/ShipBinding/v1.0', | ||
| 89 | style => 'document', | ||
| 90 | body => { | ||
| 91 | |||
| 92 | |||
| 93 | 'use' => 'literal', | ||
| 94 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 95 | encodingStyle => '', | ||
| 96 | parts => [ | ||
| 97 | qw( Shipment::UPS::WSDL::ShipElements::ShipConfirmRequest ) | ||
| 98 | ], | ||
| 99 | }, | ||
| 100 | header => { | ||
| 101 | |||
| 102 | 'use' => 'literal', | ||
| 103 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 104 | encodingStyle => '', | ||
| 105 | parts => | ||
| 106 | [qw( Shipment::UPS::WSDL::ShipElements::UPSSecurity )], | ||
| 107 | |||
| 108 | }, | ||
| 109 | headerfault => { | ||
| 110 | |||
| 111 | }, | ||
| 112 | response => { | ||
| 113 | header => { | ||
| 114 | |||
| 115 | }, | ||
| 116 | body => { | ||
| 117 | |||
| 118 | |||
| 119 | 'use' => 'literal', | ||
| 120 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 121 | encodingStyle => '', | ||
| 122 | parts => [ | ||
| 123 | qw( Shipment::UPS::WSDL::ShipElements::ShipConfirmResponse ) | ||
| 124 | ], | ||
| 125 | }, | ||
| 126 | } | ||
| 127 | }, | ||
| 128 | $body, | ||
| 129 | $header | ||
| 130 | ); | ||
| 131 | } | ||
| 132 | |||
| 133 | |||
| 134 | sub ProcessShipAccept { | ||
| 135 | my ($self, $body, $header) = @_; | ||
| 136 | die "ProcessShipAccept must be called as object method (\$self is <$self>)" | ||
| 137 | if not blessed($self); | ||
| 138 | return $self->SUPER::call( | ||
| 139 | { operation => 'ProcessShipAccept', | ||
| 140 | soap_action => | ||
| 141 | 'http://onlinetools.ups.com/webservices/ShipBinding/v1.0', | ||
| 142 | style => 'document', | ||
| 143 | body => { | ||
| 144 | |||
| 145 | |||
| 146 | 'use' => 'literal', | ||
| 147 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 148 | encodingStyle => '', | ||
| 149 | parts => | ||
| 150 | [qw( Shipment::UPS::WSDL::ShipElements::ShipAcceptRequest )], | ||
| 151 | }, | ||
| 152 | header => { | ||
| 153 | |||
| 154 | 'use' => 'literal', | ||
| 155 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 156 | encodingStyle => '', | ||
| 157 | parts => | ||
| 158 | [qw( Shipment::UPS::WSDL::ShipElements::UPSSecurity )], | ||
| 159 | |||
| 160 | }, | ||
| 161 | headerfault => { | ||
| 162 | |||
| 163 | }, | ||
| 164 | response => { | ||
| 165 | header => { | ||
| 166 | |||
| 167 | }, | ||
| 168 | body => { | ||
| 169 | |||
| 170 | |||
| 171 | 'use' => 'literal', | ||
| 172 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 173 | encodingStyle => '', | ||
| 174 | parts => [ | ||
| 175 | qw( Shipment::UPS::WSDL::ShipElements::ShipAcceptResponse ) | ||
| 176 | ], | ||
| 177 | }, | ||
| 178 | } | ||
| 179 | }, | ||
| 180 | $body, | ||
| 181 | $header | ||
| 182 | ); | ||
| 183 | } | ||
| 184 | |||
| 185 | |||
| 186 | sub _get_name_resolver { | ||
| 187 | |||
| 188 | my $prefix_1 = { | ||
| 189 | 'attribute' => 'Shipment::UPS::WSDL::ShipAttributes', | ||
| 190 | 'typemap' => 'Shipment::UPS::WSDL::ShipTypemaps', | ||
| 191 | 'interface' => 'Shipment::UPS::WSDL::ShipInterfaces', | ||
| 192 | 'type' => 'Shipment::UPS::WSDL::ShipTypes', | ||
| 193 | 'server' => 'Shipment::UPS::WSDL::ShipServer', | ||
| 194 | 'element' => 'Shipment::UPS::WSDL::ShipElements' | ||
| 195 | }; | ||
| 196 | |||
| 197 | |||
| 198 | return SOAP::WSDL::Generator::Template::Plugin::XSD->new( | ||
| 199 | { prefix_resolver => SOAP::WSDL::Generator::PrefixResolver->new( | ||
| 200 | { namespace_prefix_map => { | ||
| 201 | 'http://www.w3.org/2001/XMLSchema' => | ||
| 202 | 'SOAP::WSDL::XSD::Typelib::Builtin', | ||
| 203 | }, | ||
| 204 | namespace_map => {}, | ||
| 205 | prefix => $prefix_1, | ||
| 206 | } | ||
| 207 | ) | ||
| 208 | } | ||
| 209 | ); | ||
| 210 | } | ||
| 211 | |||
| 212 | 1; | ||
| 213 | |||
| 214 | __END__ |