FedEx WebService Sameday: Invalid Service Type - fedex

Integrating with FedEx web services, as part of "Ship Service" testing, when I use the "SAMEDAY" service type for shipment, getting a response as "Invalid service type".
Please find the below details:
Service URL - https://wsbeta.fedex.com:443/web-services/ship
Attached
Payload
Response
In return, received "2464" error code and "Invalid service type" message
Payload:
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://fedex.com/ws/ship/v13">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ProcessShipmentRequest>
<WebAuthenticationDetail>
<UserCredential>
<Key>YOUR ACCOUNT</Key>
<Password>YOUR PASSWORD</Password>
</UserCredential>
</WebAuthenticationDetail>
<ClientDetail>
<AccountNumber>YOUR ACCOUNT</AccountNumber>
<MeterNumber>YOUR METER</MeterNumber>
</ClientDetail>
<TransactionDetail>
<CustomerTransactionId>J-0080000190-12345671000000128</CustomerTransactionId>
</TransactionDetail>
<Version>
<ServiceId>ship</ServiceId>
<Major>28</Major>
<Intermediate>0</Intermediate>
<Minor>0</Minor>
</Version>
<RequestedShipment>
<ShipTimestamp>2021-11-10T22:22:13-05:00</ShipTimestamp>
<DropoffType>REGULAR_PICKUP</DropoffType>
<ServiceType>SAME_DAY</ServiceType>
<PackagingType>YOUR_PACKAGING</PackagingType>
<TotalWeight>
<Units>LB</Units>
<Value>39.683</Value>
</TotalWeight>
<Shipper>
<AccountNumber>YOUR ACCOUNT</AccountNumber>
<Contact>
<CompanyName>Company name</CompanyName>
<PhoneNumber>111111111 </PhoneNumber>
<EMailAddress>email#gmail.com</EMailAddress>
</Contact>
<Address>
<StreetLines>3240 BAYSHORE BLVD</StreetLines>
<City>BRISBANE</City>
<StateOrProvinceCode>CA</StateOrProvinceCode>
<PostalCode>94005</PostalCode>
<CountryCode>US</CountryCode>
</Address>
</Shipper>
<Recipient>
<Contact>
<PersonName>XYZ</PersonName>
<CompanyName>Domestic US Customer 11</CompanyName>
<PhoneNumber>11111111</PhoneNumber>
</Contact>
<Address>
<StreetLines>Augusta Ave SE</StreetLines>
<City>Atlanta</City>
<StateOrProvinceCode>GA</StateOrProvinceCode>
<PostalCode>30315-1402</PostalCode>
<CountryCode>US</CountryCode>
</Address>
</Recipient>
<ShippingChargesPayment>
<PaymentType>SENDER</PaymentType>
<Payor>
<ResponsibleParty>
<AccountNumber>YOUR ACCOUNT</AccountNumber>
<Contact>
<CompanyName>Company Name</CompanyName>
<PhoneNumber>1234567890</PhoneNumber>
</Contact>
<Address>
<StreetLines>3240 BAYSHORE BLVD</StreetLines>
<City>BRISBANE</City>
<StateOrProvinceCode>CA</StateOrProvinceCode>
<PostalCode>94005</PostalCode>
<CountryCode>US</CountryCode>
</Address>
</ResponsibleParty>
</Payor>
</ShippingChargesPayment>
<CustomsClearanceDetail>
<CustomsValue>
<Currency>USD</Currency>
<Amount>17.55</Amount>
</CustomsValue>
<Commodities>
<Name>TG11</Name>
<NumberOfPieces>1</NumberOfPieces>
<Description>TG11</Description>
<CountryOfManufacture>US</CountryOfManufacture>
<Weight>
<Units>KG</Units>
<Value>16.2</Value>
</Weight>
<Quantity>1</Quantity>
<QuantityUnits>EA</QuantityUnits>
<UnitPrice>
<Currency>USD</Currency>
<Amount>17.55</Amount>
</UnitPrice>
<CustomsValue>
<Currency>USD</Currency>
<Amount>17.55</Amount>
</CustomsValue>
<PartNumber>TG11</PartNumber>
</Commodities>
</CustomsClearanceDetail>
<LabelSpecification>
<LabelFormatType>COMMON2D</LabelFormatType>
<ImageType>PDF</ImageType>
<LabelStockType>PAPER_7X4.75</LabelStockType>
</LabelSpecification>
<RateRequestTypes>LIST</RateRequestTypes>
<RateRequestTypes>ACCOUNT</RateRequestTypes>
<PackageCount>1</PackageCount>
<RequestedPackageLineItems>
<Weight>
<Units>LB</Units>
<Value>39.683</Value>
</Weight>
<Dimensions>
<Length>10</Length>
<Width>20</Width>
<Height>30</Height>
<Units>IN</Units>
</Dimensions>
<SpecialServicesRequested>
<SpecialServiceTypes>SIGNATURE_OPTION</SpecialServiceTypes>
<SignatureOptionDetail>
<OptionType>DIRECT</OptionType>
</SignatureOptionDetail>
</SpecialServicesRequested>
<ContentRecords>
<PartNumber>TG11</PartNumber>
<ItemNumber>TG11</ItemNumber>
<ReceivedQuantity>1</ReceivedQuantity>
<Description>Trad.Good 11,PD,Reg.Trading</Description>
</ContentRecords>
</RequestedPackageLineItems>
</RequestedShipment>
</ProcessShipmentRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ProcessShipmentReply xmlns="http://fedex.com/ws/ship/v13">
<HighestSeverity>ERROR</HighestSeverity>
<Notifications>
<Severity>ERROR</Severity>
<Source>ship</Source>
<Code>2464</Code>
<Message>Invalid service type.</Message>
<LocalizedMessage>Invalid service type.</LocalizedMessage>
</Notifications>
<Notifications>
<Severity>WARNING</Severity>
<Source>ship</Source>
<Code>2469</Code>
<Message>shipTimestamp is invalid</Message>
<LocalizedMessage>shipTimestamp is invalid</LocalizedMessage>
</Notifications>
<TransactionDetail>
<CustomerTransactionId>J-0080000190-12345671000000128</CustomerTransactionId>
</TransactionDetail>
<Version>
<ServiceId>ship</ServiceId>
<Major>13</Major>
<Intermediate>0</Intermediate>
<Minor>0</Minor>
</Version>
</ProcessShipmentReply>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

