Hello,

I know this list is busy and things can get overlooked, but I wondered if
anyone had any futher thoughts on the problem I posted earlier.

Thanks
Wayne

On 04/03/07, Wayne Keenan <[EMAIL PROTECTED]> wrote:

Hi,

Is there a way to tell xfire to skip processing the SOAP request&response
bodies on the client, and just use the request I supply and allow me to
extract
the response verbatim.

I am using the dynamic client to call a Xfire HTTP/SOAP service.
Before I call 'Client.invoke' I am trying to set the SOAP body to be a XML
of my choosing, by-passing any XFire wrapping it tries todo,
Xfire is very helpful, but I really want Xfire to 'trust' me on the SOAP
body.
upon return I wish to extract the BODY skipping any clientside XML/SOAP
body processing.

I would like Xfire to still do all the other SOAPY/Fault stuff, just leave
the bodies alone.

I have attempted in various ways todo this, I ended up doing this for the
outgoing, but the response still seems to be wrapped and causes an error:


        client.getService().getServiceInfo().setWrapped(false);
        client.getService().setBindingProvider(new
MessageBindingProvider());
        org.jdom.Document jdomDoc = new DOMBuilder().build(d);
        request = (org.jdom.Element) jdomDoc.getRootElement();

Object[] o = client.invoke(mOperation, new Object[] {request});

The request is sent and processed okay but on processing the reponse this
occurs:

org.codehaus.xfire.fault.XFireFault: Index: 1, Size: 1
    at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
    at org.codehaus.xfire.client.Client.onReceive(Client.java:386)
    at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(
HttpChannel.java :139)
    at org.codehaus.xfire.transport.http.XFireServletChannel.send(
XFireServletChannel.java:48)
    at org.codehaus.xfire.handler.OutMessageSender.invoke(
OutMessageSender.java:26)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke (
HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
    at org.codehaus.xfire.client.Client.invoke(Client.java:335)
    at org.codehaus.xfire.client.Client.invoke(Client.java :349)
    at com.turingsmi.messagelogic.net.WebServiceAdapter.sendMessage(
WebServiceAdapter.java:156)
    at com.turingsmi.messagelogic.net.Send.processEvent(Send.java:31)
    at com.turingsmi.messagelogic.engine.Action.perform (Action.java:124)
    at com.turingsmi.messagelogic.engine.Chain.processEvent(Chain.java:37)
    at com.turingsmi.messagelogic.engine.Action.perform(Action.java:124)
    at com.turingsmi.messagelogic.engine.Engine.processEvent (Engine.java
:255)
    at com.turingsmi.messagelogic.net.tests.WSAdapterTest.testLoopback(
WSAdapterTest.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (
NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at junit.framework.TestCase.runTest (TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run( TestSuite.java:203)
    at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(
JUnit3TestReference.java:128)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(
TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (
RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
RemoteTestRunner.java:196)
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
    at java.util.LinkedList.entry (LinkedList.java:360)
    at java.util.LinkedList.get(LinkedList.java:303)
    at java.util.Collections$UnmodifiableList.get(Collections.java:1139)
    at org.codehaus.xfire.service.binding.AbstractBinding.read(
AbstractBinding.java :187)
    at org.codehaus.xfire.service.binding.WrappedBinding.readMessage(
WrappedBinding.java:50)
    at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(
SoapBodyHandler.java:42)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke (
HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Client.onReceive(Client.java:382)
    ... 32 more



Thanks
Wayne


Reply via email to