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 "Kishanthan Thangarajah (JIRA)" <ji...@apache.org> on 2013/04/30 19:14:17 UTC

[jira] [Commented] (AXIS2-5516) ReST request always returns blank response

    [ https://issues.apache.org/jira/browse/AXIS2-5516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13645737#comment-13645737 ] 

Kishanthan Thangarajah commented on AXIS2-5516:
-----------------------------------------------

Here is my observation on this issue. The following is how echoRequest element is defined.

<xsd:element name="echoRequest" type="tns:EchoRequestType"/>
<xsd:simpleType name="EchoRequestType">
    <xsd:restriction base="xsd:string">
        <xsd:maxLength value="100"/>
    </xsd:restriction>
</xsd:simpleType>

So accessing echoRequest operation via rest calls will not work because axis2 expects a different schema format for echoRequest to work with rest calls.

It will work if the above is defined as :

<xsd:element name="echoRequest">
    <xsd:complexType>
        <xsd:sequence>
            <xsd:element name="param" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>
</xsd:element>

Then accessing http://localhost:8080/axis2/services/TestService/echoRequest?param=hello would give the correct response. The above is the schema format to use when trying to invoke service operations via rest calls.

Also still the SOAP calls will work fine as they go through the normal SOAP request processing path in axis2. Here is a sample request for echoRequest operation.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:test="http://www.example.com/test">
   <soapenv:Header/>
   <soapenv:Body>
      <test:echoRequest>hello</test:echoRequest>
   </soapenv:Body>
</soapenv:Envelope>
                
> ReST request always returns blank response
> ------------------------------------------
>
>                 Key: AXIS2-5516
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5516
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>         Environment: Windows + IBM Rational Application Developer (RAD) + Websphere Application Server (WAS) 6.1;
> IBMi + WAS 6.1
>            Reporter: J. Allen
>              Labels: rest, wsdl, xmlbeans
>         Attachments: TestServiceSkeleton.java, TestService.wsdl
>
>
> A version 1.1 WSDL was created and the wsdl2java command run to generate code stubs. The WSDL has 1 operation - echo - to return the string in the request.  The service class was implemented to return the request string.
> All ReST requests to the WSDL 1.1 web service return a blank response. SOAP requests work fine.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org