You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by mabroukONnet <ma...@yahoo.fr> on 2007/06/14 11:11:23 UTC

wsn consumer

hi all,
I have two questions:

1- i didn't find a wsdl description for the consumer resource in
wsn-consumer example (however there is the capability class). So i want to
ask:
can i create simple resource code without creating wsdl description for that
resource (only including standard wsdl and xsd files) and off course without
passing via wsdl2java (by coding manually) ?
1.1- If it's so, how MetadatExchangeClient.getWSDL() method can work?

2- I readed discussion between Dan and Bigtex (last february) about
wsn-consumer and how a simple java program can receive published
notification. If i understood, that's no way to receive notification
directly from wsn-producer (so we must create one resource consumer) ?

thanks for all.

-- 
View this message in context: http://www.nabble.com/wsn-consumer-tf3920425.html#a11116180
Sent from the Muse User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: wsn consumer - suite

Posted by Saurabh Dravid <sa...@in.ibm.com>.
Hi,

I assume you are not able to find any description for capability (
http://ws.apache.org/muse/test/wsn/consumer) in consumer wsdl file, that's 
because this capability did not have any properties and operations.
 
Sometimes there might be a requirement that your capability is supposed to 
do some initialization work and in that case you don't need any properties 
and operations in that capability. Now if that is the case then there is 
no way to define Empty Capability in wsdl file, that's the reason this 
Empty Capability is define in muse.xml.
 
If you define any Empty Capability in muse.xml and invoke wsdl2java then 
this will create a Java class for that Empty capability with having a 
method 

public void initializeCompleted() throws SoapFault

So you can provide your custom initialization code here. 
I hope this will clarify the point 1.

For point 1.1 MetadatExchangeClient.getWSDL() method internally invoke 
"GetMetadata" operation on "MetadataExchange" capability by passing the 
dialect as "http://schemas.xmlsoap.org/wsdl/". There is already an 
operation define as "GetMetadata" for "MetadataExchange" capability wsdl 
file.

thanks

With best regards,

Saurabh Dravid,
Staff Software Engineer - Autonomic Computing,
India Software Lab, IBM Software Group
Embassy Golf Links, 'B' Block, 4th Floor, Bangalore
Phone: +91-80-51055494, e-mail: sadravid@in.ibm.com
About India Software Lab 





mabroukONnet <ma...@yahoo.fr> 
14/06/2007 18:31
Please respond to
muse-user@ws.apache.org


To
muse-user@ws.apache.org
cc

Subject
Re: wsn consumer - suite







thanks for responding,

and what about the first posted message in this thread:
1- i didn't find a wsdl description for the consumer resource in
wsn-consumer example (however there is the capability class). So i want to
ask:
can i create simple resource code without creating wsdl description for 
that
resource (only including standard wsdl and xsd files) and off course 
without
passing via wsdl2java (by coding manually) ?
1.1- If it's so, how MetadatExchangeClient.getWSDL() method can work? 

(sorry if i re-edit this question, but, i see that the second message hide
the first one from readers)

waiting response...i'll drink coffe :*)


Balan Subramanian wrote:
> 
> No the wsn-consumer can be in a separate container but must also be an 
> endpoint. For that matter it may or may not use Muse.
> 
> Balan Subramanian 
> Autonomic Computing, IBM, RTP, NC
> 919.543.0197 | bsubram@us.ibm.com
> 
> 
> 
> 
> 
> 
> mabroukONnet <ma...@yahoo.fr> 
> 06/14/2007 05:21 AM
> Please respond to
> muse-user@ws.apache.org
> 
> 
> To
> muse-user@ws.apache.org
> cc
> 
> Subject
> Re: wsn consumer - suite
> 
> 
> 
> 
> 
> 
> 
> sorry i forget another question in this way ^L^
> 
> it's true that : to receive notification from wsn-producer, a 
wsn-consumer
> must be deployed in the same container of wsn-producer ?
> 
> thanks for all
> 
> mabroukONnet
> 
> 
> mabroukONnet wrote:
>> 
>> hi all,
>> I have two questions:
>> 
>> 1- i didn't find a wsdl description for the consumer resource in
>> wsn-consumer example (however there is the capability class). So i want 

> to
>> ask:
>> can i create simple resource code without creating wsdl description for
>> that resource (only including standard wsdl and xsd files) and off 
> course
>> without passing via wsdl2java (by coding manually) ?
>> 1.1- If it's so, how MetadatExchangeClient.getWSDL() method can work?
>> 
>> 2- I readed discussion between Dan and Bigtex (last february) about
>> wsn-consumer and how a simple java program can receive published
>> notification. If i understood, that's no way to receive notification
>> directly from wsn-producer (so we must create one resource consumer) ?
>> 
>> thanks for all.
>> 
>> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/wsn-consumer-tf3920425.html#a11116208
> Sent from the Muse User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/wsn-consumer-tf3920425.html#a11119777
Sent from the Muse User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org



Re: wsn consumer - suite

Posted by mabroukONnet <ma...@yahoo.fr>.
thanks for responding,

and what about the first posted message in this thread:
1- i didn't find a wsdl description for the consumer resource in
wsn-consumer example (however there is the capability class). So i want to
ask:
can i create simple resource code without creating wsdl description for that
resource (only including standard wsdl and xsd files) and off course without
passing via wsdl2java (by coding manually) ?
1.1- If it's so, how MetadatExchangeClient.getWSDL() method can work? 

(sorry if i re-edit this question, but, i see that the second message hide
the first one from readers)

waiting response...i'll drink coffe :*)


Balan Subramanian wrote:
> 
> No the wsn-consumer can be in a separate container but must also be an 
> endpoint. For that matter it may or may not use Muse.
> 
> Balan Subramanian 
> Autonomic Computing, IBM, RTP, NC
> 919.543.0197 | bsubram@us.ibm.com
> 
> 
> 
> 
> 
> 
> mabroukONnet <ma...@yahoo.fr> 
> 06/14/2007 05:21 AM
> Please respond to
> muse-user@ws.apache.org
> 
> 
> To
> muse-user@ws.apache.org
> cc
> 
> Subject
> Re: wsn consumer - suite
> 
> 
> 
> 
> 
> 
> 
> sorry i forget another question in this way ^L^
> 
> it's true that : to receive notification from wsn-producer, a wsn-consumer
> must be deployed in the same container of wsn-producer ?
> 
> thanks for all
> 
> mabroukONnet
> 
> 
> mabroukONnet wrote:
>> 
>> hi all,
>> I have two questions:
>> 
>> 1- i didn't find a wsdl description for the consumer resource in
>> wsn-consumer example (however there is the capability class). So i want 
> to
>> ask:
>> can i create simple resource code without creating wsdl description for
>> that resource (only including standard wsdl and xsd files) and off 
> course
>> without passing via wsdl2java (by coding manually) ?
>> 1.1- If it's so, how MetadatExchangeClient.getWSDL() method can work?
>> 
>> 2- I readed discussion between Dan and Bigtex (last february) about
>> wsn-consumer and how a simple java program can receive published
>> notification. If i understood, that's no way to receive notification
>> directly from wsn-producer (so we must create one resource consumer) ?
>> 
>> thanks for all.
>> 
>> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/wsn-consumer-tf3920425.html#a11116208
> Sent from the Muse User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/wsn-consumer-tf3920425.html#a11119777
Sent from the Muse User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: wsn consumer - suite

Posted by Balan Subramanian <bs...@us.ibm.com>.
No the wsn-consumer can be in a separate container but must also be an 
endpoint. For that matter it may or may not use Muse.

Balan Subramanian 
Autonomic Computing, IBM, RTP, NC
919.543.0197 | bsubram@us.ibm.com






mabroukONnet <ma...@yahoo.fr> 
06/14/2007 05:21 AM
Please respond to
muse-user@ws.apache.org


To
muse-user@ws.apache.org
cc

Subject
Re: wsn consumer - suite







sorry i forget another question in this way ^L^

it's true that : to receive notification from wsn-producer, a wsn-consumer
must be deployed in the same container of wsn-producer ?

thanks for all

mabroukONnet


mabroukONnet wrote:
> 
> hi all,
> I have two questions:
> 
> 1- i didn't find a wsdl description for the consumer resource in
> wsn-consumer example (however there is the capability class). So i want 
to
> ask:
> can i create simple resource code without creating wsdl description for
> that resource (only including standard wsdl and xsd files) and off 
course
> without passing via wsdl2java (by coding manually) ?
> 1.1- If it's so, how MetadatExchangeClient.getWSDL() method can work?
> 
> 2- I readed discussion between Dan and Bigtex (last february) about
> wsn-consumer and how a simple java program can receive published
> notification. If i understood, that's no way to receive notification
> directly from wsn-producer (so we must create one resource consumer) ?
> 
> thanks for all.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/wsn-consumer-tf3920425.html#a11116208
Sent from the Muse User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org



Re: wsn consumer - suite

Posted by mabroukONnet <ma...@yahoo.fr>.
sorry i forget another question in this way ^L^

it's true that : to receive notification from wsn-producer, a wsn-consumer
must be deployed in the same container of wsn-producer ?

thanks for all

mabroukONnet


mabroukONnet wrote:
> 
> hi all,
> I have two questions:
> 
> 1- i didn't find a wsdl description for the consumer resource in
> wsn-consumer example (however there is the capability class). So i want to
> ask:
> can i create simple resource code without creating wsdl description for
> that resource (only including standard wsdl and xsd files) and off course
> without passing via wsdl2java (by coding manually) ?
> 1.1- If it's so, how MetadatExchangeClient.getWSDL() method can work?
> 
> 2- I readed discussion between Dan and Bigtex (last february) about
> wsn-consumer and how a simple java program can receive published
> notification. If i understood, that's no way to receive notification
> directly from wsn-producer (so we must create one resource consumer) ?
> 
> thanks for all.
> 
> 

-- 
View this message in context: http://www.nabble.com/wsn-consumer-tf3920425.html#a11116208
Sent from the Muse User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: wsn consumer

Posted by Bogdan Solomon <bs...@ncct.uottawa.ca>.

mabroukONnet wrote:
> 
> 1.1- If it's so, how MetadatExchangeClient.getWSDL() method can work?
> 

Ok, I looked into it by building wsn-consumer and droping it into tomcat.
Then made a small Java app that creates a MetadataExchangeClient on the epr
and tries to retrieve the WSDL. As expected this throws an error 

[ID = 'ActionNotSupported'] The resource at 'consumer' does not expose an
operation with the WS-Action
'http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata'

This is because the port does not define the method, so you can add the
following lines to the wsn-consumer.wsdl file (in the appropriate parts) and
you will be able to get the Metadata

xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" - in the schema
definition

<xsd:import
         namespace="http://schemas.xmlsoap.org/ws/2004/09/mex" 
         schemaLocation="WS-MetadataExchange-2004_09.xsd"/>

Above in the Types Definitions 

<wsdl:message name="GetMetadataMsg">
  			<wsdl:part name="GetMetadataMsg" element="wsx:GetMetadata" />
	</wsdl:message>
	<wsdl:message name="GetMetadataResponseMsg">
  		<wsdl:part name="GetMetadataResponseMsg" element="wsx:Metadata" />
	</wsdl:message>

Above in the message section 

<wsdl:operation name="GetMetadata">
	<wsdl:input
wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata" 
	          name="GetMetadataMsg" message="wsntw:GetMetadataMsg"/>
	<wsdl:output
wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadataResponse" 
	          name="GetMetadataResponseMsg"
message="wsntw:GetMetadataResponseMsg"/>
     </wsdl:operation>


The operation should go in the <wsdl:portType name="NotificationConsumer">
tag.
-- 
View this message in context: http://www.nabble.com/wsn-consumer-tf3920425.html#a11121527
Sent from the Muse User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: wsn consumer

Posted by Bogdan Solomon <bs...@ncct.uottawa.ca>.


mabroukONnet wrote:
> 
> hi all,
> I have two questions:
> 
> 1- i didn't find a wsdl description for the consumer resource in
> wsn-consumer example (however there is the capability class). So i want to
> ask:
> can i create simple resource code without creating wsdl description for
> that resource (only including standard wsdl and xsd files) and off course
> without passing via wsdl2java (by coding manually) ?
> 1.1- If it's so, how MetadatExchangeClient.getWSDL() method can work?
> 
> 

Yes, you can. What wsdl2java does (or at least part of what it does) is that
it modifies your wsdl and copies parts of the other wsdls to your main wsdl
that it deploys. For a simple consumer that only receives some notifications
the WS-BaseNotification-1_3.wsdl is the wsdl that is being used as the
"main" wsdl for the application. If you look at muse.xml in the wsn-consumer
example you will see that it maps the resource to this wsdl



> 	<resource-type use-router-persistence="true">
> 		<context-path>consumer</context-path>
> 		<wsdl>
> 			<wsdl-file>wsdl/WS-BaseNotification-1_3.wsdl</wsdl-file>
> 			<wsdl-port-type>wsntw:NotificationConsumer</wsdl-port-type>
> 		</wsdl>
> 

For question 1.1 I am not 100% sure, and I'll need to look into it. Muse.xml
defines a capability for MetadataExchange for the client, but I was sure
that anything in Muse.xml must also be expressed in the wsdl file. So just
looking at it, I'd say the wsn-consumer should not be able to send Metadata


-- 
View this message in context: http://www.nabble.com/wsn-consumer-tf3920425.html#a11120006
Sent from the Muse User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org