You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Martin Caslavsky (JIRA)" <ji...@apache.org> on 2008/03/28 14:42:24 UTC

[jira] Created: (AXIS2-3678) Type inheritance does not work with JAXBRI

Type inheritance does not work with JAXBRI
------------------------------------------

                 Key: AXIS2-3678
                 URL: https://issues.apache.org/jira/browse/AXIS2-3678
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: databinding
    Affects Versions: 1.3
         Environment: JDK 1.5
            Reporter: Martin Caslavsky
         Attachments: example.wsdl

Type inheritance does not work with JAXBRI

Code generated using the following settings from the attached WSDL:
<databindingName>jaxbri</databindingName>
<generateServerSide>true</generateServerSide>
<generateServerSideInterface>true</generateServerSideInterface>
<generateServicesXml>true</generateServicesXml>
<syncMode>sync</syncMode>
<generateAllClasses>true</generateAllClasses>
<unpackClasses>true</unpackClasses>

The following code
Example z = new ExampleStub("http://localhost:8888/axis2/services/Example");
MetodaInput m = new MetodaInput();
m.setTest("test string");
Child ch = new Child();
ch.setI(19);
ch.setS("child");
m.setPar(ch);
z.metoda(m);

renders this incorrect SOAP (child type and "s" field are lost):
<soapenv:Body><metoda xmlns="http://example.org/"><test>test string</test><par><i>19</i></par></metoda></soapenv:Body>

while correct would be:
<soapenv:Body><metoda xmlns="http://example.org/"><test>test string</test><par xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="child"><i>19</i><s>child</s></par></metoda></soapenv:Body>

The problem could be in JAXBContext creation in Stub:
jc = javax.xml.bind.JAXBContext.newInstance(org.example.MetodaInput.class);


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


[jira] Updated: (AXIS2-3678) Type inheritance does not work with JAXBRI

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

Martin Caslavsky updated AXIS2-3678:
------------------------------------

    Attachment: example.wsdl

> Type inheritance does not work with JAXBRI
> ------------------------------------------
>
>                 Key: AXIS2-3678
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3678
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.3
>         Environment: JDK 1.5
>            Reporter: Martin Caslavsky
>         Attachments: example.wsdl
>
>
> Type inheritance does not work with JAXBRI
> Code generated using the following settings from the attached WSDL:
> <databindingName>jaxbri</databindingName>
> <generateServerSide>true</generateServerSide>
> <generateServerSideInterface>true</generateServerSideInterface>
> <generateServicesXml>true</generateServicesXml>
> <syncMode>sync</syncMode>
> <generateAllClasses>true</generateAllClasses>
> <unpackClasses>true</unpackClasses>
> The following code
> Example z = new ExampleStub("http://localhost:8888/axis2/services/Example");
> MetodaInput m = new MetodaInput();
> m.setTest("test string");
> Child ch = new Child();
> ch.setI(19);
> ch.setS("child");
> m.setPar(ch);
> z.metoda(m);
> renders this incorrect SOAP (child type and "s" field are lost):
> <soapenv:Body><metoda xmlns="http://example.org/"><test>test string</test><par><i>19</i></par></metoda></soapenv:Body>
> while correct would be:
> <soapenv:Body><metoda xmlns="http://example.org/"><test>test string</test><par xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="child"><i>19</i><s>child</s></par></metoda></soapenv:Body>
> The problem could be in JAXBContext creation in Stub:
> jc = javax.xml.bind.JAXBContext.newInstance(org.example.MetodaInput.class);

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