Forum Discussion

freakant's avatar
14 years ago

WS-RM 1.0 Implementation

Hi, I've been trying to test a WS-RM 1.0 Web Service deployed on a JBoss-6 (with JBossWS-CXF-3.4.1), but so far unsuccessfully.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</wsa:Action>
<wsa:ReplyTo>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID>uuid:9ec5a36a-7095-41f3-9f60-549fb0e5b3d4</wsa:MessageID>
<wsa:To>http://localhost:8080/wscxfrm/RecordEchoService/RecordEcho</wsa:To>
</soapenv:Header>
<soapenv:Body xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm">
<wsrm:CreateSequence>
<wsrm:AcksTo xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsrm:AcksTo>
<wsrm:Offer>
<wsrm:Identifier>urn:soapui:4cc62259-6274-42d7-b892-5f794aa046f5</wsrm:Identifier>
</wsrm:Offer>
</wsrm:CreateSequence>
</soapenv:Body>
</soapenv:Envelope>


This request obtains a 200 OK response from the server, but it's already defective. I chose WS-A Version 200408, and the namespace clearly states Version 200508. I haven't been able to create a proper 200408 WS-A message.

In any case, after the initial message is sent, soapUI proceeds to send the main message (the one specified in the request). (It's a simple EchoService)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:exam="http://example.org/ws/example" xmlns:t24="http://example.org/t24">
<soapenv:Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm">
<wsrm:Sequence>
<wsrm:Identifier/>
<wsrm:MessageNumber>1</wsrm:MessageNumber>
</wsrm:Sequence>
<wsa:Action>http://sesar.eu/wp14/t24/ws/example/RecordEcho/getEchoRecordRequest</wsa:Action>
<wsa:ReplyTo>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID>uuid:5247d2e6-4cdc-46dd-9ee2-e0f42ff44465</wsa:MessageID>
<wsa:To>http://localhost:8080/wscxfrm/RecordEchoService/RecordEcho</wsa:To>
</soapenv:Header>
<soapenv:Body>
<exam:getEchoRecord>
<arg0>
..<t24:Str>5LZD2</t24:Str>
..<t24:Str>Dc5xR</t24:Str>
..<t24:Str>TOjg2</t24:Str>
..<t24:Blob>Q01SZXJPcDhUd28wTzUwc25KUkJHSzM0dDBRSVh3VUFKc3lQWHVxMDE4UmhRSDVaV2RibU1IbXFLU0dPMTZiS3VHVW1XYTF1NDczd2FVSFR5R0JOYWZJb1ZtTkdmTlBCQmpFbU5la3lkQVlteEQ4MkFyd1hWS1J3U3R5MDZQMUxRblNQNlRwTjRkelFGanE3b0JWOHJFYk9NeHFUV0dKVDk3RGprV1FhRFBnYUFabEUwMFN5ZDJQVWREOHdxdjNnYVhSN0ptcGxTNUVwREFaYjk5NUllN3NqaDNJYnBDMWU4RnFqQ0JraVR6eU5KRnU5TktFMTc0T2JGN3pXcGNXRHpVTkV5YWVYalN5QmRGb0hRT3Uxb3dNU2pSQ0dKZlVkM01XUm5CQjVsVHg4U2RZTGY1c1Bsd2tPeTA0ZWM4bVh0ZUNJMnNaOUlXY3dHRVVMd0FLTzVoNkJXRENmNmxrR2RYRndvQ3pGOERjY1hObTBKTElXdzVm</t24:Blob>
..<t24:Intg>-3880520212366337482</t24:Intg>
..<t24:Intg>-3884058290902619379</t24:Intg>
..<t24:Intg>5877912572567203774</t24:Intg>
</arg0>
</exam:getEchoRecord>
</soapenv:Body>
</soapenv:Envelope>


The JBoss log to this request is as follows:

14:31:54,511 ERROR [org.apache.cxf.ws.rm.AbstractRMInterceptor] Interceptor encountered a SequenceFault: Reason: The value of wsrm:Identifier is not a known Sequence identifier., code: {http://schemas.xmlsoap.org/soap/envelope/}Client, subCode: {http://schemas.xmlsoap.org/ws/2005/02/rm}UnknownSequence.
14:31:54,512 WARN [org.apache.cxf.phase.PhaseInterceptorChain] Interceptor for {http://example.org/ws/example}RecordEchoService#{http://example.org/ws/example}getEchoRecord has thrown exception, unwinding now: org.apache.cxf.binding.soap.SoapFault: The value of wsrm:Identifier is not a known Sequence identifier.
...
14:31:54,529 INFO [org.apache.cxf.ws.rm.soap.RMSoapInterceptor] Updating service model info in exchange
14:31:54,534 ERROR [org.apache.cxf.ws.rm.Servant] No such sequence.
14:31:54,997 WARN [org.apache.cxf.phase.PhaseInterceptorChain] Interceptor for {http://schemas.xmlsoap.org/ws/2005/02/rm/wsdl}SequenceAbstractService#{http://schemas.xmlsoap.org/ws/2005/02/rm}CreateSequence has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) [:2.3.1]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) [:2.3.1]
at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:99) [:2.3.1]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:311) [:2.3.1]
at org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:224) [:2.3.1]
at org.apache.cxf.ws.addressing.ContextUtils$1.run(ContextUtils.java:446) [:2.3.1]
at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:253) [:2.3.1]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
Caused by: java.io.IOException: Server returned HTTP response code: 405 for URL: http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous


Needless to say, using the JBoss example client, the service works as expected.
In the second request, the wsrm:Identifier tag is empty, and I strongly suspect it should not be so, however, I can't seem to find a way of changing it

Does anyone know what's wrong with this? Thanks!
No RepliesBe the first to reply