Relevant parts of the WSDL attached. Note that the problem is not specific to this operation, but occurs whenever I try to invoke /any/ operation using REST.

...
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://infosys.tuwien.ac.at/dacoss/eval/doc/";>
  <xs:element name="getString">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="param0" nillable="true" type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="getStringResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="return" nillable="true" type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
...
<wsdl:message name="getStringMessage">
  <wsdl:part name="part1" element="ns0:getString"/>
</wsdl:message>
<wsdl:message name="getStringResponse">
  <wsdl:part name="part1" element="ns0:getStringResponse"/>
</wsdl:message>
...
<wsdl:operation name="getString">
  <soap:operation soapAction="urn:getString" style="document"/>
    <wsdl:input>
      <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
      <soap:body use="literal"/>
    </wsdl:output>
</wsdl:operation>
...

thank you,
philipp

keith chapman schrieb:
can u post the schema for the operation getString please.

Thanks,
Keith.

On 7/11/07, *Philipp Leitner* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi all,

    I have a service deployed with Axis2 with a couple of operations in it.
    As it is default the service has 3 bindings, SOAP1.1, SOAP1.2 and HTTP
    (REST).

    Now I am trying to invoke this service using WSDL2java generated stubs.

    I use

    java -cp $CP org.apache.axis2.wsdl.WSDL2Java -d xmlbeans -uri
    http://localhost:8080/axis2/services/DADocTestService?wsdl

    , i.e. I am using pretty much the default values for WSDL2java, but
    switched to XMLBeans databinding.

    When I am invoking the service using the the SOAP1.1 connector
    everything seems to be working smoothly, but as soon as I try to use the
    HTTP binding I get the following error:

    Exception in thread "main" java.lang.RuntimeException: Data binding
    error
             at
    
at.ac.tuwien.infosys.dacoss.eval.doc.DADocTestServiceDADocTestServiceHttpport1Stub.fromOM(DADocTestServiceDADocTestServiceHttpport1Stub.java
    :4089)
             at
    
at.ac.tuwien.infosys.dacoss.eval.doc.DADocTestServiceDADocTestServiceHttpport1Stub.getString(DADocTestServiceDADocTestServiceHttpport1Stub.java:2672)
             at
    at.ac.tuwien.infosys.dsg.dacoss.eval.v2.Axis2Runner.doRESTStringInvocation
    (Axis2Runner.java:161)
             at
    
at.ac.tuwien.infosys.dsg.dacoss.eval.v2.Axis2Runner.main(Axis2Runner.java:50)

    Looking at the HTTP communications with tcpmon this is not surprising:

    Request:

    POST /axis2/rest/DADocTestService/getString HTTP/1.1
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    SOAPAction: ""
    User-Agent: Axis2
    Host: localhost:8081
    Transfer-Encoding: chunked

    f
    param0=TestTest
    0

    Response:

    HTTP/1.1 500 Internal Server Error
    Server: Apache-Coyote/1.1
    Content-Type: text/xml;charset=UTF-8
    Transfer-Encoding: chunked
    Date: Wed, 11 Jul 2007 09:13:44 GMT
    Connection: close

    288
    <?xml version=' 1.0' encoding='UTF-8'?><soapenv:Envelope
    xmlns:wsa="http://www.w3.org/2005/08/addressing";
    xmlns:soapenv="
    
http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header><wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:906A7FD5BF3FB35F451184145224596</wsa:MessageID><wsa:Action>
    
http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action></soapenv:Header><soapenv:Body><soapenv:Fault><faultcode></faultcode><faultstring>Required

    element null defined in the schema can not be found in the
    request</faultstring><detail
    /></soapenv:Fault></soapenv:Body></soapenv:Envelope>
    0

    I am using the 1.2 release of Axis2 on client side, and Axis2 1.1.1 on
    server side. Updating the server to 1.2 is no option currently.

    Is REST generally not working with a 1.2 client and a 1.1.1 server, or
    am I doing something wrong here?

    /philipp

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    For additional commands, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>




--
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to