Comments (4)
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.
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.
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.
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)
- Refactor handling of location rewriting. HOT 3
- wsdl2py with imported xsd fails HOT 4
- Do not import base namespaces HOT 5
- Remote imports are handled as local files HOT 2
- Named XSD Element with unnamed complexType child generates invalid python. HOT 4
- wsdl2py jinja2 template not found HOT 3
- Add template file extensions. HOT 1
- Round trip through wsdl2py and py2wsdl should be consistent.
- Create <wsdl:documentation> and <xs:documentation> from docstrings and vice versa
- Python code generation behaviour when dealing with invalid WSDL HOT 1
- Repetition in xs:pattern broken by string formatting.
- wsdl2py failing HOT 2
- Fix Github parent child relationship with FlightDataServices/Soapfish HOT 5
- wsdl2py should mangle python keywords and reserved symbols HOT 4
- soapfish.xsd.Time is missing HOT 1
- wsdl2py throws AttributeError: 'Part' object has no attribute 'split' error HOT 1
- Multiples schema fail to validate in server mode HOT 1
- Client connection to a SOAP service with authentication
- After Enumeration a comma is missing when generating a client code from a locally saved WSDL file
- AttributeError: 'str' object has no attribute 'Service' HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from soapfish.