After checking the developer guide of FedEx web services, the "SAMEDAY" and "SAMEDAYCITY" services can only be used for intra-Mexico. I was trying to use it for intra-USA.
For more information, please refer FedEx developer guide.

Related

How can I consume SOAP service in C# with custom header authentication

How can I consume SOAP service in C# with custom header authentication. Please help?
Service URL Like : https://servername/web/umr/uat/member/updateCPSCallTrackV01
Services header
<soap:Header>
<wsse:Security soap:mustUnderstand="true"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" >
<wsse:UsernameToken wsu:Id="UsernameToken-556E0ED5627B7F955E144138289424314"> <wsse:Username>username</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">S9Xbze8iUdXmeROt1Akvdg==</wsse:Nonce>
<wsu:Created>2015-09-04T16:08:14.243Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
Request Format
<bml:invokeService chan:channel="true">
<bml:CltrReqDetail chan:structuredContainer="true">
<bml:pingSvcI>Ping</bml:pingSvcI>
</bml:CltrReqDetail>
</bml:invokeService>
Response Format
<SOAP-ENV:Envelope xmlns:bml="http://www.BML048.Request.com" xmlns:chan="http://www.ibm.com/xmlns/prod/CICS/channel-instance" xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
<SOAP-ENV:Body>
<invokeServiceResponse cics:channel="true" xmlns="http://www.BML048.Response.com" xmlns:cics="http://www.ibm.com/xmlns/prod/CICS/channel-instance">
<CltrRspStatus cics:structuredContainer="true">
<statusReturnCode>S</statusReturnCode>
<statusInfo>PING SERVICE / TEST CALL WAS SUCCESSFUL!</statusInfo>
<statusInfo01T/>
<statusInfo02T/>
<statusInfo04T/>
</CltrRspStatus>
</invokeServiceResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Note : this service is working fine in SOPUI 5.0 Tool.

how to filter sensitive data from xml in logs

I have a Rails application which uses the ActiveMerchant gem.
When the ActiveMerchant gem posts an ssl request (e.g. to process a credit card) it logs the body as debug https://github.com/activemerchant/active_merchant/blob/master/lib/active_merchant/connection.rb line 66
This debug has sensitive information such as passwords, usernames, etc.
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://tempuri.org/">
<env:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>usernamehere</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">passwordhere</wsse:Password>
....
How can these sensitive fields be filtered out of the logs?

Intuit QBO SDK v3 Setting Customer PreferredDeliveryMethod to None does not seem to be working correctly

I use Intuit QBO SDK v3 DataService.FindById to get a Customer entity, modify some of the attributes including PreferredDeliveryMethod then call DataService.Update. When I set PreferredDeliveryMethod to 'Print' or 'Email', the Customer is modified correctly as shown by the response object. When I set PreferredDeliveryMethod to 'None', the response comes back with 'Print' regardless of what it was before I applied the modification. How do I set PreferredDeliveryMethod to 'None' for a proper response?
Update: This issue was with a Sandbox Company. When I tried it with a Production Company, the update worked correctly. There is some suspicion Company settings are involved but I don't know what yet.
Request:
<?xml version="1.0"?>
<Customer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" domain="QBO" sparse="false" xmlns="http://schema.intuit.com/finance/v3">
<Id>3</Id>
<SyncToken>2</SyncToken>
<MetaData>
<CreateTime>2014-09-19T19:51:22-04:00</CreateTime>
<LastUpdatedTime>2015-02-10T09:53:30-05:00</LastUpdatedTime>
</MetaData>
<GivenName>Grace</GivenName>
<FamilyName>Pariente</FamilyName>
<FullyQualifiedName>Cool Cars</FullyQualifiedName>
<CompanyName>Cool Cars</CompanyName>
<DisplayName>Cool Cars</DisplayName>
<PrintOnCheckName>Cool Cars</PrintOnCheckName>
<Active>true</Active>
<PrimaryPhone>
<FreeFormNumber>(415) 555-9933</FreeFormNumber>
</PrimaryPhone>
<AlternatePhone />
<Fax />
<PrimaryEmailAddr>
<Address>Cool_Cars#intuit.com</Address>
</PrimaryEmailAddr>
<DefaultTaxCodeRef />
<Taxable>false</Taxable>
<BillAddr>
<Id>4</Id>
<Line1>65 Ocean Dr.</Line1>
<City>Half Moon Bay</City>
<CountrySubDivisionCode>CA</CountrySubDivisionCode>
<PostalCode>94213</PostalCode>
<Lat>37.4300318</Lat>
<Long>-122.4336537</Long>
</BillAddr>
<ShipAddr />
<Job>false</Job>
<BillWithParent>false</BillWithParent>
<SalesTermRef />
<Balance>0</Balance>
<BalanceWithJobs>0</BalanceWithJobs>
<PreferredDeliveryMethod>None</PreferredDeliveryMethod>
</Customer>
Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-02-10T06:53:55.320-08:00">
<Customer domain="QBO" sparse="false">
<Id>3</Id>
<SyncToken>3</SyncToken>
<MetaData>
<CreateTime>2014-09-19T16:51:22-07:00</CreateTime>
<LastUpdatedTime>2015-02-10T06:53:55-08:00</LastUpdatedTime>
</MetaData>
<GivenName>Grace</GivenName>
<FamilyName>Pariente</FamilyName>
<FullyQualifiedName>Cool Cars</FullyQualifiedName>
<CompanyName>Cool Cars</CompanyName>
<DisplayName>Cool Cars</DisplayName>
<PrintOnCheckName>Cool Cars</PrintOnCheckName>
<Active>true</Active>
<PrimaryPhone><FreeFormNumber>(415) 555-9933</FreeFormNumber></PrimaryPhone>
<PrimaryEmailAddr><Address>Cool_Cars#intuit.com</Address></PrimaryEmailAddr>
<Taxable>false</Taxable>
<BillAddr>
<Id>4</Id>
<Line1>65 Ocean Dr.</Line1>
<City>Half Moon Bay</City>
<CountrySubDivisionCode>CA</CountrySubDivisionCode>
<PostalCode>94213</PostalCode>
<Lat>37.4300318</Lat>
<Long>-122.4336537</Long>
</BillAddr>
<Job>false</Job>
<BillWithParent>false</BillWithParent>
<Balance>0</Balance>
<BalanceWithJobs>0</BalanceWithJobs>
<PreferredDeliveryMethod>Print</PreferredDeliveryMethod>
</Customer>
</IntuitResponse>
Can you capture and share the raw request/response XML.
I tried the following java code and it worked fine.
Customer customer = new Customer();
customer.setId("1");
Customer cust = this.service.findById(customer);
System.out.println(cust.getPreferredDeliveryMethod());
cust.setPreferredDeliveryMethod("None");
this.service.update(cust);
System.out.println("Updated - " + cust.getPreferredDeliveryMethod());
GetById
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-02-10T02:10:51.595-08:00">
<Customer domain="QBO" sparse="false">
<Id>1</Id>
<SyncToken>4</SyncToken>
<MetaData>
<CreateTime>2015-02-02T20:34:19-08:00</CreateTime>
<LastUpdatedTime>2015-02-10T02:10:39-08:00</LastUpdatedTime>
</MetaData>
<GivenName>John</GivenName>
<FamilyName>Doe</FamilyName>
<FullyQualifiedName>John Doe</FullyQualifiedName>
...
<Job>false</Job>
<BillWithParent>false</BillWithParent>
<Balance>242.25</Balance>
<BalanceWithJobs>242.25</BalanceWithJobs>
<PreferredDeliveryMethod>Print</PreferredDeliveryMethod>
</Customer>
</IntuitResponse>
Update PrefDelMethod to 'None'
<Customer domain="QBO" sparse="false" xmlns="http://schema.intuit.com/finance/v3">
<Id>1</Id>
<SyncToken>4</SyncToken>
<MetaData>
<CreateTime>2015-02-02T20:34:19-08:00</CreateTime>
<LastUpdatedTime>2015-02-10T02:10:39-08:00</LastUpdatedTime>
</MetaData>
<GivenName>John</GivenName>
<FamilyName>Doe</FamilyName>
<FullyQualifiedName>John Doe</FullyQualifiedName>
...
<BalanceWithJobs>242.25</BalanceWithJobs>
<PreferredDeliveryMethod>None</PreferredDeliveryMethod>
</Customer>
Update response
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-02-10T02:10:53.800-08:00">
<Customer domain="QBO" sparse="false">
<Id>1</Id>
<SyncToken>5</SyncToken>
<MetaData>
<CreateTime>2015-02-02T20:34:19-08:00</CreateTime>
<LastUpdatedTime>2015-02-10T02:10:53-08:00</LastUpdatedTime>
</MetaData>
<GivenName>John</GivenName>
<FamilyName>Doe</FamilyName>
<FullyQualifiedName>John Doe</FullyQualifiedName>
...
<BalanceWithJobs>242.25</BalanceWithJobs>
<PreferredDeliveryMethod>None</PreferredDeliveryMethod>
</Customer>
</IntuitResponse>
Per Intuit Developer Community, "Most probably it is a sandbox issue as it has data already setup which can sometimes cause data issues."
Yes, I have seen other data issues with Sandbox. This is the accepted answer.

