Hi Prasad,

Can you please send me the PDU that you are sending so I can compare it with 
the one that is not working for me ?

BTW this is the Java code I use to to connect to the PPG:

-----------------------------------------------------------------

public void sendWAPPush(String ppgUrl, String ppgUser, String ppgPasswd,
            String to, String href, String payload) throws PPGException{

        try {
            LOGGER.debug("Connecting to PPG at: " + ppgUrl);

            URL url = new URL(ppgUrl);
            URLConnection urlConn = url.openConnection();
            //Set Authorization params if needed
            if (ppgUser != null && ppgPasswd != null &&
                    !ppgUser.equals("") && !ppgPasswd.equals("")) {
                LOGGER.debug("Setting HTTP Authentication");
                String userPasswd = ppgUser + ":" + ppgPasswd;
                String upEnc = new BASE64Encoder().
                    encode(userPasswd.getBytes());
                urlConn.setRequestProperty ("Authorization", "Basic " + 
upEnc);
            }

            urlConn.setDoInput(true);
            urlConn.setDoOutput(true);
            urlConn.setUseCaches(false);
            urlConn.setRequestProperty("Content-Type",
                    "multipart/related; boundary=" + BOUNDARY +
                    "; type=application/xml");
            DataOutputStream output =
                    new DataOutputStream(urlConn.getOutputStream());
            String content = getContent(to, href, payload);
            LOGGER.debug("Sending to PPG: " + content);
            output.writeBytes(content);
            output.flush();
            output.close();
            BufferedReader input =
                new BufferedReader(
                    new InputStreamReader(urlConn.getInputStream()));
            LOGGER.info("Received from PPG: ");
            boolean responseOK = false;
            String response = null;
            while ((response = input.readLine()) != null) {
                LOGGER.info(response);
                if (response.indexOf("1001") != -1) {
                    responseOK = true;
                }
            }
            if (!responseOK) {
                throw new Exception("PPG did not accept the message");
            }
        } catch (Exception e) {
            LOGGER.error("Catched Exception", e);
            throw new PPGException("Error accessing PPG", e);
        }
    }


-----------------------------------------------------------------

Hope it helps. 

Regards,
Alberto

On Tuesday 29 August 2006 04:54, Kavuri Prasad wrote:
> Hi Alberto,
>
> I am using Motorola Phone. I have no problem in receiving WAP Push using
> test_ppg. Now Iam trying with Java codes and I do not know How to send it
> from Java. Can you please help me by posting your java codes.
>
> Thanks,
> Prasad
>
> On 8/26/06, Alberto Devesa <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I have not any problem sending wap pushes to several models of Nokia and
> > Sony
> > phones but it seems that the Motorolas ignore the messages. I have tried
> > with
> > V3 and C385 models. Do this phones need something different to get the wp
> > delivered ?
> >
> > I have tested it from Java code as well with the familiar test_ppg using
> > the
> > following pap and si files:
> >
> > <?xml version="1.0"?>
> > <!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 1.0//EN"
> > "http://www.wapforum.org/DTD/pap_1.0.dtd";>
> > <pap>
> > <push-message push-id="xxxxxxxxxxxx"
> >   source-reference="EagleEye">
> > <address address-value="WAPPUSH=+34xxxxxxxxx/TYPE=PLMN"/>
> > <quality-of-service
> >    delivery-method="unconfirmed"
> >    network="GSM" bearer="SMS"/>
> > </push-message>
> > </pap>
> >
> >
> > <?xml version="1.0"?>
> > <!DOCTYPE si PUBLIC "-//WAPFORUM//DTD SI 1.0//EN"
> > "http://www.wapforum.org/DTD/si.dtd";>
> > <si>
> > <indication href="http:/riga.com"
> > created="2004-12-04T10:29:40Z"
> > action="signal-high">Alert</indication>
> > </si>
> >
> >
> > Regards,
> > Alberto

Reply via email to