Posted by hardik_acharya
on August 4, 2009 at 7:03 AM PDT
I am new to Java. I am trying to develop a java client which can consume WCF web service (hosted on IIS).
Following is the summary of settings in WCF web service.
Binding = wsHttpBinding
Security Mode = Message
Client credentials = UserName
I want to supply user name and password dynamically inside the code.
I am using following environment
1. NetBeans IDE 6.5.1 (Build 200903060201)
2. GlassFish V3 Prelude (installed Metro Web service stack 1.4 using this link: http://weblogs.java.net/blog/bhaktimehta/archive/2008/11/working_with_me... )
3. WCF Service using Microsoft Dot Net framework 3.5 (VS2008)
I have created certificate using makecert command and then imported in keystore using keytool.exe
[Referring this link: http://blog.csdn.net/marvion/archive/2009/03/23/4015785.aspx ]
While running this in java client I am getting following errors
In java client
1. Client machine is different then server machine
The server sent HTTP status code 502: Proxy Error (The specified network name is no longer available.)
2. Client and server on same machine
java.net.SocketException: Connection reset
javax.xml.ws.WebServiceException: java.net.SocketException: Connection reset
In WCF Service log:
System.ServiceModel.ActionMismatchAddressingException, System.ServiceModel, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b77a5c561934e089
The SOAP action specified on the message, '', does not match the HTTP SOAP Action, 'http://tempuri.org/IJAX/TestHello'.
The system works properly with .Net client but it is not working with java client.
I checked that it works if I use basicHttpBinding also but not working with wsHttpBinding.
I am attaching WCF server code and java client code. Could anyone please point my mistake?
Thanks in advance.