HighTechTalks DotNet Forums  

Interop question for WCF Gurus

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Interop question for WCF Gurus in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Reg
 
Posts: n/a

Default Interop question for WCF Gurus - 08-29-2007 , 02:20 PM






Hello,

I have a WCF Web Service using wsHttpDualBinding because I need a callback
to Java client.

I read Mr. A.Gupta's blog that if WCF Service uses wsHttpDualBinding for
interop working is not guaranteed.

I also tried to config wsHttpDualBinding in WCF Service Config file as
follows:

<bindings>
<customBinding>
<binding name="Binding1">
<reliableSession />
<compositeDuplex />
<oneWay />
<textMessageEncoding
messageVersion="Soap12WSAddressing10"
writeEncoding="utf-8" />
<httpTransport authenticationScheme="Anonymous"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
proxyAuthenticationScheme="Anonymous"
realm=""
useDefaultWebProxy="true" />
</binding>
</customBinding>
</bindings>


A C# Client works without problems.

But when using Axis client which is a Java Standalone application following
code:

class ClientUtil
{
public static OMElement getOMElement()
{
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace(
"http://ws.apache.org/axis2/xsd", "ns1");
OMElement method = fac.createOMElement("Hello", omNs);
OMElement value = fac.createOMElement("Hello", omNs);
value.setText("Hello");
method.addChild(value);
return method;
}
}

public class Client
{
private static EndpointReference targetEPR = new EndpointReference

("http://localhost:8000/ServiceMetadata/DuplexService");

public static void main(java.lang.String args[])
{
ServiceClient sender = null;
try {
OMElement payload = ClientUtil.getOMElement();
Options options = new Options();
options.setTo(targetEPR);
options.setTransportInProtocol(Constants.TRANSPORT _HTTP);
options.setUseSeparateListener(true);
options.setSoapVersionURI(SOAP12Constants.SOAP_ENV ELOPE_NAMESPACE_URI);
//Callback to handle the response
Callback callback = new Callback() {
public void onComplete(AsyncResult result)
{
System.out.println(result.getResponseEnvelope());
}

public void onError(Exception e)
{
e.printStackTrace();
}
};

//Non-Blocking Invocation
sender = new ServiceClient();
sender.engageModule(Constants.MODULE_ADDRESSING);
sender.setOptions(options);
sender.sendReceiveNonBlocking(payload, callback);
//Wait till the callback receives the response.
while (!callback.isComplete()) {
Thread.sleep(1000);
}
//Need to close the Client Side Listener.
}
catch (Exception axisFault)
{
axisFault.printStackTrace();
}

}

a Timeout error occurs. I have Addressing library in Axis part so that can't
be a issue.

Axis client hangs in while (!callback.isComplete()) loop and Timeout error
occurs.

Can anyone point what could be the problem? I need a callback feature so,
thats why I'm using wsHttpDualBinding.

Thanks





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.