Using Servicestack WSDL with php

I am trying to use ServiceStack to replace WCF for a self hosted service, accessed with a PHP client that forms its messages from on the WSDL.
The WSDL produced by ServiceStack has "part names" called "par" eg:
<wsdl:message name="GetServiceDetailsIn">
<wsdl:part name="par" element="tns:GetServiceDetails" />
</wsdl:message>
Then the SOAP request produced by PHP looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body><par/></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
instead of this from the built-in help:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetServiceDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:Shout" />
</soap:Body>
</soap:Envelope>
The PHP client has used a par tag instead of GetServiceDetails and it gets a blank response. Can the "part name" definition can be renamed or removed in ServiceStack?
It seems you can't doing anything about this in ServiceStack and its not designed to work with PHP anyway. However you can get it working if you get PHP to tweak the XML tags with find-and-replace, or XSLTs, before sending it.

Cordys BPM - Create an E-mail Model based on an XML Schema Document

I have created a standalone email model and generated a web service based on the email model. I followed the same steps as described in the Cordys documentation ( https://wiki.cordys.com/display/bop41/Creating+an+E-mail+Model ) but when I try to invoke the web service I am getting a fault like "Do not understand method TAT_Email_Model_WebserviceOperation of type NSCUST".
I have linked my WebServiceInterface to an Email service container ( correct me if I am done wrong over here).
The complete description of the fault is as below. Any suggestions.
<ErrorDetails>
<Request>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Header xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<header xmlns="http://schemas.cordys.com/General/1.0/">
<Logger xmlns="http://schemas.cordys.com/General/1.0/" />
</header>
<i18n:international xmlns:i18n="http://www.w3.org/2005/09/ws-i18n">
<locale xmlns="http://www.w3.org/2005/09/ws-i18n">en-US</locale>
</i18n:international>
</SOAP:Header>
<SOAP:Body>
<TAT_Email_Model_WebserviceOperation xmlns="http://schemas.cordys.com/1.0/email">
<SOURCE>Notification Custom Method</SOURCE>
<MESSAGE_DATA>
<Application>
<data>
<message_data />
<message_metadata />
</data>
</Application>
</MESSAGE_DATA>
<SUBJECT>PARAMETER</SUBJECT>
<attachments>
<attachment name="" encoded="false">PARAMETER</attachment>
</attachments>
<SENDER_ADDRESS>
<MAIL_ID>PARAMETER</MAIL_ID>
<DISPLAY_NAME>PARAMETER</DISPLAY_NAME>
</SENDER_ADDRESS>
<RECEIVERS>
<MAILING_LIST>
<to>
<address>
<displayName>PARAMETER</displayName>
<emailAddress>PARAMETER</emailAddress>
</address>
</to>
<cc>
<address>
<displayName>PARAMETER</displayName>
<emailAddress>PARAMETER</emailAddress>
</address>
</cc>
<bcc>
<address>
<displayName>PARAMETER</displayName>
<emailAddress>PARAMETER</emailAddress>
</address>
</bcc>
</MAILING_LIST>
</RECEIVERS>
</TAT_Email_Model_WebserviceOperation>
</SOAP:Body>
</SOAP:Envelope>
</Request>
<Response>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Header xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<header xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/General/1.0/">
<msg-id>000C297F-0536-11E3-E944-DF0951D0118E</msg-id>
<license>License has expired since 138 day(s)</license>
</header>
</SOAP:Header>
<SOAP:Body>
<SOAP:Fault>
<faultcode>MustUnderstand</faultcode>
<faultstring xml:lang="en-US">Do not understand method TAT_Email_Model_WebserviceOperation of type NSCUST</faultstring>
<faultactor>http://schemas.cordys.com/1.0/email</faultactor>
<detail>
<cordys:FaultDetails xmlns:cordys="http://schemas.cordys.com/General/1.0/">
<cordys:LocalizableMessage xmlns:cordys="http://schemas.cordys.com/General/1.0/">
<cordys:MessageCode xmlns:cordys="http://schemas.cordys.com/General/1.0/" />
</cordys:LocalizableMessage>
</cordys:FaultDetails>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
</Response>
</ErrorDetails>
You have bound it to the wrong service container, you have to attach it to the Notification Service Container.
The error tells you that the current handling service container cannot handle requests of type NSCUST. This is available in the implementation of the webservice.
NOTE: you license has been expired on that server. With the License Manager in Cordys you can update it.

Resources