amazon web services - java.net.UnknownHostException: fba-outbound.amazonaws.com -


while trying use amazon fws outbound api unable create order it. getting unknown exception. came know fws endpoint host not working. can me on creating order using fws api.

    com.amazonaws.fws.outbound.amazonfwsoutboundexception: internal error     @ com.amazonaws.fws.outbound.amazonfwsoutboundclient.invoke(amazonfwsoutboundclient.java:481)     @ com.amazonaws.fws.outbound.amazonfwsoutboundclient.createfulfillmentorder(amazonfwsoutboundclient.java:193)     @ com.amazonaws.fws.outbound.samples.createfulfillmentordersample.invokecreatefulfillmentorder(createfulfillmentordersample.java:164)     @ com.amazonaws.fws.outbound.samples.createfulfillmentordersample.main(createfulfillmentordersample.java:143) caused by: java.net.unknownhostexception: fba-outbound.amazonaws.com     @ java.net.abstractplainsocketimpl.connect(abstractplainsocketimpl.java:178)     @ java.net.plainsocketimpl.connect(plainsocketimpl.java:172)     @ java.net.sockssocketimpl.connect(sockssocketimpl.java:392)     @ java.net.socket.connect(socket.java:579)     @ sun.security.ssl.sslsocketimpl.connect(sslsocketimpl.java:618)     @ sun.security.ssl.sslsocketimpl.<init>(sslsocketimpl.java:451)     @ sun.security.ssl.sslsocketfactoryimpl.createsocket(sslsocketfactoryimpl.java:140)     @ org.apache.commons.httpclient.protocol.sslprotocolsocketfactory.createsocket(sslprotocolsocketfactory.java:81)     @ org.apache.commons.httpclient.protocol.controllerthreadsocketfactory$1.doit(controllerthreadsocketfactory.java:90)     @ org.apache.commons.httpclient.protocol.controllerthreadsocketfactory$sockettask.run(controllerthreadsocketfactory.java:157)     @ java.lang.thread.run(thread.java:745) 

my code ::

    /**      * add few required parameters, , try service      * create fulfillment order functionality      *      * @param args unused      */     public static void main(string... args) {          /************************************************************************          * access key id , secret acess key id, obtained from:          * http://aws.amazon.com          ***********************************************************************/         string accesskeyid = systemparams.aws_access_key_id;         string secretaccesskey = systemparams.aws_secret_key;          /************************************************************************          * instantiate http client implementation of amazon fws outbound           ***********************************************************************/         amazonfwsoutbound service = new amazonfwsoutboundclient(accesskeyid, secretaccesskey);          /************************************************************************          * uncomment try advanced configuration options. available options are:          *          *  - signature version          *  - proxy host , proxy port          *  - service url          *  - user agent string sent amazon fws outbound   service          *          ***********************************************************************/         // amazonfwsoutboundconfig config = new amazonfwsoutboundconfig();         // config.setsignatureversion("0");         // amazonfwsoutbound service = new amazonfwsoutboundclient(accesskeyid, secretaccesskey, config);          /************************************************************************          * uncomment try out mock service simulates amazon fws outbound           * responses without calling amazon fws outbound  service.          *          * responses loaded local xml files. can tweak xml files          * experiment various outputs during development          *          * xml files available under com/amazonaws/fws/outbound/mock tree          *          ***********************************************************************/         // amazonfwsoutbound service = new amazonfwsoutboundmock();          /************************************************************************          * setup request parameters , uncomment invoke try out           * sample create fulfillment order           ***********************************************************************/          createfulfillmentorder request = new createfulfillmentorder();           string myorderid = "test-00000002-1";           request.setmerchantfulfillmentorderid(myorderid);          request.setdisplayableorderid(myorderid);          request.setdisplayableorderdatetime("20016-08-02t00:00:00z");          request.setdisplayableordercomment("thank order!");          request.setshippingspeedcategory("standard");           list<string> notificationemails = new arraylist<string>();          notificationemails.add("email@domain.com"); //email address          request.setnotificationemaillist(notificationemails);           address address = new address();          address.setname("joe smith");          address.setline1("605 5th ave. s");          address.setline2("c/o amazon.com");          address.setcity("seattle");          address.setstateorprovincecode("wa");          address.setpostalcode("98104");          address.setcountrycode("us");          address.setphonenumber("206-266-1000");          request.setdestinationaddress(address);           list<createfulfillmentorderitem> items = new arraylist<createfulfillmentorderitem>(1);           createfulfillmentorderitem item1 = new createfulfillmentorderitem();           item1.setmerchantsku("b00thkekeq");           item1.setmerchantfulfillmentorderitemid(myorderid + "-1");          item1.setquantity(2);          items.add(item1);           request.setitem(items);           /*try {             createfulfillmentorderresponse response = service.createfulfillmentorder(request);             system.out.println("order : " + myorderid + " created " +                     "fwsoutboundservice. can check status of " +                     "order on 'manage orders' page @ " +                     "http://sellercentral.amazon.com");         } catch (amazonfwsoutboundexception e) {             // todo auto-generated catch block             e.printstacktrace();         }*/             // @todo: set request parameters here           invokecreatefulfillmentorder(service, request);      }        /**      * create fulfillment order  request sample      * request amazon send items merchant's inventory      * destination address.      *         * @param service instance of amazonfwsoutbound service      * @param request action invoke      */     public static void invokecreatefulfillmentorder(amazonfwsoutbound service, createfulfillmentorder request) {         try {              system.out.println ("createfulfillmentorder action response");             system.out.println ("=============================================================================");             system.out.println ();              createfulfillmentorderresponse response = service.createfulfillmentorder(request);                          system.out.println("    createfulfillmentorderresponse");             system.out.println();             if (response.issetresponsemetadata()) {                 system.out.println("        responsemetadata");                 system.out.println();                 responsemetadata  responsemetadata = response.getresponsemetadata();                 if (responsemetadata.issetrequestid()) {                     system.out.println("            requestid");                     system.out.println();                     system.out.println("                " + responsemetadata.getrequestid());                     system.out.println();                 }             }              system.out.println();           } catch (amazonfwsoutboundexception ex) {              system.out.println("caught exception: " + ex.getmessage());             system.out.println("response status code: " + ex.getstatuscode());             system.out.println("error code: " + ex.geterrorcode());             system.out.println("error type: " + ex.geterrortype());             system.out.println("request id: " + ex.getrequestid());             system.out.print("xml: " + ex.getxml());             ex.printstacktrace();         }     }  } 

-unknownhostexception domain. mean server does't no domain.

setting dns server ip or insert (ip domain information) /etc/hosts - if it's not work, server looking dns, can change order finding local "host file"


Comments