Giter VIP home page Giter VIP logo

Comments (4)

vpistis avatar vpistis commented on August 23, 2024

Ok,
I found some workaround, maybe :)
I used the python code generated yesterday using wsdl2py from soapbox github, by adding my missing complex types:

Schema_a8452 = xsd.Schema( 
    imports = [],
    targetNamespace = 'urn:PayBemoovListener',
    elementFormDefault = 'qualified',
    simpleTypes = [],
    attributeGroups = [],
    groups = [],
    complexTypes = [BuyReqResponse],
    elements = {'NotifyRequest': xsd.Element( NotifyRequest() ), 'NotifyResponse': xsd.Element( NotifyResponse() )},
 )

and I changed in:

Schema_a8452 = xsd.Schema( 
    imports = [],
    targetNamespace = 'urn:PayBemoovListener',
    elementFormDefault = 'qualified',
    simpleTypes = [],
    attributeGroups = [],
    groups = [],
    complexTypes = [BuyReqResponse, NotifyRequest, NotifyResponse],
    elements = {'NotifyRequest': xsd.Element( NotifyRequest() ), 'NotifyResponse': xsd.Element( NotifyResponse() )},
 )

and, obviously, changing the reference from soapbox to soapfish

I tested it with SoapUI using this request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:PayBemoovListener">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:NotifyRequest>
         <urn:idMerchant>1</urn:idMerchant>
         <urn:idTransactionMerchant>1</urn:idTransactionMerchant>
         <!--Optional:-->
         <urn:idUser>1</urn:idUser>
         <urn:amount>1</urn:amount>
         <urn:productCode>1</urn:productCode>
         <!--Optional:-->
         <urn:itemCode00>1</urn:itemCode00>
         <!--Optional:-->
         <urn:itemCode01>?</urn:itemCode01>
         <!--Optional:-->
         <urn:itemCode02>?</urn:itemCode02>
         <!--Optional:-->
         <urn:itemCode03>?</urn:itemCode03>
         <!--Optional:-->
         <urn:itemCode04>?</urn:itemCode04>
         <urn:requestType>1</urn:requestType>
         <urn:BuyReqResponse>
            <urn:movincomAuthId>1</urn:movincomAuthId>
            <urn:movincomCompId>1</urn:movincomCompId>
            <urn:responseCode>1</urn:responseCode>
            <!--Optional:-->
            <urn:responseDesc>1</urn:responseDesc>
            <!--Optional:-->
            <urn:category>1</urn:category>
            <!--Optional:-->
            <urn:outMessage>1</urn:outMessage>
         </urn:BuyReqResponse>
         <urn:executionCode>1</urn:executionCode>
         <urn:executionDesc>1</urn:executionDesc>
         <urn:mac>1</urn:mac>
      </urn:NotifyRequest>
   </soapenv:Body>
</soapenv:Envelope>

and this is the response:

<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
   <ns0:Body>
      <ns0:NotifyResponse xmlns:ns0="urn:PayBemoovListener">
         <ns0:responseCode>0</ns0:responseCode>
      </ns0:NotifyResponse>
   </ns0:Body>
</ns0:Envelope>

It seem the listener responds correctly :)
This is the python generated from soapbox wsdl2py: https://drive.google.com/open?id=0B0uiGluEWZlOc05MOWZVR2s2bkk&authuser=0

What's the difference from soapbox? At this point, IMHO, seems to be only the wsdl2py script?
soapbox wsdl2py works correctly, but soapfish wsdl2py not!
It's right?

Thanx a lot!
Vale

from soapfish.

FelixSchwarz avatar FelixSchwarz commented on August 23, 2024

First of all I find it a bit hard to understand what the problem is here exactly. Can you please post the reference WSDL you used to generate the source? I need somehow a way to reproduce your issue easily.

Ideally you would send a unit test (or a single Python file which clearly demonstrates the problem) but I realize that this might be quite complicated. So the next best thing is having the original WSDL and also the code you are currently using (for example in a temporary git repo).

from soapfish.

vpistis avatar vpistis commented on August 23, 2024

Oooops.... I found my error :P
I forgot to implement the operation method, it returns an object instead of an instance of object...

sorry, sorry, sorry...

from soapfish.

FelixSchwarz avatar FelixSchwarz commented on August 23, 2024

This might be a problem from the code generation. As it is very hard to generate a valid response I guess we could implement something like return SOAPError(..., 'not implemented) to avoid similar problems.

from soapfish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.