History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XFIRE-307
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Diephouse
Reporter: Flier Lu
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XFire

RPCBinding cannot process response message in client mode

Created: 16/Mar/06 02:50 AM   Updated: 17/Mar/06 11:32 AM
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: 1.1-beta-1

Time Tracking:
Not Specified

Environment: jdk1.4.2


 Description  « Hide
when I create dynamic proxy in client, call proxy method can invoke web service method succeeded, but the server response message cannot be processed in client side. because when RPCBinding process the server response message, it use the local name of response element as operation name, but the server response element shold have a "Response" postfix, the operation finding will failed.

public class RPCBinding extends WrappedBinding
{
public void readMessage(InMessage inMessage, MessageContext context) throws XFireFault

{ DepthXMLStreamReader dr = new DepthXMLStreamReader(context.getInMessage().getXMLStreamReader()); String opName = dr.getLocalName(); OperationInfo operation = endpoint.getServiceInfo().getOperation( opName ); //... }

}

so I add some check for client mode, and use the MessageExchange in context to fetch operation, like this

OperationInfo operation;

if (isClientModeOn(context) && context.getExchange() != null &&
context.getExchange().getOperation().hasOutput() &&
opName.equals(context.getExchange().getOperation().getOutputMessage().getName().getLocalPart()))

{ operation = context.getExchange().getOperation(); }

else

{ operation = endpoint.getServiceInfo().getOperation( opName ); }

this code woke fine in my envrionment, and not broken the unit testcases, but I don't known whether are there other method can process this status ?
I define the web service interface with annotation

/**

  • @@WebService(name = "DeviceWS", serviceName = "DeviceWS", targetNamespace = "http://www.nsfocus.com/flowind")
  • @@SOAPBinding(style = SOAPBindingAnnotation.STYLE_RPC)
    */
    public interface DeviceWS
    {
    /**
  • @@WebMethod(operationName = "getRouters", action="urn:GetRouters")
  • @@.return WebResult("routers")
    */
    String[] getRouters();
    }

and call service

Service svc = new AnnotationServiceFactory(new CommonsWebAttributes(),
XFireFactory.newInstance().getXFire().getTransportManager()).create(DeviceWS.class);

DeviceWS ws = (DeviceWS) new XFireProxyFactory().create(svc, URL_WS + "DeviceWS");

ws.getRouters() //...



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dan Diephouse - 17/Mar/06 11:32 AM
Thanks Flier! This is fixed (and tested) now in SVN.