« Shipment/UPS/WSDL/TrackInterfaces/TrackService/TrackPort.pm
↑ Summary
Shipment/UPS/WSDL/XAVInterfaces/XAVService/XAVPort.pm »
| 1 | package Shipment::UPS::WSDL::ShipInterfaces::VoidService::VoidPort; | ||
| 2 | $Shipment::UPS::WSDL::ShipInterfaces::VoidService::VoidPort::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::VoidService | ||
| 12 | if not Shipment::UPS::WSDL::ShipTypemaps::VoidService->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/Void') | ||
| 20 | if not $_[2]->{proxy}; | ||
| 21 | |||
| 22 | $_[0]->set_class_resolver('Shipment::UPS::WSDL::ShipTypemaps::VoidService') | ||
| 23 | if not $_[2]->{class_resolver}; | ||
| 24 | |||
| 25 | $_[0]->set_prefix($_[2]->{use_prefix}) if exists $_[2]->{use_prefix}; | ||
| 26 | } | ||
| 27 | |||
| 28 | sub ProcessVoid { | ||
| 29 | my ($self, $body, $header) = @_; | ||
| 30 | die "ProcessVoid must be called as object method (\$self is <$self>)" | ||
| 31 | if not blessed($self); | ||
| 32 | return $self->SUPER::call( | ||
| 33 | { operation => 'ProcessVoid', | ||
| 34 | soap_action => | ||
| 35 | 'http://onlinetools.ups.com/webservices/VoidBinding/v1.1', | ||
| 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::VoidShipmentRequest ) | ||
| 45 | ], | ||
| 46 | }, | ||
| 47 | header => { | ||
| 48 | |||
| 49 | 'use' => 'literal', | ||
| 50 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 51 | encodingStyle => '', | ||
| 52 | parts => | ||
| 53 | [qw( Shipment::UPS::WSDL::ShipElements::UPSSecurity )], | ||
| 54 | |||
| 55 | }, | ||
| 56 | headerfault => { | ||
| 57 | |||
| 58 | }, | ||
| 59 | response => { | ||
| 60 | header => { | ||
| 61 | |||
| 62 | }, | ||
| 63 | body => { | ||
| 64 | |||
| 65 | |||
| 66 | 'use' => 'literal', | ||
| 67 | namespace => 'http://schemas.xmlsoap.org/wsdl/soap/', | ||
| 68 | encodingStyle => '', | ||
| 69 | parts => [ | ||
| 70 | qw( Shipment::UPS::WSDL::ShipElements::VoidShipmentResponse ) | ||
| 71 | ], | ||
| 72 | }, | ||
| 73 | } | ||
| 74 | }, | ||
| 75 | $body, | ||
| 76 | $header | ||
| 77 | ); | ||
| 78 | } | ||
| 79 | |||
| 80 | |||
| 81 | sub _get_name_resolver { | ||
| 82 | |||
| 83 | my $prefix_1 = { | ||
| 84 | 'attribute' => 'Shipment::UPS::WSDL::ShipAttributes', | ||
| 85 | 'typemap' => 'Shipment::UPS::WSDL::ShipTypemaps', | ||
| 86 | 'interface' => 'Shipment::UPS::WSDL::ShipInterfaces', | ||
| 87 | 'type' => 'Shipment::UPS::WSDL::ShipTypes', | ||
| 88 | 'server' => 'Shipment::UPS::WSDL::ShipServer', | ||
| 89 | 'element' => 'Shipment::UPS::WSDL::ShipElements' | ||
| 90 | }; | ||
| 91 | |||
| 92 | |||
| 93 | return SOAP::WSDL::Generator::Template::Plugin::XSD->new( | ||
| 94 | { prefix_resolver => SOAP::WSDL::Generator::PrefixResolver->new( | ||
| 95 | { namespace_prefix_map => { | ||
| 96 | 'http://www.w3.org/2001/XMLSchema' => | ||
| 97 | 'SOAP::WSDL::XSD::Typelib::Builtin', | ||
| 98 | }, | ||
| 99 | namespace_map => {}, | ||
| 100 | prefix => $prefix_1, | ||
| 101 | } | ||
| 102 | ) | ||
| 103 | } | ||
| 104 | ); | ||
| 105 | } | ||
| 106 | |||
| 107 | 1; | ||
| 108 | |||
| 109 | __END__ |