[Aerogear-users] aerogear-unifiedpush-java-client

Christopher Fahey chris at dealerrewards.net
Wed Aug 17 16:07:20 EDT 2016


Anyone?  I went to the sender API tab on the variants screen and copied 
the CURL UPS Rest command and ran it.

It failed.   So clearly not a problem with the java client software I 
wrote.  Clearly a problem with the push server.    Does this function 
even work?  Does anyone have it working?  Why would it fail?  Could it 
be that the settings are wrong in the server?

curl -u 
"48f23d56-75a5-4a7f-a097-a62404e5a6e0:221a9e9f-a040-4111-96b1-1d1983576f56"\ 
-v -H "Accept: application/json"-H "Content-type: application/json"\ -X 
POST -d \ '{ "message": { "alert": "Hello from the curl HTTP Sender!", 
"sound": "default" } }'\ 
https://www.dealerrewards.com:8986/ag-push/rest/sender

Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 173.166.153.1...
* Connected to www.dealerrewards.com (173.166.153.1) port 8986 (#0)
* ALPN, offering http/1.1
* Cipher selection: 
ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: C:\Users\Chris\AppData\Local\Apps\cURL\bin\curl-ca-bundle.crt
   CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*        subject: OU=Domain Control Validated; OU=Free SSL; 
CN=www.dealerrewards.com
*        start date: Aug 16 00:00:00 2016 GMT
*        expire date: Nov 14 23:59:59 2016 GMT
*        subjectAltName: www.dealerrewards.com matched
*        issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA 
Limited; CN=COMODO RSA Domain Validation Secure Server CA
*        SSL certificate verify ok.
* Server auth using Basic with user '48f23d56-75a5-4a7f-a097-a62404e5a6e0'
 > POST /ag-push/rest/sender HTTP/1.1
 > Host: www.dealerrewards.com:8986
 > Authorization: Basic 
NDhmMjNkNTYtNzVhNS00YTdmLWEwOTctYTYyNDA0ZTVhNmUwOjIyMWE5ZTlmLWEwNDAtNDExMS05NmIxLTFkMTk4MzU3NmY1Ng==
 > User-Agent: curl/7.46.0
 > Accept: */*
 > Accept : application/json
 > Content-type : application/json
 > Content-Length: 25
 > Content-Type: application/x-www-form-urlencoded
 >
* upload completely sent off: 25 out of 25 bytes
< HTTP/1.1 400 Bad Request
< Connection: keep-alive
< X-Powered-By: Undertow/1
< Server: WildFly/8
< Content-Type: text/html;charset=UTF-8
< Content-Length: 70
< Date: Wed, 17 Aug 2016 19:17:21 GMT
<
<html><head><title>Error</title></head><body>Bad Request</body></html>* 
Connection #0 to host www.dealerrewards.com left intact

Christopher Fahey
DealerRewards, Inc.
Maryland Branch Office
(410) 924-3185
------------------------------------------------------------------------
This electronic message transmission contains information from 
DealerRewards Inc. This message is confidential. It may also be 
privileged or otherwise protected by work-product immunity or other 
legal rules. If you have received it by mistake, please let us know by 
email reply and delete it from your system; you may not copy this 
message or disclose its contents to anyone.
DISCLAIMER: Since 2006, the U.S. Government has been monitoring all 
internet communications. If you have information that you do not wish to 
have monitored, please send it using regular postal services to the 
address listed on our website.
------------------------------------------------------------------------

On 8/17/2016 8:33 AM, Christopher Fahey wrote:
>
> I am using java client 1.1.0-final with UPS 1.1.1-final.
>
> I don't mean to be a constant thorn but I just keep running into these 
> issues and never can find any solution to them.
>
> I have everything compiled and running.  I have created an application 
> within UPS with an android variant.  I have my mobile app installed on 
> my android phone.  I can successfully send a notification using the 
> UPS admin console to my app.  The last part of the puzzle is to get 
> the UPS java client working so I can integrate my server with UPS.  I 
> have written a small test program to test it but I receive the 
> following error:
>
> Aug 17, 2016 8:17:10 AM 
> org.jboss.aerogear.unifiedpush.DefaultPushSender submitPayload
> SEVERE: The Unified Push Server returned status code: 400
>
> Why am I receiving this error?
>
> There is no indication in the Wildfly logs that it even handled the 
> connection or why it rejected it.  Here is the code:
>
>         String notifyURL = "https://www.dealerrewards.com:8080/ag-push";
>         String appId = "3c726feb-52ce-52ce-52ce-f08e9993c715";
>         String appSecret = "11ba55f6-52ce-52ce-52ce-06a9672db6ae";
>
>         PushSender defaultPushSender = 
> DefaultPushSender.withRootServerURL( notifyURL )
>                         .pushApplicationId( appId )
>                         .masterSecret( appSecret )
>                         .build();
>
>         UnifiedMessage unifiedMessage = UnifiedMessage.withMessage()
>                         .alert("test")
>                         .criteria().aliases("mike")
>                         .build();
>
>         defaultPushSender.send( unifiedMessage, new 
> MessageResponseCallback( )
>         {
>             @Override
>             public void onComplete( )
>             {
>                 // TODO Auto-generated method stub
>
>             }
>         } );
>
> Christopher Fahey
> DealerRewards, Inc.
> Maryland Branch Office
> (410) 924-3185
> ------------------------------------------------------------------------
> This electronic message transmission contains information from 
> DealerRewards Inc. This message is confidential. It may also be 
> privileged or otherwise protected by work-product immunity or other 
> legal rules. If you have received it by mistake, please let us know by 
> email reply and delete it from your system; you may not copy this 
> message or disclose its contents to anyone.
> DISCLAIMER: Since 2006, the U.S. Government has been monitoring all 
> internet communications. If you have information that you do not wish 
> to have monitored, please send it using regular postal services to the 
> address listed on our website.
> ------------------------------------------------------------------------
>
> On 8/16/2016 8:09 PM, Matthias Wessendorf wrote:
>> Their dependency is declared here:
>> https://github.com/aerogear/aerogear-unifiedpush-java-client/blob/master/pom.xml#L85-L89
>>
>> Note, that master branch onf the java-client is requiring 1.2.0- 
>> version of the UPS,
>>
>> while the 1.1.0 version of the java-client is supposed to work w/ UPS 
>> 1.1.x
>>
>>
>>
>> On Wed, Aug 17, 2016 at 12:16 AM, Daniel Passos <dpassos at redhat.com 
>> <mailto:dpassos at redhat.com>> wrote:
>>
>>     Hi Christopher,
>>
>>     Those files are in aerogear-unifiedpush-server
>>     <https://github.com/aerogear/aerogear-unifiedpush-server/> repo
>>
>>
>>     On Tue, Aug 16, 2016 at 5:58 PM, Christopher Fahey
>>     <chris at dealerrewards.net <mailto:chris at dealerrewards.net>> wrote:
>>
>>         Speaking of other things, can anyone tell me where I can find
>>         the following branch files:
>>
>>         org.jboss.aerogear.unifiedpush.message.apns.*
>>
>>
>>     https://github.com/aerogear/aerogear-unifiedpush-server/tree/master/push/model/src/main/java/org/jboss/aerogear/unifiedpush/message/apns
>>     <https://github.com/aerogear/aerogear-unifiedpush-server/tree/master/push/model/src/main/java/org/jboss/aerogear/unifiedpush/message/apns>
>>
>>         org.jboss.aerogear.unifiedpush.message.windows.*
>>
>>     https://github.com/aerogear/aerogear-unifiedpush-server/tree/master/push/model/src/main/java/org/jboss/aerogear/unifiedpush/message/windows
>>     <https://github.com/aerogear/aerogear-unifiedpush-server/tree/master/push/model/src/main/java/org/jboss/aerogear/unifiedpush/message/windows>
>>
>>         The files are not in the git repository.
>>
>>         https://github.com/aerogear/aerogear-unifiedpush-java-client/tree/master/src/main/java/org/jboss/aerogear/unifiedpush
>>         <https://github.com/aerogear/aerogear-unifiedpush-java-client/tree/master/src/main/java/org/jboss/aerogear/unifiedpush>
>>
>>
>>         Christopher Fahey
>>         DealerRewards, Inc.
>>         Maryland Branch Office
>>         (410) 924-3185 <tel:%28410%29%20924-3185>
>>         ------------------------------------------------------------------------
>>         This electronic message transmission contains information
>>         from DealerRewards Inc. This message is confidential. It may
>>         also be privileged or otherwise protected by work-product
>>         immunity or other legal rules. If you have received it by
>>         mistake, please let us know by email reply and delete it from
>>         your system; you may not copy this message or disclose its
>>         contents to anyone.
>>         DISCLAIMER: Since 2006, the U.S. Government has been
>>         monitoring all internet communications. If you have
>>         information that you do not wish to have monitored, please
>>         send it using regular postal services to the address listed
>>         on our website.
>>         ------------------------------------------------------------------------
>>
>>
>>
>>         _______________________________________________
>>         Aerogear-users mailing list
>>         Aerogear-users at lists.jboss.org
>>         <mailto:Aerogear-users at lists.jboss.org>
>>         https://lists.jboss.org/mailman/listinfo/aerogear-users
>>         <https://lists.jboss.org/mailman/listinfo/aerogear-users>
>>
>>
>>
>>
>>     -- 
>>     -- Passos
>>
>>     _______________________________________________
>>     Aerogear-users mailing list
>>     Aerogear-users at lists.jboss.org
>>     <mailto:Aerogear-users at lists.jboss.org>
>>     https://lists.jboss.org/mailman/listinfo/aerogear-users
>>     <https://lists.jboss.org/mailman/listinfo/aerogear-users>
>>
>>
>>
>>
>> -- 
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> twitter: http://twitter.com/mwessendorf
>>
>>
>> _______________________________________________
>> Aerogear-users mailing list
>> Aerogear-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-users
>
>
>
> _______________________________________________
> Aerogear-users mailing list
> Aerogear-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-users/attachments/20160817/dcb5dfa6/attachment-0001.html 


More information about the Aerogear-users mailing list