![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I am creating a webservice which will be consumed by a 3rd party, non dotnet client. I want to return a custom datatype from my webservice. It's a relatively simple Customer object which just contains strings. eg: [WebMethod] public Customer GetCustomer(int custId) { return new Customer(); } now, my Customer class is defined as follows: [Serializable] public class Customer { // properties are forename, surname, title, address etc (all strings) } My question is this...when I expose this webmethod the clients do not see any of the Customer type definition in the WDSL, so they don't actually know what data they are getting back. Am I missing something here? I was expecting the Customer object structure to be present in the WDSL? |
#3
| |||
| |||
|
|
"Robbo" <robinsonpr (AT) aol (DOT) com> wrote in message news:eC61DLH1HHA.1168 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Hi, I am creating a webservice which will be consumed by a 3rd party, non dotnet client. I want to return a custom datatype from my webservice. It's a relatively simple Customer object which just contains strings. eg: [WebMethod] public Customer GetCustomer(int custId) { return new Customer(); } now, my Customer class is defined as follows: [Serializable] public class Customer { // properties are forename, surname, title, address etc (all strings) } My question is this...when I expose this webmethod the clients do not see any of the Customer type definition in the WDSL, so they don't actually know what data they are getting back. Am I missing something here? I was expecting the Customer object structure to be present in the WDSL? Have you looked at the generated WSDL? It will contain a definition of a complex type which is equivalent to the Customer type that you are returning. -- John Saunders [MVP] |
#4
| |||
| |||
|
|
Thanks John, it was indeed! I wonder if you can help regarding webservices and exceptions? I have given the WSDL to my integration team and they are saying it needs a "fault" element. |
#5
| |||
| |||
|
|
"Robbo" <robinsonpr (AT) aol (DOT) com> wrote in message news:uA$FPiB5HHA.5212 (AT) TK2MSFTNGP04 (DOT) phx.gbl... Thanks John, it was indeed! I wonder if you can help regarding webservices and exceptions? I have given the WSDL to my integration team and they are saying it needs a "fault" element. Already answered. -- John Saunders [MVP] |
#6
| |||
| |||
|
|
Hi there John I couldn't see an answer to the "fault" query, apart from a reply from Nathan Anderson on the webforum saying it is not supported by ASPX. Is this the answer you are referring to? Thanks, Paul "John Saunders [MVP]" <john.saunders at trizetto.com> wrote in message news:uH9ss1E5HHA.3716 (AT) TK2MSFTNGP03 (DOT) phx.gbl... "Robbo" <robinsonpr (AT) aol (DOT) com> wrote in message news:uA$FPiB5HHA.5212 (AT) TK2MSFTNGP04 (DOT) phx.gbl... Thanks John, it was indeed! I wonder if you can help regarding webservices and exceptions? I have given the WSDL to my integration team and they are saying it needs a "fault" element. Already answered. -- John Saunders [MVP] |
#7
| |||
| |||
|
|
Yes. -- John Saunders [MVP] "Robbo" <robinsonpr (AT) aol (DOT) com> wrote in message news:OYW%23btO5HHA.2752 (AT) TK2MSFTNGP06 (DOT) phx.gbl... Hi there John I couldn't see an answer to the "fault" query, apart from a reply from Nathan Anderson on the webforum saying it is not supported by ASPX. Is this the answer you are referring to? Thanks, Paul "John Saunders [MVP]" <john.saunders at trizetto.com> wrote in message news:uH9ss1E5HHA.3716 (AT) TK2MSFTNGP03 (DOT) phx.gbl... "Robbo" <robinsonpr (AT) aol (DOT) com> wrote in message news:uA$FPiB5HHA.5212 (AT) TK2MSFTNGP04 (DOT) phx.gbl... Thanks John, it was indeed! I wonder if you can help regarding webservices and exceptions? I have given the WSDL to my integration team and they are saying it needs a "fault" element. Already answered. -- John Saunders [MVP] |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |