Giter Club home page Giter Club logo

Comments (2)

jancel avatar jancel commented on May 20, 2024

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.

inossidabile avatar inossidabile commented on May 20, 2024

@jancel is absolutely right. That's exactly how things work.

from wash_out.

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.