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

[jira] Created: (TUSCANY-2251) Problem with 1.2 RC4 with simple JavaBean

Problem with 1.2 RC4 with simple JavaBean
-----------------------------------------

                 Key: TUSCANY-2251
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2251
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Data Binding Runtime
    Affects Versions: Java-SCA-1.2
         Environment: Eclipse 3.3, Tuscany SCA 1.2 - RC4
            Reporter: Nishant Joshi
             Fix For: Java-SCA-1.2
         Attachments: SimpleBeanProblem.zip

Hi there,
I have one sample which was perfectly working with 1.0 incubating... when i have tried same with 1.2 RC4 all the data come from client was null for all the values for a simple bean.
Please note that I m creating Client on Eclipse 3.3... using WebService client generation facility of eclipse...
I m attaching detail for more detail...

When tried same with SCA client it was giving me perfect result... 



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TUSCANY-2251) Problem with 1.2 RC4 with simple JavaBean

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

Nishant Joshi updated TUSCANY-2251:
-----------------------------------

    Attachment: SimpleBeanProblem.zip

Sample for more detail... "SimpleBeanProblem.zip"

> Problem with 1.2 RC4 with simple JavaBean
> -----------------------------------------
>
>                 Key: TUSCANY-2251
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2251
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime
>    Affects Versions: Java-SCA-1.2
>         Environment: Eclipse 3.3, Tuscany SCA 1.2 - RC4
>            Reporter: Nishant Joshi
>             Fix For: Java-SCA-1.2
>
>         Attachments: SimpleBeanProblem.zip
>
>
> Hi there,
> I have one sample which was perfectly working with 1.0 incubating... when i have tried same with 1.2 RC4 all the data come from client was null for all the values for a simple bean.
> Please note that I m creating Client on Eclipse 3.3... using WebService client generation facility of eclipse...
> I m attaching detail for more detail...
> When tried same with SCA client it was giving me perfect result... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TUSCANY-2251) Problem with 1.2 RC4 with simple JavaBean

Posted by "Simon Nash (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12592374#action_12592374 ] 

Simon Nash commented on TUSCANY-2251:
-------------------------------------

This problem is caused by an error in the WSDL that Tuscany generates at runtime.  Your WSDL file includes the lines:

<wsdl:definitions targetNamespace="http://example.com" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns0="http://example.com" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://example.com/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://example.com" xmlns:ns="http://example.com">
            <xs:element name="processBean">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="param0" nillable="true" type="ns1:SimpleBean"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="processBeanResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="return" nillable="true" type="ns1:SimpleBean"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://example.com/xsd" xmlns:ax21="http://example.com/xsd">
            <xs:complexType name="SimpleBean">
                <xs:sequence>
                    <xs:element minOccurs="0" name="age" type="xs:int"/>
                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:schema>
  </wsdl:types>

The elements "processBean" and "processBeanResponse" are correctly generated in the namespace http://example.com, but the elements "age" and "name" are incorrectly generated in the namespace http://example.com/xsd.

This mapping from Java interfaces to WSDL is not consistent with the JAX-WS and JAXB specifications as implemented by the Tuscany runtime.  This is why the Tuscany runtime is unmarshalling these elements as null or zero.

A workaround to the problem is to edit the WSDL to put the generated elements in the correct namespace.  You would need to change the lines above to the following:

<wsdl:definitions targetNamespace="http://example.com" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns0="http://example.com" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://example.com/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://example.com" xmlns:ns="http://example.com">
            <xs:element name="processBean">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="param0" nillable="true" type="ns0:SimpleBean"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="processBeanResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="return" nillable="true" type="ns0:SimpleBean"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:complexType name="SimpleBean">
                <xs:sequence>
                    <xs:element minOccurs="0" name="age" type="xs:int"/>
                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:schema>
  </wsdl:types>

The reason this used to work is that the incorrect namespace in the WSDL and in the SOAP body sent on the wire by Axis used to be ignored by the Tuscany unmarshalling code.  The problem occurs now because the Tuscany unmarshalling code was changed to check for exact namespace matches.  (I believe this happened some time ago, before the Tuscany 1.1 release.)

The fix for the problem is to change Tuscany's WSDL generation to make it correct according to the JAX-WS and JAXB specifications.  I am currently working on this.


