[
https://issues.apache.org/jira/browse/SYNAPSE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625121#action_12625121
]
Andreas Veithen commented on SYNAPSE-431:
-----------------------------------------
Looking at the code, the complete explanation of this issue seems to be as
follows:
* For GET requests, Axis' HTTP transport probably uses
BuilderUtil.buildsoapMessage. If schema information is available for the
service, this method supports multiple values for the same parameter. If no
schema information is available, BuilderUtil.createSOAPMessageWithoutSchema is
used, which only takes into account the first value. This should explains why
your Axis2 service (which probably has a schema) works with multiple values,
while my test case (which doesn't use a schema) does not.
* As can be seen from RESTUtil.createEnvelopeFromGetRequest, the NIO HTTP
transport doesn't use BuilderUtil.buildsoapMessage and implements an algorithm
similar to BuilderUtil.createSOAPMessageWithoutSchema. Therefore it doesn't
support multiple values even if there is schema information.
I believe that RESTUtil.createEnvelopeFromGetRequest should be changed to use
BuilderUtil.buildsoapMessage in order to make sure that the behavior of the
different HTTP transports is consistent. For your proxy service, you would then
have two options:
* Use publishWSDL to make sure that the proxy service has schema information
and check if that solves the problem.
* File a JIRA for Axis2 to change the behavior of
BuilderUtil.createSOAPMessageWithoutSchema to support multiple values.
> Problem when passing a String array through a proxy service
> -----------------------------------------------------------
>
> Key: SYNAPSE-431
> URL: https://issues.apache.org/jira/browse/SYNAPSE-431
> Project: Synapse
> Issue Type: Bug
> Components: Transports
> Affects Versions: 1.1.1
> Reporter: sumedha rubasinghe
> Assignee: Asankha C. Perera
>
> I have a proxy service(MyServiceProxy), which calls an Axis2 Service.
> My Axis Service(POJO) implementation is as follows:
> MyService{
> public String dosomething(String[] params)
> ....
> ....
> }
> }
> Point to note is the operation which accepts a String array.
> I issue a REST call to this service using following URL (going directly to
> Axis Server) & it works.
> http://<IP>:6060/services/MyService/dosomething?params=ABC¶ms=XYZ¶ms=PQR
> Take a note of same http parameter name(params) being used with different
> values. This is how Axis2 REST implementation allows us to pass values to an
> array of simple types.
> Now I call this service through my proxy service as follows.
> http://<IP>:8080/services/MyServiceProxy/dosomething?params=ABC¶ms=XYZ¶ms=PQR
> Now the service implementation only gets value "PQR". First two values (ABC &
> XYZ) are not coming into Axis2 Service level through Proxy Service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]