You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Kinichiro Inoguchi (JIRA)" <ji...@apache.org> on 2006/07/08 17:32:32 UTC

[jira] Commented: (AXIS2-865) RPCMessageReceiver response NOT qualified well

    [ http://issues.apache.org/jira/browse/AXIS2-865?page=comments#action_12419863 ] 

Kinichiro Inoguchi commented on AXIS2-865:
------------------------------------------

I found resolution for this issue.
This resolution set namespace to response in recursive.
This works, and I could verify response messages were qualified well.

1. add method to org.apache.axis2.rpc.receivers.RPCUtil.java

    public static void setNamespace(OMElement element, OMNamespace ns) {
    	Iterator childIterator = element.getChildren();
    	while(childIterator.hasNext()) {
    		OMNode childNode = (OMNode) childIterator.next();
    		if(childNode.getType() == OMNode.ELEMENT_NODE) {
    			((OMElement) childNode).setNamespace(ns);
    			setNamespace((OMElement) childNode, ns);
    		}
    	}
    }

2. add this line to org.apache.axis2.rpc.receivers.RPCMessageReceiver.java

            RPCUtil.setNamespace(envelope.getBody().getFirstElement(), ns);

    before the line, 

            outMessage.setEnvelope(envelope);

Thanks.

> RPCMessageReceiver response NOT qualified well
> ----------------------------------------------
>
>          Key: AXIS2-865
>          URL: http://issues.apache.org/jira/browse/AXIS2-865
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: core
>     Versions: 1.0
>  Environment: JDK 1.4.2 Tomcat5
> Axis2 Nightly Build 05-Jul-2006 21:29
>     Reporter: Kinichiro Inoguchi
>  Attachments: TestService1.aar
>
> A response message from RPCMessageReceiver should be qualified,
> like (1) or (2) below.
> (1) add prefixes to all elements
>  <soapenv:Body>
>     <ns:sayHelloResponse xmlns:ns="http://aaa.bbb.ccc">
>         <ns:return>sayHello was called.</ns:return>
>     </ns:sayHelloResponse>
>  </soapenv:Body>
> (2) remove all prefixes in body element.
>  <soapenv:Body>
>     <sayHelloResponse xmlns="http://aaa.bbb.ccc">
>         <return>sayHello was called.</return>
>     </sayHelloResponse>
>  </soapenv:Body>
> RPCMessageReceiver & RPCInOnlyMessageReceiver should be fixed.
> After resolving AXIS2-756, elementFormDeault set to qualified 
> from unqualified.
> Please refer to user mailing list thread.
> http://marc.theaimsgroup.com/?t=115207586000001&r=1&w=2
> I checked this issue with Nightly Build 05-Jul-2006 21:29 .
> Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org