The list of "existing EPRs" shows that a WsResource wasn't even
initialized.  So it probably wasn't configured properly in
\router-entries, or wasn't created by the WsResourceFactory yet.

If you configured a WsResource in \router-entries, also make sure that
in muse.xml you have the use-router-persistence="true" attribute set in
the WsResoure definition.  Otherwise, Muse won't initialize this
resource at startup.


-----Original Message-----
From: Nelson Kotowski [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 09, 2008 1:05 PM
To: [email protected]
Subject: Re: WSRF Example + Adding Custom Capability

Hi Vinh,

Thanks again :) I managed to make it work by hardcoding the
"MuseResource-3"
in the addreferenceparameter method.

Now, i am trying to wsrf-enable this capability/resource. Originally, it
extends/uses the classes/interfaces:

Capability
AbstractCapability
AbstractResourceClient

Initially i thought that changing those to

WsResourceCapability
AbstractWsResourceCapability
WsResourceClient

and changing the java-resource-class in the resource type tag in
muse.xmlfrom

org.apache.muse.core.SimpleResource

to

org.apache.muse.ws.resource.impl.SimpleWsResource

would make the cut, but now i recieve the Destination Unreacheable
message like this:

org.apache.muse.ws.addressing.soap.SoapFault: [ID =
'DestinationUnreachable'] There is no resource available at the given
EPR:

<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing";>
 
<wsa:Address>http://10.0.0.6:8080/wsrf/services/WsResource</wsa:Address>
    <wsa:ReferenceParameters>
        <muse-wsa:ResourceId
            xmlns:muse-wsa="http://ws.apache.org/muse/addressing";
            wsa:IsReferenceParameter="true" xmlns:wsa="
http://www.w3.org/2005/08/addressing";>MuseResource-3</muse-wsa:ResourceI
d>
    </wsa:ReferenceParameters>
</wsa:EndpointReference>

The existing EPRs hosted by this endpoint are:

<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing";>
    <wsa:ReferenceParameters
xmlns:wsa="http://www.w3.org/2005/08/addressing
">
        <muse-wsa:ResourceId xmlns:muse-wsa="
http://ws.apache.org/muse/addressing";>MuseResource-1</muse-wsa:ResourceI
d>
    </wsa:ReferenceParameters>
    <wsa:Address>http://10.0.0.6:8080/wsrf/services/WsResourceFactory
</wsa:Address>
</wsa:EndpointReference>
    at org.apache.muse.core.AbstractResourceClient.invoke(
AbstractResourceClient.java:298)
    at org.apache.muse.core.AbstractResourceClient.invoke(
AbstractResourceClient.java:254)
    at org.apache.muse.test.wsrf.SimpleResourceClient.ExecuteQuery(
SimpleResourceClient.java:66)
    at org.apache.muse.test.wsrf.WsrfTestClient.main(WsrfTestClient.java
:170)


I don't know how to wsrf-enable my capability/resource, and thought that
it would work. I read in older posts that there might some problems
concerning the addParameter method when it is related to wsrf services.

Do you have any clues to help me, please? I would just like to
wsrf-enable the service.

Best regards,
Nelson P Kotowski Filho.

On Jan 9, 2008 3:32 PM, Vinh Nguyen (vinguye2) <[EMAIL PROTECTED]>
wrote:

> Hi Nelson,
> Yes.  The entire contents of the EPR (including the parameters) define

> the uniqueness of the EPR.
>
> So in the resource-instance-XXX.xml file, if you define any parameters

> in the resource EPR, then you must also do the same on the client side

