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 "Deepal Jayasinghe (JIRA)" <ji...@apache.org> on 2007/08/02 07:36:53 UTC

[jira] Resolved: (AXIS2-3049) The generated schema by axis2 seems invalid when OMElements are specified as input parameters in service implementation class

     [ https://issues.apache.org/jira/browse/AXIS2-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe resolved AXIS2-3049.
--------------------------------------

    Resolution: Fixed

Hi Charitha,
When you have a service operation which takes multiple parameters then you should not use Raw Message receivers.

If you replace your services.xml with the following everything will work fine.

<service name="Myaxiomtest">

    <description>

        All I ask is that OMElements just work!

    </description>

    <parameter name="ServiceClass" locked="false">Myaxiomtest</parameter>

    <operation name="echotest">

               <actionMapping>urn:echo</actionMapping>

    </operation>

</service>

> The generated schema by axis2 seems invalid when OMElements are specified as input parameters in service implementation class 
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3049
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3049
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: om
>    Affects Versions: 1.3
>         Environment: winxp, jdk15, Axis2-SNAPSHOT (1.3)
>            Reporter: Charitha Kankanamge
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>         Attachments: Myaxistest.aar
>
>
> Please correct me if i'm wrong. I feel there is an error when generating schema if OMElements are included in service implementation class. 
> I have a service implementation class with following signature.
> public OMElement echotest(OMElement x, OMElement y){
> }
> I deployed a service archive with above method and retrieved the schema by issuing ?xsd. I got following.
> <xs:schema>
> <xs:element name="echotest">
> <xs:complexType>
> <xs:sequence>
> <xs:element minOccurs="0" name="echotest" nillable="true" type="xs:anyType"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="echotestResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element minOccurs="0" name="return" nillable="true" type="xs:anyType"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> As you can see, only one element is added as input parameter though the method contains two params. If you deploy the same service by replacing OMElement with other primitive type (int, String etc) you will get schema with correct no. of input parameters.
>   <xs:sequence>
>         <xs:element  name="a" nillable="true" type="xs:anyType"/>
>         <xs:element  name="b" nillable="true" type="xs:anyType"/>
>     </xs:sequence>

-- 
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