Hi,
I'm new to Silverlight and am trying to connect my SL3 client to a Java Spring-ws(Web Service) project. The Spring-ws project I'm using specifically is the sample tutorial.
I'm having trouble when I want my Spring Web Service project to return a value. The generated Service Reference classes use System.ServiceModel.DuplexClientBase and I've tried a custom binding but its not working.
What does work is as follows:
- My Java Spring ws wsdl has a wsdl:operation of <wsdl:input> only
- Adding Service Reference via VS2008 generates my files, and I can successfully hit the Java Web Service + pass data
What does not work is:
- I change my Java Spring Web Service, so that a wsdl:operation also has <wsdl:output>
- Updating (I also deleted and re-added) Service Reference via VS2008 and my regenerated Reference.cs now has a Client class that extends from System.ServiceModel.DuplexClientBase of which I've added the System.ServiceModel.PollingDuplex Reference to my project
- ServiceReferences.ClientConfig has now blanked; I've diligently tried to work around this problem and am now trying to pass a CustomBinding as found here: http://forums.silverlight.net/forums/p/100197/251163.aspx
My new code is:
TextMessageEncodingBindingElement textMessageEncodingBindingElement = new TextMessageEncodingBindingElement();
textMessageEncodingBindingElement.MessageVersion = MessageVersion.Soap11;
textMessageEncodingBindingElement.WriteEncoding = System.Text.Encoding.UTF8;
CustomBinding binding = new CustomBinding(
new PollingDuplexBindingElement(),
textMessageEncodingBindingElement,
new HttpTransportBindingElement());
EndpointAddress endpointAddress = new EndpointAddress("http://localhost/spring-ws-reference/holidayService/holiday.wsdl");
HumanResourceClient humanResourceClient = new HumanResourceClient(binding, endpointAddress);
My error is:
My error is: Using callback contracts requires a binding with addressing version different than 'AddressingNone (http://schemas.microsoft.com/ws/2005/05/addressing/none)', or an operation in the callback contract with an Action = "*". Consider using a custom binding where the addressing version of the message encoding binding element is 'Addressing10 (http://www.w3.org/2005/08/addressing)'.
Would appreciate any suggestions!
Also as someone new to the dotnet world, one thing I would love to know is why is there such a drastic difference in code and config when changing a wsdl from input -> input + output; which to me doesn't make sense when the only fundamental difference is wanting to receive a response.
Would love to hear from any .net experts on this!
Additional info:
- I'm using VS2008 and SL3 + XP Pro
- On java server side, I'm using tomcat 6 + spring ws 1.5.9 + spring 2.5.6