You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see the values for following xsi:type are rendered wrongly tns:user instead of tns:userInfo tns:homeAddress instead of tns:address tns:workAddress instead of tns:address
Am I doing something wrong or is this a bug?
Thank You very much
Regards
Karthik
The text was updated successfully, but these errors were encountered:
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.
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.
Hi,
Here is an simple example code to illustrate my problem
Generated WSDL Snippet
Rendered XML Response
As you can see the values for following xsi:type are rendered wrongly
tns:user instead of tns:userInfo
tns:homeAddress instead of tns:address
tns:workAddress instead of tns:address
Am I doing something wrong or is this a bug?
Thank You very much
Regards
Karthik
The text was updated successfully, but these errors were encountered: