You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pubscribe-user@ws.apache.org by hpcaenne <lo...@hlrs.de> on 2005/08/10 20:11:02 UTC

LastMessage

Hi,

 

I'm trying to establish a new web service on the basis of the pubscribe
developer guide.

 

As the page about "notification consumer" instructs, I copied the text for
the method notify in the file/class ...Service.java. Then I went on with the
page "deploy the service ...". Running "ant compile deploy" results in the
following errors:

Service.java:59: cannot resolve symbol: variable ConsumerPropertyQNames

Service.java:64: cannot resolve symbol: class LastMessageDocument

Service.java:64: package LastMessageDocument does not exist

Service.java:65: package org.apache.ws.resource.example.notifConsumer does
not exist

 

Where is this LastMessageDocument? Or what else is missing? (I included lots
of environment variables).

 

I'd be thankful for a hint! Anne


Re: AW: LastMessage

Posted by Sal Campana <sc...@apache.org>.
hpcaenne wrote:

>Dear Sal,
>
>to ease things, I list everything I did more detailed.
>
>I wanted to establish a new service, so I followed the instructions of
>"http://ws.apache.org/pubscribe/dev_guide/".
>
>1) "http://ws.apache.org/pubscribe/dev_guide/wsdl.html"
>The service shall be a notification consumer as well as producer.
>Using _TEMPLATE_.wsdl, I wrote Myservice.wsdl.
>2) "http://ws.apache.org/pubscribe/dev_guide/wsdl_tool.html"
>Running "ant generate" in my WORK_DIR worked and generated files (but only
>when I had my environment variables including jar files in an axis
>installation; this way I had no wsdl2java error).
>3) "http://ws.apache.org/pubscribe/dev_guide/home.html"
>I chose the singleton kind here.
>4) "http://ws.apache.org/pubscribe/dev_guide/producer.html"
>According to "Topics for All Resource Properties", I included the content of
>the try without changes.
>5) "http://ws.apache.org/pubscribe/dev_guide/consumer.html"
>Following "Modify the Service class", I included the whole notify method in
>the generated ...Service.java.
>6) "http://ws.apache.org/pubscribe/dev_guide/deploy.html"
>I changed to the directory "...generated/Myseervice" and run "ant compile
>deploy. This led to the aforementioned errors: 
>- Service.java:59: cannot resolve symbol: variable ConsumerPropertyQNames
>- Service.java:64: cannot resolve symbol: class LastMessageDocument
>- Service.java:64: package LastMessageDocument does not exist
>- Service.java:65: package org.apache.ws.resource.example.notifConsumer does
>not exist.
>
>So I made a mistake in step 5)? (I didn't understand that LastMessage...
>anyway.)
>In the text of the notify method, I should have added an other resource
>property (instead of LastMessage...) I guess?
>
>How can I know which resource properties I could add? Can I see the topics
>also?
>
>Kind regards, Anne
>(So sorry for asking stupid questions, it's just all new to me.)
>
>
>
>-----Ursprüngliche Nachricht-----
>Von: Sal Campana [mailto:scamp@apache.org] 
>Gesendet: Donnerstag, 11. August 2005 16:22
>An: pubscribe-user@ws.apache.org
>Betreff: Re: LastMessage
>
>hpcaenne wrote:
>
>  
>
>>Hi,
>>
>>
>>
>>I'm trying to establish a new web service on the basis of the pubscribe
>>developer guide.
>>
>>
>>
>>As the page about "notification consumer" instructs, I copied the text for
>>the method notify in the file/class ...Service.java. Then I went on with
>>    
>>
>the
>  
>
>>page "deploy the service ...". Running "ant compile deploy" results in the
>>following errors:
>>
>>Service.java:59: cannot resolve symbol: variable ConsumerPropertyQNames
>>
>>Service.java:64: cannot resolve symbol: class LastMessageDocument
>>
>>Service.java:64: package LastMessageDocument does not exist
>>
>>Service.java:65: package org.apache.ws.resource.example.notifConsumer does
>>not exist
>>
>>
>>
>>Where is this LastMessageDocument? Or what else is missing? (I included
>>    
>>
>lots
>  
>
>>of environment variables).
>>
>>
>>
>>I'd be thankful for a hint! Anne
>>
>>
>> 
>>
>>    
>>
>You are doing a new service....Did you follow the guide to write your 
>wsdl and run ant generate?  If so then you have files which are 
>generated.  The consumer example is an example, so it has its own 
>resource properties...one of which is LastMessage....It sounds to me 
>like you've side stepped allot of how the project works...
>
>If you want to base your service on the consumer, then copy/modify the 
>consumer wsdl file and generate from that, then all should be well...
>
>-S
>
>
>
>  
>
Sorry somehow I missed this message in my box....

You're mistake was in step 5.  That was just an example and the 
artifacts which were produced were based on its wsdl...LastMessage was 
in its wsdl/schema thus it was generated.  We alsways generate a 
...Qnames class so you should look at your files and see what that is....

 >>How can I know which resource properties I could add? Can I see the 
topics

also?

Not sure what you mean here.  In your notify(..) you do whatever you need to do.  What does it mean to your consumer when it recieves a notification??  Do you invoke another method?  Do you set some resource property? 

You define all your resource properties in the schema of your wsdl our WSRF docs describe that and we make mention to read those first.  You define which Topics are exposed or you let our engine defined Topics for all your ResourcePropeties.  The Resource which is the NotificationProducer contains a spec-defined resource preoperty (WSN) Topic which is what a consumer could look at to see what Topics are available for subscriptions...

Hope that helps...sorry so late on this...

-Sal


AW: LastMessage

Posted by hpcaenne <lo...@hlrs.de>.
Dear Sal,

to ease things, I list everything I did more detailed.

I wanted to establish a new service, so I followed the instructions of
"http://ws.apache.org/pubscribe/dev_guide/".

1) "http://ws.apache.org/pubscribe/dev_guide/wsdl.html"
The service shall be a notification consumer as well as producer.
Using _TEMPLATE_.wsdl, I wrote Myservice.wsdl.
2) "http://ws.apache.org/pubscribe/dev_guide/wsdl_tool.html"
Running "ant generate" in my WORK_DIR worked and generated files (but only
when I had my environment variables including jar files in an axis
installation; this way I had no wsdl2java error).
3) "http://ws.apache.org/pubscribe/dev_guide/home.html"
I chose the singleton kind here.
4) "http://ws.apache.org/pubscribe/dev_guide/producer.html"
According to "Topics for All Resource Properties", I included the content of
the try without changes.
5) "http://ws.apache.org/pubscribe/dev_guide/consumer.html"
Following "Modify the Service class", I included the whole notify method in
the generated ...Service.java.
6) "http://ws.apache.org/pubscribe/dev_guide/deploy.html"
I changed to the directory "...generated/Myseervice" and run "ant compile
deploy. This led to the aforementioned errors: 
- Service.java:59: cannot resolve symbol: variable ConsumerPropertyQNames
- Service.java:64: cannot resolve symbol: class LastMessageDocument
- Service.java:64: package LastMessageDocument does not exist
- Service.java:65: package org.apache.ws.resource.example.notifConsumer does
not exist.

So I made a mistake in step 5)? (I didn't understand that LastMessage...
anyway.)
In the text of the notify method, I should have added an other resource
property (instead of LastMessage...) I guess?

How can I know which resource properties I could add? Can I see the topics
also?

Kind regards, Anne
(So sorry for asking stupid questions, it's just all new to me.)



-----Ursprüngliche Nachricht-----
Von: Sal Campana [mailto:scamp@apache.org] 
Gesendet: Donnerstag, 11. August 2005 16:22
An: pubscribe-user@ws.apache.org
Betreff: Re: LastMessage

hpcaenne wrote:

>Hi,
>
> 
>
>I'm trying to establish a new web service on the basis of the pubscribe
>developer guide.
>
> 
>
>As the page about "notification consumer" instructs, I copied the text for
>the method notify in the file/class ...Service.java. Then I went on with
the
>page "deploy the service ...". Running "ant compile deploy" results in the
>following errors:
>
>Service.java:59: cannot resolve symbol: variable ConsumerPropertyQNames
>
>Service.java:64: cannot resolve symbol: class LastMessageDocument
>
>Service.java:64: package LastMessageDocument does not exist
>
>Service.java:65: package org.apache.ws.resource.example.notifConsumer does
>not exist
>
> 
>
>Where is this LastMessageDocument? Or what else is missing? (I included
lots
>of environment variables).
>
> 
>
>I'd be thankful for a hint! Anne
>
>
>  
>
You are doing a new service....Did you follow the guide to write your 
wsdl and run ant generate?  If so then you have files which are 
generated.  The consumer example is an example, so it has its own 
resource properties...one of which is LastMessage....It sounds to me 
like you've side stepped allot of how the project works...

If you want to base your service on the consumer, then copy/modify the 
consumer wsdl file and generate from that, then all should be well...

-S



Re: LastMessage

Posted by Sal Campana <sc...@apache.org>.
hpcaenne wrote:

>Hi,
>
> 
>
>I'm trying to establish a new web service on the basis of the pubscribe
>developer guide.
>
> 
>
>As the page about "notification consumer" instructs, I copied the text for
>the method notify in the file/class ...Service.java. Then I went on with the
>page "deploy the service ...". Running "ant compile deploy" results in the
>following errors:
>
>Service.java:59: cannot resolve symbol: variable ConsumerPropertyQNames
>
>Service.java:64: cannot resolve symbol: class LastMessageDocument
>
>Service.java:64: package LastMessageDocument does not exist
>
>Service.java:65: package org.apache.ws.resource.example.notifConsumer does
>not exist
>
> 
>
>Where is this LastMessageDocument? Or what else is missing? (I included lots
>of environment variables).
>
> 
>
>I'd be thankful for a hint! Anne
>
>
>  
>
You are doing a new service....Did you follow the guide to write your 
wsdl and run ant generate?  If so then you have files which are 
generated.  The consumer example is an example, so it has its own 
resource properties...one of which is LastMessage....It sounds to me 
like you've side stepped allot of how the project works...

If you want to base your service on the consumer, then copy/modify the 
consumer wsdl file and generate from that, then all should be well...

-S

Re: LastMessage

Posted by Sal Campana <sc...@apache.org>.
hpcaenne wrote:

>Hi,
>
> 
>
>I'm trying to establish a new web service on the basis of the pubscribe
>developer guide.
>
> 
>
>As the page about "notification consumer" instructs, I copied the text for
>the method notify in the file/class ...Service.java. Then I went on with the
>page "deploy the service ...". Running "ant compile deploy" results in the
>following errors:
>
>Service.java:59: cannot resolve symbol: variable ConsumerPropertyQNames
>
>Service.java:64: cannot resolve symbol: class LastMessageDocument
>
>Service.java:64: package LastMessageDocument does not exist
>
>Service.java:65: package org.apache.ws.resource.example.notifConsumer does
>not exist
>
> 
>
>Where is this LastMessageDocument? Or what else is missing? (I included lots
>of environment variables).
>
> 
>
>I'd be thankful for a hint! Anne
>
>
>  
>
You need to run ant generate as the first step.  It will generate a 
series of java files and also produce a XmlBeans jar containing the 
LastMessageDocument....Had you run "ant generate"?  If so, then under 
the generated/consumer directory there should be a .xmlbeans directory.  
In the .xmlbeans directory there should be a lib dir containing that 
jar....Typically the build.xml picks the jar up for compiling...You also 
mention the ...PropertyQNames class is not present, that is part of the 
package of classes we generate under the generated folder....What were 
you reading?  Was it the readme.txt in the examples/consumer directory?  
If not, follow those steps...If you feel there is incorrect information 
in a doc, please let us know and we'll fix it...

-Sal