<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem using the new &amp;quot;API&amp;quot; style with the JAVA SDK in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/53325#M28451</link>
    <description>&lt;P&gt;Hi, have you sorted out this issue ?&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2015 09:46:11 GMT</pubDate>
    <dc:creator>lpavone</dc:creator>
    <dc:date>2015-12-15T09:46:11Z</dc:date>
    <item>
      <title>Problem using the new "API" style with the JAVA SDK</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/53084#M28244</link>
      <description>&lt;P&gt;Probably something stupid that I'm not doing, but I am having problems doing things using the new API. Sequences like the following (Which is exactly the ChargeCustomerProfile sample code from the samples on github):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Common code to set for all requests&lt;BR /&gt;ApiOperationBase.setEnvironment(Environment.SANDBOX);&lt;/P&gt;&lt;P&gt;MerchantAuthenticationType merchantAuthenticationType = new MerchantAuthenticationType() ;&lt;BR /&gt;merchantAuthenticationType.setName(apiLoginId);&lt;BR /&gt;merchantAuthenticationType.setTransactionKey(transactionKey);&lt;BR /&gt;ApiOperationBase.setMerchantAuthentication(merchantAuthenticationType);&lt;/P&gt;&lt;P&gt;// Populate the payment data&lt;BR /&gt;PaymentType paymentType = new PaymentType();&lt;BR /&gt;CreditCardType creditCard = new CreditCardType();&lt;BR /&gt;creditCard.setCardNumber("4242424242424242");&lt;BR /&gt;creditCard.setExpirationDate("0822");&lt;BR /&gt;paymentType.setCreditCard(creditCard);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Always result in the following type of error:&lt;/P&gt;&lt;P&gt;29 [pool-1-thread-1] DEBUG net.authorize.util.HttpUtility - Posting request to Url: '&lt;A href="https://apitest.authorize.net/xml/v1/request.api'" target="_blank"&gt;https://apitest.authorize.net/xml/v1/request.api'&lt;/A&gt;&lt;BR /&gt;126 [main] ERROR net.authorize.util.HttpUtility - Execution error for http post Message: 'java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy'&lt;BR /&gt;127 [main] DEBUG net.authorize.api.controller.base.ApiOperationBase - Got a 'null' Response for request:'net.authorize.api.contract.v1.CreateTransactionRequest@4eb3ea0f'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have no trouble doing things the "old" way - ie:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Merchant merchant = Merchant.createMerchant(Environment.SANDBOX, apiLoginId,transactionKey);&lt;/P&gt;&lt;P&gt;// Create payment transaction&lt;BR /&gt;Transaction transaction = merchant.createCIMTransaction(TransactionType.CREATE_CUSTOMER_PROFILE_TRANSACTION);&lt;/P&gt;&lt;P&gt;// Set customer ID and customer's payment profile ID that you want to be billed&lt;BR /&gt;transaction.setCustomerProfileId(customerProfileID);&lt;BR /&gt;transaction.setCustomerPaymentProfileId(customerPaymentProfileID);&lt;/P&gt;&lt;P&gt;// Add information about the transaction&lt;BR /&gt;PaymentTransaction paymentTransaction = PaymentTransaction.createPaymentTransaction();&lt;BR /&gt;Order order = Order.createOrder();&lt;BR /&gt;order.setTotalAmount(new BigDecimal(9.99));&lt;BR /&gt;order.setDescription("Test charge");&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems like it is probably an issue with serialization to XML? I downloaded the SDK from github and just did "ant jar" to make the SDK jar - nothing special there - it doesn't seem possible that I would not be able to get the samples to work with the SDK &amp;nbsp;"out of the box", so I'm assuming I did something stupid?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help gratefully appreciated - I can continue to use the old ways, but I would prefer to implement something more future-proof.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2015 19:59:03 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/53084#M28244</guid>
      <dc:creator>cjh</dc:creator>
      <dc:date>2015-11-24T19:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using the new "API" style with the JAVA SDK</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/53204#M28340</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi Chris,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please specify which sample code are you using and did you make any modifications to it? &amp;nbsp;It would also help to know the version and vendor of your JDK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Joy&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 16:48:24 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/53204#M28340</guid>
      <dc:creator>Joy</dc:creator>
      <dc:date>2015-12-03T16:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using the new "API" style with the JAVA SDK</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/53325#M28451</link>
      <description>&lt;P&gt;Hi, have you sorted out this issue ?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 09:46:11 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/53325#M28451</guid>
      <dc:creator>lpavone</dc:creator>
      <dc:date>2015-12-15T09:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using the new "API" style with the JAVA SDK</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/53372#M28495</link>
      <description>&lt;P&gt;In case it helps, I am using Java 8:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I am trying to run the simple case of&amp;nbsp;ChargeCreditCard.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run the example I pulled from gitHub I got an approval transaction:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;xxxx@xxxxxxxxxx:~/projects/[authorize.net]/sample-code-java$ java -jar target/SampleCode.jar ChargeCreditCard