> Problem with 1.2 RC4 with simple JavaBean
> -----------------------------------------
>
>                 Key: TUSCANY-2251
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2251
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime
>    Affects Versions: Java-SCA-1.2
>         Environment: Eclipse 3.3, Tuscany SCA 1.2 - RC4
>            Reporter: Nishant Joshi
>             Fix For: Java-SCA-1.2
>
>         Attachments: generatedClientCode.zip, SimpleBeanProblem.zip
>
>
> Hi there,
> I have one sample which was perfectly working with 1.0 incubating... when i have tried same with 1.2 RC4 all the data come from client was null for all the values for a simple bean.
> Please note that I m creating Client on Eclipse 3.3... using WebService client generation facility of eclipse...
> I m attaching detail for more detail...
> When tried same with SCA client it was giving me perfect result... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TUSCANY-2251) Problem with 1.2 RC4 with simple JavaBean

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

Nishant Joshi updated TUSCANY-2251:
-----------------------------------

    Attachment: generatedClientCode.zip

I m using TopDown approch to generate proxy from wsdl
i have WTP version 1.0.101, JST version 1.0.2, WST version 1.0.2, and Axis only (not Axis2)

> Problem with 1.2 RC4 with simple JavaBean
> -----------------------------------------
>
>                 Key: TUSCANY-2251
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2251
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime
>    Affects Versions: Java-SCA-1.2
>         Environment: Eclipse 3.3, Tuscany SCA 1.2 - RC4
>            Reporter: Nishant Joshi
>             Fix For: Java-SCA-1.2
>
>         Attachments: generatedClientCode.zip, SimpleBeanProblem.zip
>
>
> Hi there,
> I have one sample which was perfectly working with 1.0 incubating... when i have tried same with 1.2 RC4 all the data come from client was null for all the values for a simple bean.
> Please note that I m creating Client on Eclipse 3.3... using WebService client generation facility of eclipse...
> I m attaching detail for more detail...
> When tried same with SCA client it was giving me perfect result... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TUSCANY-2251) Problem with 1.2 RC4 with simple JavaBean

Posted by "Simon Nash (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591430#action_12591430 ] 

Simon Nash commented on TUSCANY-2251:
-------------------------------------

Please can you give more details about how you are creating the Web Service client in Eclipse.

1. In Eclipse, are you generating the SimpleServicePortTypeProxy class from SampleServiceComponent.wsdl ("top down"), or are you generating it from SimpleService.java and SimpleBean.java ("bottom up")?

2. What level of Eclipse WTP and the JST/WST Web service tools are you using?  What level of Axis2 does this pull in?

3. Please attach the generated client code that you are using in Eclipse (SimpleServicePortTypeProxy java and any other generated files).

Thanks!

> Problem with 1.2 RC4 with simple JavaBean
> -----------------------------------------
>
>                 Key: TUSCANY-2251
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2251
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime
>    Affects Versions: Java-SCA-1.2
>         Environment: Eclipse 3.3, Tuscany SCA 1.2 - RC4
>            Reporter: Nishant Joshi
>             Fix For: Java-SCA-1.2
>
>         Attachments: SimpleBeanProblem.zip
>
>
> Hi there,
> I have one sample which was perfectly working with 1.0 incubating... when i have tried same with 1.2 RC4 all the data come from client was null for all the values for a simple bean.
> Please note that I m creating Client on Eclipse 3.3... using WebService client generation facility of eclipse...
> I m attaching detail for more detail...
> When tried same with SCA client it was giving me perfect result... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TUSCANY-2251) Problem with 1.2 RC4 with simple JavaBean

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

Simon Laws updated TUSCANY-2251:
--------------------------------

    Fix Version/s:     (was: Java-SCA-1.2)
                   Java-SCA-Next

move fix to SCA Next

> Problem with 1.2 RC4 with simple JavaBean
> -----------------------------------------
>
>                 Key: TUSCANY-2251
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2251
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime
>    Affects Versions: Java-SCA-1.2
>         Environment: Eclipse 3.3, Tuscany SCA 1.2 - RC4
>            Reporter: Nishant Joshi
>             Fix For: Java-SCA-Next
>
>         Attachments: generatedClientCode.zip, SimpleBeanProblem.zip
>
>
> Hi there,
> I have one sample which was perfectly working with 1.0 incubating... when i have tried same with 1.2 RC4 all the data come from client was null for all the values for a simple bean.
> Please note that I m creating Client on Eclipse 3.3... using WebService client generation facility of eclipse...
> I m attaching detail for more detail...
> When tried same with SCA client it was giving me perfect result... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.