about SimpleWsResource and SimpleResource

View: New views
5 Messages — Rating Filter:   Alert me  

about SimpleWsResource and SimpleResource

by SARA1232007 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I modify the simple example to add a new property.
For SimpleResource definition in muse.xml, I alter the java-resource-class definition as following:

        <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>

I run the client which extends WsResourceClient class to invoke firstOperation, and I get "There is no resource available at the given EPR" exception from client.The trace information from client as following:

[CLIENT TRACE] SOAP envelope contents (outgoing):

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://127.0.0.1:8086/simple/services/SimpleResource</wsa:To>
        <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://ws.apache.org/muse/test/simple/first/FirstOperation</wsa:Action>
        <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:2ba3f950-9ab8-8759-1749-57cbe781cd1b</wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
            <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
        </wsa:From>
        <muse-wsa:ResourceId
            xmlns:muse-wsa="http://ws.apache.org/muse/addressing"
            xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true">MuseResource-1</muse-wsa:ResourceId>
    </soap:Header>
    <soap:Body>
        <FirstOperation xmlns="http://ws.apache.org/muse/test/simple/first">Hello, World!</FirstOperation>
    </soap:Body>
</soap:Envelope>

[CLIENT TRACE] SOAP envelope contents (incoming):

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/role/anonymous</wsa:To>
        <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/fault</wsa:Action>
        <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:160b9c61-df5e-be27-e3b0-c5f8ba9a2f88</wsa:MessageID>
        <wsa:RelatesTo RelationshipType="wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:2ba3f950-9ab8-8759-1749-57cbe781cd1b</wsa:RelatesTo>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
            <wsa:Address>http://127.0.0.1:8086/simple/services/SimpleResource</wsa:Address>
            <wsa:ReferenceParameters>
                <muse-wsa:ResourceId wsa:IsReferenceParameter="true"
                    xmlns:muse-wsa="http://ws.apache.org/muse/addressing" xmlns:wsa="http://www.w3.org/2005/08/addressing">MuseResource-1</muse-wsa:ResourceId>
            </wsa:ReferenceParameters>
        </wsa:From>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <soap:Code>
                <soap:Value>soap:Sender</soap:Value>
                <soap:Subcode xmlns:wsa="http://www.w3.org/2005/08/addressing">
                    <soap:Value>wsa:DestinationUnreachable</soap:Value>
                </soap:Subcode>
            </soap:Code>
            <soap:Reason>
                <soap:Text>[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://127.0.0.1:8086/simple/services/SimpleResource</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-1</muse-wsa:ResourceId>
    </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"/>
    <wsa:Address>http://127.0.0.1:8086/simple/services/SimpleResource</wsa:Address>
</wsa:EndpointReference>
</soap:Text>
            </soap:Reason>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

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://127.0.0.1:8086/simple/services/SimpleResource</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-1</muse-wsa:ResourceId>
    </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"/>
    <wsa:Address>http://127.0.0.1:8086/simple/services/SimpleResource</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.simple.SimpleResourceClient.firstOperation(SimpleResourceClient.java:67)
        at org.apache.muse.test.simple.SimpleTestClient.main(SimpleTestClient.java:105)


Can anyone tell me what is wrong?

Thanks!

Sara

Re: about SimpleWsResource and SimpleResource

by Chris Twiner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Apr 22, 2009 at 5:04 AM, SARA1232007 <cyl_axis@...> wrote:

>
> Hi,
>
> I modify the simple example to add a new property.
> For SimpleResource definition in muse.xml, I alter the java-resource-class
> definition as following:
>
>
> <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>
>
> I run the client which extends WsResourceClient class to invoke
> firstOperation, and I get "There is no resource available at the given EPR"
> exception from client.The trace information from client as following:
>
> [CLIENT TRACE] SOAP envelope contents (outgoing):
>
> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
>    <soap:Header>
>        <wsa:To
> xmlns:wsa="http://www.w3.org/2005/08/addressing">http://127.0.0.1:8086/simple/services/SimpleResource</wsa:To>
>        <wsa:Action
> xmlns:wsa="http://www.w3.org/2005/08/addressing">http://ws.apache.org/muse/test/simple/first/FirstOperation</wsa:Action>
>        <wsa:MessageID
> xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:2ba3f950-9ab8-8759-1749-57cbe781cd1b</wsa:MessageID>
>        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
>
> <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
>        </wsa:From>
>        <muse-wsa:ResourceId
>            xmlns:muse-wsa="http://ws.apache.org/muse/addressing"
>            xmlns:wsa="http://www.w3.org/2005/08/addressing"
> wsa:IsReferenceParameter="true">MuseResource-1</muse-wsa:ResourceId>

Do you have a resource with this resourceid? According to the result
from Muse you don't.  Depending on the routingpersistence settings you
should have a file somewhere under SimpleResource that has this
reference parameter.

In future posts to the mailing list can you please copy and paste the
actual text of available EPRS (not just the escaped xml), its
particularly difficult to read.

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...


Re: about SimpleWsResource and SimpleResource

by SARA1232007 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



In future posts to the mailing list can you please copy and paste the
actual text of available EPRS (not just the escaped xml), its
particularly difficult to read.


Hi Chris,

Thank you for your quick response. But I don't understand what you mean by "actual text of available EPRS , not just the escaped xml".  Those information I post is gotten from Muse.

Re: about SimpleWsResource and SimpleResource

by Chris Twiner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Apr 23, 2009 at 3:23 AM, SARA1232007 <cyl_axis@...> wrote:

>
>
>
> In future posts to the mailing list can you please copy and paste the
> actual text of available EPRS (not just the escaped xml), its
> particularly difficult to read.
>
>
> Hi Chris,
>
> Thank you for your quick response. But I don't understand what you mean by
> "actual text of available EPRS , not just the escaped xml".  Those
> information I post is gotten from Muse.
> --

Hi, sorry I should have been much clearer, In the email you copied and
pasted the xml content so we got < instead of <, this makes it
difficult to look at for each member of the list.  Instead if you
could show the eprs themselves (so we see < not <) that makes it
easier for everyone on the list.

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...


Re: about SimpleWsResource and SimpleResource

by SARA1232007 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Chris Twiner wrote:
Hi, sorry I should have been much clearer, In the email you copied and
pasted the xml content so we got < instead of <, this makes it
difficult to look at for each member of the list.  Instead if you
could show the eprs themselves (so we see < not <) that makes it
easier for everyone on the list.
itional commands, e-mail: muse-dev-help@ws.apache.org
Hi Chris,

Sorry I still don't know what you mean. English is not my native language. Could you give an example of the msg with the required format?

Thank you very much for your patience!

Cheers,
Sara