[MASHUP-747] JavaScript MR fails to pass in messages when the children in the request are namespace qualified Created: 08/Apr/08  Updated: 14/Apr/08  Resolved: 14/Apr/08

Status: Resolved
Project: ZZZ-WSO2 Mashup Server
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: Bug
Reporter: Kieth Chapman Assignee: Kieth Chapman
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

JavaScript MR fails to pass in messages when the children in the request are namespace qualified.

Deploy the following service as test.js

this.schemaTargetNamespace="http://example1.org/example1";
echo.inputTypes="string";
function echo(Text){
return Text;
}

Run a Axis2 Java Client in a RestFull Manner, the request produced by it is

POST /services/system/test.HTTPEndpoint HTTP/1.1
Content-Type: application/xml; charset=UTF-8
SOAPAction: urn:anonOutInOpResponse
User-Agent: Axis2
Host: 127.0.0.1
Transfer-Encoding: chunked

7e
<example1:echo xmlns:example1="http://example1.org/example1">
<example1:Text>Axis2 Echo String </example1:Text></example1:echo>0

The Mashup Server responds with a fault saying

<Exception>org.apache.axis2.AxisFault: Required element Text defined in the schema can not be found in the request at org.wso2.javascript.rhino.JavaScriptReceiver.handleSimpleElement(JavaScriptReceiver.java:425) at org.wso2.javascript.rhino.JavaScriptReceiver.handleSimpleTypeInRequest(JavaScriptReceiver.java:405) at org.wso2.javascript.rhino.JavaScriptReceiver.handleComplexTypeInRequest(JavaScriptReceiver.java:384) at org.wso2.javascript.rhino.JavaScriptReceiver.invokeBusinessLogic(JavaScriptReceiver.java:168) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136) at org.apache.axis2.transport.http.util.RESTUtil.processXMLRequest(RESTUtil.java:84) at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processXMLRequest(AxisServlet.java:805) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:204) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.wso2.mashup.transport.ServiceUIFilter.doFilter(ServiceUIFilter.java:210) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)</Exception>

Now update the request to

POST /services/system/test.HTTPEndpoint HTTP/1.1
Content-Type: application/xml; charset=UTF-8
SOAPAction: urn:anonOutInOpResponse
User-Agent: Axis2
Host: 127.0.0.1
Transfer-Encoding: chunked

7e
<example1:echo xmlns:example1="http://example1.org/example1">
<Text>Axis2 Echo String </Text></example1:echo>0

and it works fine.



 Comments   
Comment by Kieth Chapman [ 14/Apr/08 ]

Fixed in revision 15646.

Generated at Mon Dec 17 18:31:17 IST 2018 using JIRA 7.2.2#72004-sha1:9d5132893cc8c728a3601a9034a1f8547ef5c7be.