You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "sumedha rubasinghe (JIRA)" <ji...@apache.org> on 2008/08/14 15:09:44 UTC

[jira] Created: (SYNAPSE-431) Problem when passing a String array through a proxy service

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
    Affects Versions: 1.1.1
            Reporter: sumedha rubasinghe


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&params=XYZ&params=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&params=XYZ&params=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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Resolved: (SYNAPSE-431) Problem when passing a String array through a proxy service

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved SYNAPSE-431.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3

Since SYNAPSE-555 is fixed, this issue should also be resolved.

> 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
>             Fix For: 1.3
>
>
> 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&params=XYZ&params=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&params=XYZ&params=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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-431) Problem when passing a String array through a proxy service

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622731#action_12622731 ] 

Andreas Veithen commented on SYNAPSE-431:
-----------------------------------------

This seems to be a problem with the HTTP NIO listener. I have a test case that confirms this.

> 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
>    Affects Versions: 1.1.1
>            Reporter: sumedha rubasinghe
>
> 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&params=XYZ&params=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&params=XYZ&params=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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Assigned: (SYNAPSE-431) Problem when passing a String array through a proxy service

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asankha C. Perera reassigned SYNAPSE-431:
-----------------------------------------

    Assignee: Asankha C. Perera

> 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
>    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&params=XYZ&params=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&params=XYZ&params=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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-431) Problem when passing a String array through a proxy service

Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715872#action_12715872 ] 

Keith Godwin Chapman commented on SYNAPSE-431:
----------------------------------------------

The patch submitted on https://issues.apache.org/jira/browse/SYNAPSE-555 fixes this issue as well.

> 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&params=XYZ&params=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&params=XYZ&params=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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-431) Problem when passing a String array through a proxy service

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ 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&params=XYZ&params=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&params=XYZ&params=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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-431) Problem when passing a String array through a proxy service

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622849#action_12622849 ] 

Andreas Veithen commented on SYNAPSE-431:
-----------------------------------------

I ran my test case against Axis' blocking HTTP transport and it shows the same behavior. I know that the way Axis transforms a REST request into a SOAP infoset depends on the presence of a schema in the operation description. Do you use a publishWSDL element on your proxy?

> 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
>    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&params=XYZ&params=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&params=XYZ&params=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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-431) Problem when passing a String array through a proxy service

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated SYNAPSE-431:
------------------------------------

    Component/s: Transports

> 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&params=XYZ&params=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&params=XYZ&params=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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org