Ok Vinh,

Thanks again!

I have a curiosity: are there any necessary changes to the muse.xml (or
another point required by Muse) to migrate successfully from the Capability,
AbstractResourceClient and AbstractCapability to their equivalent in WSRF
standard (WsResourceCapability, AbstractWsResourceCapability,
WsResourceClient)? Or should one just change classes and manage to arrange
the imports in java classes?

Best regards,
Nelson P Kotowski Filho.

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

> Your configuration seems to look ok to me.  Now you have to check the
> muse.log or server logs to ensure that WsResource was actually
> initialized successfully.
>
>
> -----Original Message-----
> From: Nelson Kotowski [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 10, 2008 2:45 AM
> To: [email protected]
> Subject: Re: WSRF Example + Adding Custom Capability
>
> Hi again, Vinh
>
> Thanks! I am trying to see if i am missing anything here, meanwhile, if
> it's not asking too much :) , here is my muse.xml file...
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <muse xmlns="http://ws.apache.org/muse/descriptor";
>      xmlns:wsrf-sgw="http://docs.oasis-open.org/wsrf/sgw-2";
>      xmlns:test="http://ws.apache.org/muse/test/wsrf";
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>      xsi:schemaLocation="http://ws.apache.org/muse/descriptor
> muse-descriptor.xsd">
>    <router>
>
> <java-router-class>org.apache.muse.ws.resource.impl.WsResourceRouter
> </java-router-class>
>        <logging>
>            <log-file>log/muse.log</log-file>
>            <log-level>FINE</log-level>
>        </logging>
>        <persistence>
>            <java-persistence-class>
> org.apache.muse.core.routing.RouterFilePersistence</java-persistence-cla
> ss>
>            <persistence-location>router-entries</persistence-location>
>        </persistence>
>    </router>
>    <resource-type use-router-persistence="true">
>        <context-path>WsResourceFactory</context-path>
>        <wsdl>
>            <wsdl-file>/wsdl/WsResourceFactory.wsdl</wsdl-file>
>
> <wsdl-port-type>test:WsResourceFactoryPortType</wsdl-port-type>
>        </wsdl>
>        <java-id-factory-class>
> org.apache.muse.core.routing.RandomResourceIdFactory</java-id-factory-cl
> ass>
>        <java-resource-class>org.apache.muse.core.SimpleResource
> </java-resource-class>
>        <capability>
>
> <capability-uri>http://ws.apache.org/muse/test/wsrf/MyFactory
> </capability-uri>
>
> <java-capability-class>org.apache.muse.test.wsrf.MyFactoryImpl
> </java-capability-class>
>        </capability>
>    </resource-type>
>    <resource-type use-router-persistence="true">
>        <context-path>WsResource</context-path>
>        <wsdl>
>            <wsdl-file>/wsdl/WsResource.wsdl</wsdl-file>
>            <wsdl-port-type>test:WsResourcePortType</wsdl-port-type>
>        </wsdl>
>        <java-id-factory-class>
> org.apache.muse.core.routing.RandomResourceIdFactory</java-id-factory-cl
> ass>
>        <java-resource-class>
> org.apache.muse.ws.resource.impl.SimpleWsResource</java-resource-class>
>        <capability>
>            <capability-uri>
> http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata</capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.metadata.impl.SimpleMetadataExchange
> </java-capability-class>
>        </capability>
>        <capability>
>            <capability-uri>
> http://docs.oasis-open.org/wsrf/rlw-2/ImmediateResourceTermination
> </capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.resource.lifetime.impl.SimpleImmediateTermination
> </java-capability-class>
>        </capability>
>        <capability>
>            <capability-uri>
> http://docs.oasis-open.org/wsrf/rlw-2/ScheduledResourceTermination
> </capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.resource.lifetime.impl.SimpleScheduledTermination
> </java-capability-class>
>        </capability>
>        <capability>
>            <capability-uri>http://docs.oasis-open.org/wsrf/rpw-2/Get
> </capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability
> </java-capability-class>
>        </capability>
>        <capability>
>            <capability-uri>http://docs.oasis-open.org/wsrf/rpw-2/Query
> </capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.resource.properties.query.impl.SimpleQueryCapability
> </java-capability-class>
>        </capability>
>        <capability>
>            <capability-uri>http://docs.oasis-open.org/wsrf/rpw-2/Set
> </capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.resource.properties.set.impl.SimpleSetCapability
> </java-capability-class>
>        </capability>
>        <capability>
>
> <capability-uri>http://ws.apache.org/muse/test/wsrf/MyCapability
> </capability-uri>
>            <java-capability-class>
> org.apache.muse.test.wsrf.MyCapabilityImpl</java-capability-class>
>        </capability>
>        <capability>
>            <capability-uri>http://ws.apache.org/muse/test/wsrf/execute
> </capability-uri>
>            <java-capability-class>
> org.apache.muse.test.wsrf.execute.ExecuteQueryCapabilityImpl
> </java-capability-class></capability>
>    </resource-type>
>    <resource-type>
>        <context-path>ServiceGroupEntry</context-path>
>        <wsdl>
>            <wsdl-file>/wsdl/WS-ServiceGroupEntry-1_2.wsdl</wsdl-file>
>
> <wsdl-port-type>wsrf-sgw:ServiceGroupEntryPortType</wsdl-port-type>
>        </wsdl>
>        <java-id-factory-class>
> org.apache.muse.core.routing.RandomResourceIdFactory</java-id-factory-cl
> ass>
>        <java-resource-class>
> org.apache.muse.ws.resource.impl.SimpleWsResource</java-resource-class>
>        <capability>
>            <capability-uri>
> http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata</capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.metadata.impl.SimpleMetadataExchange
> </java-capability-class>
>        </capability>
>        <capability>
>            <capability-uri>http://docs.oasis-open.org/wsrf/rpw-2/Get
> </capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability
> </java-capability-class>
>        </capability>
>        <capability>
>            <capability-uri>
> http://docs.oasis-open.org/wsrf/sgw-2/ServiceGroupEntry</capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.resource.sg.impl.SimpleEntry</java-capability-class>
>        </capability>
>        <init-param>
>            <param-name>validate-wsrp-schema</param-name>
>            <param-value>false</param-value>
>        </init-param>
>    </resource-type>
>    <resource-type use-router-persistence="true">
>        <context-path>ServiceGroup</context-path>
>        <wsdl>
>            <wsdl-file>/wsdl/WS-ServiceGroup-1_2.wsdl</wsdl-file>
>
> <wsdl-port-type>wsrf-sgw:ServiceGroupPortType</wsdl-port-type>
>        </wsdl>
>        <java-id-factory-class>
> org.apache.muse.core.routing.CounterResourceIdFactory
> </java-id-factory-class>
>        <java-resource-class>
> org.apache.muse.ws.resource.impl.SimpleWsResource</java-resource-class>
>        <capability>
>            <capability-uri>
> http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata</capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.metadata.impl.SimpleMetadataExchange
> </java-capability-class>
>        </capability>
>        <capability>
>            <capability-uri>http://docs.oasis-open.org/wsrf/rpw-2/Get
> </capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability
> </java-capability-class>
>        </capability>
>        <capability>
>            <capability-uri>http://docs.oasis-open.org/wsrf/rpw-2/Query
> </capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.resource.properties.query.impl.SimpleQueryCapability
> </java-capability-class>
>        </capability>
>        <capability>
>            <capability-uri>
> http://docs.oasis-open.org/wsrf/sgw-2/ServiceGroup</capability-uri>
>            <java-capability-class>
> org.apache.muse.ws.resource.sg.impl.SimpleServiceGroup
> </java-capability-class>
>        <!--
>            <persistence>
>                <java-persistence-class>
> org.apache.muse.ws.resource.sg.impl.ServiceGroupFilePersistence
> </java-persistence-class>
>
> <persistence-location>service-group-entries</persistence-location>
>            </persistence>
>        -->
>        </capability>
>    </resource-type>
> </muse>
>
> I couldn't catch up what's the relation between the WsResourceFactory
> and WsResource resource-type in this case. Also, my router-entries
> directory has this structure:
>
> router-entries
>  |---> ServiceGroup
>   |---> resource-instance-1.xml
>  |---> WsResource
>   |---> resource-instance-3.xml
>  |---> WsResourceFactory
>   |---> resource-instance-2.xml
>
> And this is, for example, my resource-instance-3.xml file.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <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:ResourceI
> d>
> </wsa:ReferenceParameters>
>
> I am really sorry for asking you of so many things, it's just that i've
> been stuck in this need to wsrf-enable my resource for days and can't
> find no one to help me try to figure out. Please, any help is welcome.
>
> Best regards,
> Nelson P Kotowski Filho.
> On Jan 9, 2008 8:41 PM, Vinh Nguyen (vinguye2) <[EMAIL PROTECTED]>
> wrote:
>
> > 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:Resourc
> > eI
> > 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:Resourc
> > eI
> > 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:Ad
> > > > dr
> > > > 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:Res
> > > > ou
> > > > 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:Ad
> > > > dr
> > > > 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:Res
> > > > ou
> > > > rc
> > > > eI
> > > > d>
> > > >    </wsa:ReferenceParameters>
> > > >
> > > > <wsa:Address>http://10.0.0.6:8080/wsrf/services/WsResource</wsa:Ad
> > > > dr
> > > > 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]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to