Comments (2)
It looks like Address (both work and home) are the same type tns:address in your wsdl. The attribute names are workAddress and homeAddress. The type, properly defined in the wsdl is Address. A consumer would properly map this to myUser1.homeAddress.street and myUser1.workAddress.street.
Is there a particular consumer giving you problems (Java introspection, .Net, SoapUI)? I have to get better at reading wsdls, but what you have looks as if it would work in Java and SoapUI.
tns:users is a variable name, not the type, in your case this is an array of UserInfo. The WSDL is responsible for telling your cliient this. Each work address, home address and user id is a type UserInfo as defined in the WSDL.
<part type="tns:userInfo" xsi:minOccurs="0" name="users" xsi:maxOccurs="unbounded"/>
Notice the TYPE definition there is userInfo. Your consumer will reference this to determine the proper consumption of the data you provided. The name matches the variable name in your provider. You can change this name, I believe it's entirely up to you.
If you introspect and consume your wsdl, there would be 2 types (UserInfo and Address). users is an array of UserInfo. In Java, if I were to dynamically introspect and consume this service, I could access everything programmatic like this.
--Pseudo
response = execute_service
for (user in response.users)
// user is of Type UserInfo
// user.workAddress is of type Address
// user.homeAddress is of type Address
user.workAddress.street; // would do something with the users work street
// user.userId is a string attribute on UserInfo type
This is just as you have defined it in your WashOut::Types.
-- If this is too winded or repetitive, I apologize. It does look like it is working as intended based on inspection of code, and wsdl. To me.
from wash_out.
@jancel is absolutely right. That's exactly how things work.
from wash_out.
Related Issues (20)
- Please release 0.12.0 of gem HOT 2
- Duplicate use of `data` type name. Consider using classified types. HOT 2
- WSDL file not getting generated
- Append "Request" to the input name ?
- Map XML arguments (XSD) to ruby class HOT 1
- Handling duplicate elements in soap request HOT 3
- How to handle multiple namespaces in wash_out gem
- HTTPS protocol HOT 1
- Collection Type in Args HOT 1
- Enable MTOM
- Receive the value and attributes in the same label HOT 2
- Changing xsi:type for arrays
- Receive attachments with wash_out HOT 2
- WS Security support HOT 2
- Usability: Can we log the call XML?
- wsse_auth_callback: Code vs Documentation HOT 1
- Could not reach the SOAP API action through washout gem HOT 1
- Bad call to route formatter on Rails 5 (WashOut::Router.url)
- Does WashOut::SOAP not work on Rails 6? HOT 1
- How can I skip wsse_auth_callback on certain actions?
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 wash_out.