You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by 卢宾 <ro...@gmail.com> on 2007/10/25 06:58:26 UTC

[Axis2] Problems about Axis2 client accessing ZSI(Written in Python) simple "Echo" web services

Hi, all,
  I write a webservice using Python, implementing a simple 'Echo' method,
and use a simple Axis2 client to access this webservice,  I do the following
steps:
  1. wsdl2java.bat -uri http://localhost/Echo.wsdl (generating two java
files)
  2. write a simple client to invoke the webservice
 then , I got the following errors:
  1. *In Eclipse console:*
     "Exception in thread "main" org.apache.axis2.AxisFault: First Element
must contain the local name, Envelope"
  2. *In apache error log:*
    [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1] chunked
Transfer-Encoding forbidden: /EchoServer/.py
   [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1] mod_python
(pid=632, interpreter='localhost', phase='PythonHandler',
handler='control'): Application error
   [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1] ServerName:
'localhost'
   [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1] DocumentRoot:
'D:/Program Files/Apache Group/Apache2/htdocs'
   [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1] URI:
'/EchoServer/.py'
   [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1] Location: None
   [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1] Directory:
'D:/Program Files/Apache Group/Apache2/htdocs/EchoServer/'
   [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1] Filename:
'D:/Program Files/Apache Group/Apache2/htdocs/EchoServer/.py'
   [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1] PathInfo: ''
   [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1] Traceback (most
recent call last):
   [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1]   File
"D:\\Python24\\Lib\\site-packages\\mod_python\\importer.py", line 1537, in
HandlerDispatch\n    default=default_handler, arg=req, silent= hlist.silent)
  [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1]   File
"D:\\Python24\\Lib\\site-packages\\mod_python\\importer.py", line 1229, in
_process_target\n    result = _execute_target(config, req, object, arg)
  [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1]   File
"D:\\Python24\\Lib\\site-packages\\mod_python\\importer.py", line 1128, in
_execute_target\n    result = object(arg)
  [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1]   File "D:\\Program
Files\\Apache Group\\Apache2\\htdocs\\EchoServer\\control.py", line 9, in
handler\n    dispatch.AsHandler (modules=(EchoServer,),
request=req,rpc=True)
  [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1 ]   File
"D:\\Python24\\Lib\\site-packages\\ZSI\\dispatch.py", line 189, in
AsHandler\n    ps = ParsedSoap(request)
  [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1]   File
"D:\\Python24\\Lib\\site-packages\\ZSI\\parse.py", line 58, in __init__\n
str(e.__class__) + "): " + str(e), 0)
  [Sat Oct 13 10:50:46 2007] [error] [client 127.0.0.1] ParseException:
Can't parse document (_apache.SERVER_RETURN): 411
*My wsdl document is :*

<?xml version="1.0" encoding="UTF-8"?>
<definitions
  xmlns="http://schemas.xmlsoap.org/wsdl/ "
  xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:http=" http://schemas.xmlsoap.org/wsdl/http/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:tns="http://localhost:80/Echo.wsdl <http://localhost/Echo.wsdl>"
  targetNamespace=" http://localhost:80/Echo.wsdl<http://localhost/Echo.wsdl>"
>

  <message name="EchoRequest">
    <part name="in_str" type="xsd:string"/>
  </message>
  <message name="EchoResponse">
    <part name="result" type="xsd:string"/>
  </message>

  <portType name="EchoServer">
    <operation name="Echo">
      <input message="tns:EchoRequest"/>
      <output message="tns:EchoResponse"/>
    </operation>
  </portType>

  <binding name="EchoServer" type="tns:EchoServer">
    <soap:binding style="rpc"
                  transport=" http://schemas.xmlsoap.org/soap/http"/
<http://schemas.xmlsoap.org/soap/http%22/>>
    <operation name="Echo">
      <soap:operation soapAction="Echo"/>
 <input>
      <soap:body use="literal"/>
 </input>
 <output>
   <soap:body use="literal"/>
 </output>
    </operation>
  </binding>

  <service name="EchoServer">
    <port name="EchoServer" binding="tns:EchoServer">
      <soap:address location="
http://localhost:80/EchoServer/.py"/<http://localhost/EchoServer/.py%22/>
>
    </port>
  </service>

</definitions>
So what's the problem here? Thanks a lot!

Re: [Axis2] Problems about Axis2 client accessing ZSI(Written in Python) simple "Echo" web services

Posted by "Asankha C. Perera" <as...@wso2.com>.
Sorry wrong mailing list.. please post to axis-user@ws.apache.org or 
axis-dev@ws.apache.org

卢宾 wrote:
> Hi, all,
> ......

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org