12/21/15 12:12:21,865: INFO [pool-1-thread-1] (net.authorize.util.LogHelper:24) - Use Proxy: 'false'
1
Successful Credit Card Transaction
2BR065
2247246870&lt;/PRE&gt;&lt;P&gt;but then generating the JAR and including this in a separate project, without code changes, just creating a Java class with the same example code, I am unable to get a successfully transaction.&lt;/P&gt;&lt;P&gt;Error is:&lt;/P&gt;&lt;PRE&gt;SEVERE: Execution error for http post Message: 'java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you can help with&amp;nbsp;this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 12:29:29 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/53372#M28495</guid>
      <dc:creator>lpavone</dc:creator>
      <dc:date>2015-12-21T12:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using the new "API" style with the JAVA SDK</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/54280#M29286</link>
      <description>&lt;P&gt;I am also seeing this problem when using the Transaction Detail API with a sdk checkout and build from today. I tried building with Java 1.6, 1.7, and 1.8 but had the same results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;APP ERROR [main 04-08 15:55:53.437] (HttpUtility.java:111) HttpUtility: Execution error for http post Message: 'java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy'
No response received
Exception in thread "main" java.lang.Exception: No response received&lt;/PRE&gt;&lt;P&gt;If I go back to a java sdk build I created on the 12th of November 2015 using java 1.6.0_45, then it all works fine. The only change is which anet-java-sdk.jar I drop into the project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that I was originally trying to get this to work under a new java 1.8 project, but fell back to testing against a project running under java 1.7.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 20:43:14 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/54280#M29286</guid>
      <dc:creator>mkienenb</dc:creator>
      <dc:date>2016-04-08T20:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using the new "API" style with the JAVA SDK</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/54290#M29296</link>
      <description>I have isolated the problem. Attempting to build the sdk using ant is what causes this issue. Building the sdk with Maven works fine. I suppose the first clue that ant was not maintained should have been that the ant version is 1.8.2 while the maven version is 1.8.9.</description>
      <pubDate>Mon, 11 Apr 2016 15:12:37 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/54290#M29296</guid>
      <dc:creator>mkienenb</dc:creator>
      <dc:date>2016-04-11T15:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using the new "API" style with the JAVA SDK</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/54291#M29297</link>
      <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/19254"&gt;@mkienenb﻿&lt;/a&gt;, thanks for providing feedback and opening the issue on GitHub for our developers to review.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2016 15:40:46 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/54291#M29297</guid>
      <dc:creator>RichardH</dc:creator>
      <dc:date>2016-04-11T15:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using the new "API" style with the JAVA SDK</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/55583#M30450</link>
      <description>&lt;P&gt;Richard,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue was closed on github, but the problem remains in the master branch.&lt;/P&gt;&lt;P&gt;Added my latest experiences there as a comment.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 16:16:09 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Problem-using-the-new-quot-API-quot-style-with-the-JAVA-SDK/m-p/55583#M30450</guid>
      <dc:creator>mkienenb</dc:creator>
      <dc:date>2016-08-29T16:16:09Z</dc:date>
    </item>
  </channel>
</rss>