> when building the EPR.  Otherwise, the client will be specifying an 
> EPR which the server doesn't recognize.
>
> An example of how to EPR parameters is shown in the SimpleTestClient 
> class in the "simple" project.
> -Vinh
>
>
> -----Original Message-----
> From: Nelson Kotowski [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 09, 2008 5:13 AM
> To: [email protected]
> Subject: Re: WSRF Example + Adding Custom Capability
>
> Hi Vinh,
>
> Thanks for the reply! By ResourceID you mean that I can specify the 
> MuseResource-1, for example, from the paramenter in the 
> resource-instance-XXX.xml files in the WsrfTestClient.java? It's my 
> first attempt, i got a bit confused.
>
> Thanks,
> Nelson P Kotowski Filho.
>
> On Jan 8, 2008 10:02 PM, Vinh Nguyen (vinguye2) <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
> > On the server, your WsResource instances (2 of them) both have a 
> > ResourceId parameter in their EPRs.  But your client is not 
> > specifying
>
> > this in the EPR, hence the server can't find such a resource.
> > -Vinh
> >
> >
> > -----Original Message-----
> > From: Nelson Kotowski [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 08, 2008 4:15 PM
> > To: [email protected]
> > Subject: WSRF Example + Adding Custom Capability
> >
> > Hello everyone,
> >
> > Happy 2008 to all!
> >
> > I'm facing some difficulties here in Muse. I am using Eclipse TPTP -

> > all working fine - with Tomcat 6.0 as app server.
> >
> > I created a project wsrf and imported the WSRF Muse sample. It works

> > quite fine as expected.
> >
> > Later, i intended to add one custom capability and expose it.
> > Initially it does not expose any wsrf operation, but i intend to it 
> > in
> the future.
> > Anyway, i recall that I should modify the muse.xml, the 
> > router-entries
>
> > and the WsResource.wsdl. I did it. I put my capability 
> > (ExecuteQuery) under the resource type WsResource, i added the 
> > use-router-persistence
>
> > parameter as true and created a resource-instance-3.xml in a 
> > directory
>
> > called /router-entries/WsResource, pointing to MuseResource-3 and 
> > also
>
> > added the schema, messages, operations and needed info on the wsdl
> file.
> >
> > Finally, i added my packages in the project and modified the 
> > WsrfTestClient.java so that i could call my capability method. But i

> > don't know why, after i compile, generate the .war file and publish 
> > it
>
> > into Tomcat, I get this message:
> >
> > org.apache.muse.ws.addressing.soap.SoapFault: [ID = 
> > 'DestinationUnreachable'] There is no resource available at the 
> > given
> > EPR:
> >
> > <wsa:EndpointReference
> > xmlns:wsa="http://www.w3.org/2005/08/addressing";>
> >
> > <wsa:Address>http://10.0.0.6:8080/wsrf/services/WsResource</wsa:Addr
> > es
> > s>
> > </wsa:EndpointReference>
> >
> > The existing EPRs hosted by this endpoint are:
> >
> > <wsa:EndpointReference
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>
> >    <wsa:ReferenceParameters
> > xmlns:wsa="http://www.w3.org/2005/08/addressing
> > ">
> >        <muse-wsa:ResourceId xmlns:muse-wsa="
> > http://ws.apache.org/muse/addressing";>MuseResource-1</muse-wsa:Resou
> > rc
> > eI
> > d>
> >    </wsa:ReferenceParameters>
> >    <wsa:Address>http://10.0.0.6:8080/wsrf/services/WsResourceFactory
> > </wsa:Address>
> > </wsa:EndpointReference>
> >
> > <wsa:EndpointReference
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>
> >    <wsa:ReferenceParameters
> > xmlns:wsa="http://www.w3.org/2005/08/addressing
> > ">
> >        <muse-wsa:ResourceId xmlns:muse-wsa="
> > http://ws.apache.org/muse/addressing
> > ">uuid:b06d48a8-9e48-01bb-a655-291bbb7de2ce</muse-wsa:ResourceId>
> >    </wsa:ReferenceParameters>
> >
> > <wsa:Address>http://10.0.0.6:8080/wsrf/services/WsResource</wsa:Addr
> > es
> > s>
> > </wsa:EndpointReference>
> >
> > <wsa:EndpointReference
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>
> >    <wsa:ReferenceParameters
> > xmlns:wsa="http://www.w3.org/2005/08/addressing
> > "/>
> >    <wsa:Address>http://10.0.0.6:8080/wsrf/services/ServiceGroup
> > </wsa:Address>
> > </wsa:EndpointReference>
> >
> > <wsa:EndpointReference
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>
> >    <wsa:ReferenceParameters
> > xmlns:wsa="http://www.w3.org/2005/08/addressing
> > ">
> >        <muse-wsa:ResourceId xmlns:muse-wsa="
> > http://ws.apache.org/muse/addressing";>MuseResource-3</muse-wsa:Resou
> > rc
> > eI
> > d>
> >    </wsa:ReferenceParameters>
> >
> > <wsa:Address>http://10.0.0.6:8080/wsrf/services/WsResource</wsa:Addr
> > es
> > s>
> > </wsa:EndpointReference>
> > Pinging Muse to initialize the endpoint...
> > Waiting 10 seconds while simulation creates WS-resources...
> >
> > Why does it say I do not have a resource avaiable at that EPR and 
> > later it says that my EPR is valid?
> >
> > I got a bit confused... any help will be great!!!
> >
> > Also, i realize the use of the MyFactory in the example, but i 
> > couldn't catch where its methods are called in WsrfTestClient.java.
> > How does this happen? The simple fact that it is listed as a 
> > capability in muse.xml makes it initialize automatically?
> >
> >
> > Thanks to everyone!
> > Nelson P Kotowski Filho.
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to