c# - Creating FedEx Shipping Documnents using FedEx ship service WSDL -


i in process of integrating fedex international ship service. stuck on 1 part. trying create certificate of origin using test environment. have followed xml schema , have come code below

private static void setcustominvoice(processshipmentrequest request)     {         request.requestedshipment.shippingdocumentspecification = new shippingdocumentspecification();         request.requestedshipment.shippingdocumentspecification.shippingdocumenttypes = new requestedshippingdocumenttype[1] { new requestedshippingdocumenttype() };         request.requestedshipment.shippingdocumentspecification.shippingdocumenttypes[0] = requestedshippingdocumenttype.certificate_of_origin;         request.requestedshipment.shippingdocumentspecification.certificateoforigin = new certificateoforigindetail();         request.requestedshipment.shippingdocumentspecification.certificateoforigin.documentformat = new shippingdocumentformat { stocktype = shippingdocumentstocktype.stock_4x6, imagetype = shippingdocumentimagetype.pdf, imagetypespecified = true, stocktypespecified = true };         request.requestedshipment.specialservicesrequested = new shipmentspecialservicesrequested();         request.requestedshipment.specialservicesrequested.specialservicetypes = new shipmentspecialservicetype[1] { new shipmentspecialservicetype() };         request.requestedshipment.specialservicesrequested.specialservicetypes[0] = shipmentspecialservicetype.electronic_trade_documents;          request.requestedshipment.specialservicesrequested.etddetail = new etddetail();         request.requestedshipment.specialservicesrequested.etddetail.requesteddocumentcopies = new requestedshippingdocumenttype[1] { requestedshippingdocumenttype.certificate_of_origin };         request.requestedshipment.specialservicesrequested.etddetail.documentreferences = new uploaddocumentreferencedetail[1] { new uploaddocumentreferencedetail() };         request.requestedshipment.specialservicesrequested.etddetail.requesteddocumentcopies[0] = requestedshippingdocumenttype.certificate_of_origin;      } 

but keep getting error message web service stating “invalid stock type”. though shipmentdocumentstocktype enum , using 1 of values it. still getting error. ideas might going wrong? information great help. have tried getting in touch fedex technical support , not great help.

this might little late wanted provide answer in case else might looking it.

i having similar problem instead of certificate of origin commercial invoice. turns out these forms need printed on full 8.5 x 11 page in pdf format, changing stocktype stock_4x6 paper_letter fixed me:

from: request.requestedshipment.shippingdocumentspecification.certificateoforigin.documentformat = new shippingdocumentformat { stocktype = shippingdocumentstocktype.stock_4x6, imagetype = shippingdocumentimagetype.pdf, imagetypespecified = true, stocktypespecified = true };

to: request.requestedshipment.shippingdocumentspecification.certificateoforigin.documentformat = new shippingdocumentformat { stocktype = shippingdocumentstocktype.paper_letter, imagetype = shippingdocumentimagetype.pdf, imagetypespecified = true, stocktypespecified = true };

hope helps


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -