0

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#

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

yeah, you're right, I didn't realize that the domain classes are generatet in a single file, thanks
@k-deux maybe you can add some annotations to returned classes to tell the WSDL generator to take them into consideration? or create some intermediary structures? if that wont help I have no further ideas.
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.