You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Ashwini Kumar J (JIRA)" <tu...@ws.apache.org> on 2008/04/04 07:53:25 UTC

[jira] Created: (TUSCANY-2196) passing Java bean using a JSON binding

passing Java bean using a JSON binding
--------------------------------------

                 Key: TUSCANY-2196
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2196
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA JSON-RPC Binding Extension
    Affects Versions: Java-SCA-1.1
         Environment: Windows xp2
            Reporter: Ashwini Kumar J
             Fix For: Java-SCA-Next


The service is exposed over JSON binding and will return a  java bean as a response but as per my knowledge the bean is not properly converted to json object as shown in the smd below:

{"SMDVersion":".1","objectName":"EmployeeBOService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8080/employee-det/EmployeeJSONService","methods":[{"name":"fetchEmployeeData","parameters":[{"name":"param0","type":"STRING"}]}]}


Response:
[object Object]


Console output is:
Apr 4, 2008 11:23:07 AM com.metaparadigm.jsonrpc.BeanSerializer analyzeBean
INFO: analyzing com.infosys.poc.employeedata.EmployeeData


-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-2196) passing Java bean using a JSON binding

Posted by "Ashwini Kumar J (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashwini Kumar J updated TUSCANY-2196:
-------------------------------------

    Attachment:     (was: employee-det.war)

> passing Java bean using a JSON binding
> --------------------------------------
>
>                 Key: TUSCANY-2196
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2196
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA JSON-RPC Binding Extension
>    Affects Versions: Java-SCA-1.1
>         Environment: Windows xp2
>            Reporter: Ashwini Kumar J
>             Fix For: Java-SCA-Next
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The service is exposed over JSON binding and will return a  java bean as a response but as per my knowledge the bean is not properly converted to json object as shown in the smd below:
> {"SMDVersion":".1","objectName":"EmployeeBOService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8080/employee-det/EmployeeJSONService","methods":[{"name":"fetchEmployeeData","parameters":[{"name":"param0","type":"STRING"}]}]}
> Response:
> [object Object]
> Console output is:
> Apr 4, 2008 11:23:07 AM com.metaparadigm.jsonrpc.BeanSerializer analyzeBean
> INFO: analyzing com.infosys.poc.employeedata.EmployeeData

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Assigned: (TUSCANY-2196) passing Java bean using a JSON binding

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng reassigned TUSCANY-2196:
-------------------------------------

    Assignee: Raymond Feng

> passing Java bean using a JSON binding
> --------------------------------------
>
>                 Key: TUSCANY-2196
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2196
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA JSON-RPC Binding Extension
>    Affects Versions: Java-SCA-1.1
>         Environment: Windows xp2
>            Reporter: Ashwini Kumar J
>            Assignee: Raymond Feng
>             Fix For: Java-SCA-Next
>
>         Attachments: employee-det.war
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The service is exposed over JSON binding and will return a  java bean as a response but as per my knowledge the bean is not properly converted to json object as shown in the smd below:
> {"SMDVersion":".1","objectName":"EmployeeBOService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8080/employee-det/EmployeeJSONService","methods":[{"name":"fetchEmployeeData","parameters":[{"name":"param0","type":"STRING"}]}]}
> Response:
> [object Object]
> Console output is:
> Apr 4, 2008 11:23:07 AM com.metaparadigm.jsonrpc.BeanSerializer analyzeBean
> INFO: analyzing com.infosys.poc.employeedata.EmployeeData

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-2196) passing Java bean using a JSON binding

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng resolved TUSCANY-2196.
-----------------------------------

    Resolution: Invalid

Hi,

I tried the test case, it works fine. You seems to be confused by the display of the result. As shown below, you need to extract the result data by accessing all the fields. "<p>" + result +"</p"> will only give you [object Object]. With the change in the HTML, I can see the strEmail ...

    	function contentCallBack(result) {
    		var handlerNode = document.getElementById("ReturnedContent");
			handlerNode.innerHTML = "<p>" + result.strEmail + "</p>" ;
    	}

Thanks,
Raymond

> passing Java bean using a JSON binding
> --------------------------------------
>
>                 Key: TUSCANY-2196
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2196
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA JSON-RPC Binding Extension
>    Affects Versions: Java-SCA-1.1
>         Environment: Windows xp2
>            Reporter: Ashwini Kumar J
>            Assignee: Raymond Feng
>             Fix For: Java-SCA-Next
>
>         Attachments: employee-det.war
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The service is exposed over JSON binding and will return a  java bean as a response but as per my knowledge the bean is not properly converted to json object as shown in the smd below:
> {"SMDVersion":".1","objectName":"EmployeeBOService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8080/employee-det/EmployeeJSONService","methods":[{"name":"fetchEmployeeData","parameters":[{"name":"param0","type":"STRING"}]}]}
> Response:
> [object Object]
> Console output is:
> Apr 4, 2008 11:23:07 AM com.metaparadigm.jsonrpc.BeanSerializer analyzeBean
> INFO: analyzing com.infosys.poc.employeedata.EmployeeData

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-2196) passing Java bean using a JSON binding

Posted by "Ashwini Kumar J (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashwini Kumar J updated TUSCANY-2196:
-------------------------------------

    Comment: was deleted

> passing Java bean using a JSON binding
> --------------------------------------
>
>                 Key: TUSCANY-2196
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2196
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA JSON-RPC Binding Extension
>    Affects Versions: Java-SCA-1.1
>         Environment: Windows xp2
>            Reporter: Ashwini Kumar J
>             Fix For: Java-SCA-Next
>
>         Attachments: employee-det.war
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The service is exposed over JSON binding and will return a  java bean as a response but as per my knowledge the bean is not properly converted to json object as shown in the smd below:
> {"SMDVersion":".1","objectName":"EmployeeBOService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8080/employee-det/EmployeeJSONService","methods":[{"name":"fetchEmployeeData","parameters":[{"name":"param0","type":"STRING"}]}]}
> Response:
> [object Object]
> Console output is:
> Apr 4, 2008 11:23:07 AM com.metaparadigm.jsonrpc.BeanSerializer analyzeBean
> INFO: analyzing com.infosys.poc.employeedata.EmployeeData

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org