Please try it with Axis 1.4.

On 10/18/06, Andreas Schöller <[EMAIL PROTECTED]> wrote:
Hello axis developers,

while trying to access a axis-driven webservice using the ZSI-modul
from python i ran into some problems. I reported back to the python-
developing team as i believed the cause of trouble to be somewhere
inside the python code that processes/deserializes the SOAP-answer.
Joshua Boverhof reviewed my bug-report and explained to me that the
generated SOAP-answer is incorrect according to the SOAP-specs. He
suggested to file another bug-report to you. Before i'll do so, i
follow the advice from the your website and ask here if this issue is
already fixed in the current axis-release. The axis-engine on the
server-side was/is this :
<!--WSDL created by Apache Axis version: 1.2RC3 Built on Mar 28, 2005
(10:34:47 CEST)-->
taken from the WSDL-description.
I put in here the relevant parts and leave out some lines python-code.
The full bug-report is here [ https://sourceforge.net/tracker/?
func=detail&atid=387667&aid=1564784&group_id=26590 ]. The team that
developed the Wortschatz-Service at the uni-leipzig provides a java-
client-app which can handle the SOAP-answers without any problem. The
request/response-xml grabbed with tcpdump is included.

Thanks for reviewing and pls cc to my address 'cos i'd like to
unsubscribe from the list soon and i've not yet found a html-
interface for it.

Greets, A. Schoeller

<Joshuas comment>

> Comment By: Joshua Boverhof (boverhof)
>
Date: 2006-10-18 18:16

Message:
Logged In: YES
user_id=711996

I hate pointing out that it's a bug in Axis but here goes:

I get the same exception, ZSI appears to correctly generate this code:

     class DataMatrix_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
         schema = "urn:Baseform"
         type = (schema, "DataMatrix")
         def __init__(self, pname, ofwhat=(), attributes=None,
extend=False,
restrict=False, **kw):
             ns = ns0.DataMatrix_Def.schema
             TClist = [GTD("http://
datatypes.webservice.wortschatz.uni_leipzig.de","DataVector",lazy=False)
(pname=(ns,"dataVectors"), aname="_dataVectors", minOccurs=1,
maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get
("encoded"))]

However Axis is putting the local element declaration "DataVector" in
the
namespace that the type is defined, which is incorrect.

So ZSI is doing the "correct" thing.

Axis is just sloppy about how it handles instance namespacing for local
element declarations when "elementFormDefault" is true.

I'd really appreciate if you'd file a bug report for Axis, you could
just copy and
paste bug report.

Here is a reference, I checked to make sure:
"Definitive XML Schema", Priscilla Walmsley pg. 445-447

</Joshuas comment>

----------------------------------------------------------------------

<bug-report at sourceforge>

Summary: ZSI latest fails on parsing SOAP Response

Service-Name : Baseform
wdsl-used : http://wortschatz.uni-leipzig.de/axis/services/Baseform?wsdl
overview here : http://wortschatz.uni-leipzig.de/axis/servlet/
ServiceOverviewServlet
hmtl-frontend : http://wortschatz.uni-leipzig.de/

<Code used 'leipzig2.py'>
import sys

from ZSI import TC
from BaseformService_services import *
from BaseformService_services_types import *

loc = BaseformServiceLocator()
kw = { 'tracefile' : sys.stdout, "auth" : ( 1 , "anonymous" ,
"anonymous" ) }
portType = loc.getBaseform(**kw)

class Holder:pass

# // Version A
#
dataRow = ns1.DataVector_Def( "DataVector").pyclass()
dataRow._dataRow = ["Wort","rannte"]

matrix = ns0.DataMatrix_Def("DataMatrix").pyclass()
matrix._dataVectors = []
matrix._dataVectors.append( dataRow )

oRP = ns0.RequestParameter_Def("RequestParameter").pyclass()

oRP._corpus = "de"
oRP._parameters = matrix
req = executeRequest()
req._objRequestParameters = oRP
#
# // end of Version A

response = portType.execute( req )
print response
sys.exit('not dead ?')
</Code used>

<good request XML-generated by ZSI>
...
<ns1:objRequestParameters xsi:type="ns1:RequestParameter">
        <ns1:corpus xsi:type="xsd:string">de</ns1:corpus>
        <ns1:parameters xsi:type="ns1:DataMatrix">
                <ns1:dataVectors xmlns:ns2="http://
datatypes.webservice.wortschatz.uni_leipzig.de"
xsi:type="ns2:DataVector">
                        <ns2:dataRow xsi:type="xsd:string">Wort</ns2:dataRow>
                        <ns2:dataRow xsi:type="xsd:string">rannte</ns2:dataRow>
                </ns1:dataVectors>
        </ns1:parameters>
</ns1:objRequestParameters>
...
</good request XML-generated by ZSI>


<?good response? generated by axis-engine>

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<soapenv:Body>
<executeResponse xmlns="urn:Baseform">
        <executeReturn>
                <executionTime>0.012 s</executionTime>
                <result>
                        <ns1:dataVectors xsi:type="ns2:DataVector" 
xmlns:ns1="http://
datatypes.webservice.wortschatz.uni_leipzig.de"
xmlns:ns2="urn:Baseform">
                                <ns1:dataRow>rennen</ns1:dataRow>
                                <ns1:dataRow>V</ns1:dataRow>
                                </ns1:dataVectors>
                </result>
        <serviceMagnitude>0</serviceMagnitude>
        <userAmount>2102808448</userAmount>
        <userMaxLimit>-100</userMaxLimit>
</executeReturn>
</executeResponse>
</soapenv:Body>
</soapenv:Envelope>

</?good response? generated by axis-engine>

The problem seems to be around the 'result' section :

EvaluateException: Element "_dataVectors" missing from complexType
[Element trace: /soapenv:Envelope/soapenv:Body/executeResponse/
executeReturn/result]
WARNING: Failure executing file: <../../../leibzig2.py>
</traceback>
</bug-report at sourceforge>









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



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

Reply via email to