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