I'm trying to consume a web service created in Java (XFire) from Visual Studio 2010. The service works in Visual Studio 2008 without an issue. In both cases I'm using a web reference to access the service. I've also tried svcutil.exe generate the web service consumer code and walk through it and it still will not return data.
I have access to the log4j logs and I don't see the call causing any execution on the Java side.
Does anyone know if I'm missing a setting somewhere? Or if consumption of web services via a web reference is somehow more strict in 2010.
In the below code rwsResponse is something but rwsResponse.WorkerServiceResponse is Nothing after the call to retrieveWorker:
Dim rwsService As New rws.WorkerService
Dim rwsResponse As New rws.retrieveWorkerResponse
Dim rwsRequest As New rws.retrieveWorker
rwsRequest.SearchOption = New rws.RetrieveKeyType()
rwsRequest.SearchOption.Items = New String() {userID}
rwsRequest.SearchOption.ItemsElementName = New rws.ItemsChoiceType() {rws.ItemsChoiceType.user_Id}
rwsResponse = rwsService.retrieveWorker(rwsRequest)
Dim rwsWorker As rws.EnterpriseWorkerType
Dim rwsMessage As rws.MessageType
If rwsResponse Is Nothing OrElse rwsResponse.WorkerServiceResponse Is Nothing Then
Throw New Exception(String.Format("retrieveWorkerService:WorkerServiceResponse is null{0}userID:{1}", vbCrLf, userID))
End If
What is strange is this code works fine in Visual Studio .NET 2008. Both 2008 and 2010 are targeting 3.5 for this app.
.retreiveWorker(), what is the serialized value ofrwsRequest? Is it same as in 2008? i.e. is the same value being sent to the service? You can use Fiddler for this. At the same time, you'll be able to find the response coming back. - p.campbell