Reputation:
I have to communicate (using .NET) with a web service running on Axis 1.2. Using two .NET tools and the WSDL I have created C# proxies however I ran into problems such that:
1) WSDL.exe created a proxy which lacks input parameters for methods. e.g. if there should be such a method:
AReturnType AMethod(AnInputType);
the created proxy had such a method:
void AMethod();
2) I've read that instead of WSDL.exe, SVCUTIL.exe is recommended. So I've created the proxies with SVCUTIL, however ran into the infamous problem of NULL returned objects. Unfortunately I could not find any suitable solution.
So I am willing to do the setup manually. Here's what I have:
So what do you suggest? Is there a way to manually create the proxy somehow? Or can generated Java code help me somehow?
Upvotes: 0
Views: 5526
Reputation: 5234
Here's how a project I'm working on creates and uses a manual proxy.
This is the client proxy:
[ServiceContract(Name = "YourServiceContract", Namespace = "http://....")]
public interface YourServiceContract,
{
[OperationContract]
object GetObject(object searchCriteria);
}
public class YourClient : ClientBase<YourServiceContract>, YourServiceContract
{
public YourClient (){ }
public YourClient (string endpointConfigurationName)
: base(endpointConfigurationName){ }
public object GetObject(object searchCriteria)
{
return base.Channel.GetObject(searchCriteria);
}
}
This is how it's called:
public void GetYourObject(object searchCriteria)
{
YourClient proxy = new YourClient();
proxy.GetObject(searchCriteria);
proxy.SafeClose();
}
Upvotes: 1
Reputation: 6806
There is a set of predefined interop bindings that connect WCF clients with services in the Java world.
Upvotes: 0
Reputation: 2670
Have a look at this answer. Will allow you to make an HttpRequest directly:-
Upvotes: 0