k-deux
k-deux

Reputation: 493

SOAP with Java and C# - Clientside Object Handling

When I use SOAP, can I have complex datatypes as returnvalues or parameters

example:

@WebMethod(operationName = "getMyDataType")
public MyDataType getMyDataType(@WebParam(name = "username") String username, @WebParam(name = "password") String password) {  return new MyDatatype(bla)}

and if yes, how can the client work with the "unknown" types?

my server is in Java and the Client in c#

Upvotes: 0

Views: 206

Answers (2)

KeithS
KeithS

Reputation: 71565

It should work both ways. What will happen is that the IDE (or you) will create a custom type in each language that can be serialized/deserialized into SOAP XML. I know VS will auto-generate classes from a WSDL; Java doesn't have one specific dev environment, but I would suspect some of the more popular ones like Eclipse might.

Like HTML, SOAP is an open standard specifically designed to allow differing implementations of the standard to work with each other. I have no doubt you can get this to work; I'm just a bit light on the Java specifics.

Upvotes: 0

wesoly
wesoly

Reputation: 552

This should be possible, although I haven't tried it: You can try to generate WSDL from annotated Java class and later from the WSDL file generate client C# code.

Upvotes: 1

Related Questions