ws-pubscribe-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Asaf Lahav <asaf.la...@primagrid.com>
Subject Notifications related question
Date Tue, 30 May 2006 14:34:46 GMT
I have been going through the pubscribe sample code and ran into (the
attached) "RequestUtils.java".

 

RequestUtils.java has the following function:

 

    public static boolean invokeSubscribe(String consumerURL, String
serviceEPRURL, String topicName)

    {

        QName topic = QName.valueOf(topicName);

        SubscribeDocument requestDoc =
SubscribeDocument.Factory.newInstance();

        SubscribeDocument.Subscribe subscribe =
requestDoc.addNewSubscribe();

        subscribe.setUseNotify(true);

        Calendar instance = Calendar.getInstance();

        instance.setTimeInMillis(instance.getTimeInMillis() + 2000000);

        subscribe.setInitialTerminationTime(instance);

        org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType
consumerRef = subscribe.addNewConsumerReference();

        org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedURI address =
consumerRef.addNewAddress();

        address.setStringValue(createEpr(consumerURL).getAddress());

        TopicExpressionType topicExpr = subscribe.addNewTopicExpression();

 
topicExpr.setDialect(TopicsConstants.TOPIC_EXPR_DIALECT_SIMPLE.toString());

        XmlBeanUtils.setValueAsQName(topicExpr, topic);

        XmlObject response = sendRequest(requestDoc,
"http://xyz.com/action/Subscribe", createEpr(serviceEPRURL));

        if (!(response instanceof
SubscribeResponseDocument.SubscribeResponse))

        {

            return false;

        }

        else

        {

            return true;

        }

    }

 

My question is whether the events provider (which is sending the
notifications) supposed to send the notifications to a specific consumer
service instance?

I simply can't see anywhere in the subscribed document where a consumer
resource identifier is put in.

 

 

 

Asaf Lahav

VP R&D, Prima Grid LTD.

Cellular:  972-54-4717955

Phone:   972-3-6540255

Fax:       972-3-6540254



 


Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message