Hi All,
I have an integration problem to consume WCF Web Service from Axis2 generated
Stub. First I tried with basicHttpBinding, it works:
<configuration>
<system.serviceModel>
<services>
<service name="WCFService.SimpleAuthentication"
behaviorConfiguration="simpleAuthentication">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8002/TestAuthenticationService"
/>
</baseAddresses>
</host>
<endpoint
address="basicHttp"
binding="basicHttpBinding"
bindingNamespace="http://security.common.rpo.ia.yokogawa.com"
contract="WCFService.IAuthentication" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="simpleAuthentication">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
After that, I changed the binding in WCF to wsHttpBinding:
<configuration>
<system.serviceModel>
<services>
<service name="WCFService.SimpleAuthentication"
behaviorConfiguration="simpleAuthentication">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8002/TestAuthenticationService"
/>
</baseAddresses>
</host>
<endpoint
address="wsHttp"
binding="wsHttpBinding"
bindingNamespace="http://security.common.rpo.ia.yokogawa.com"
contract="WCFService.IAuthentication" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="simpleAuthentication">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
I have generated the Stub and I am sure that I didn't do something wrong, this
is the exception that I get:
2009-09-11 15:45:17,949 [m://localhost#1] INFO HTTPSender
- Unable to sendViaPost to
url[http://localhost:8002/TestAuthenticationService/wsHttp]
org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found
at
org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:295)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:389)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at
com.yokogawa.ia.rpo.common.security.SimpleAuthenticationStub.authenticate(SimpleAuthenticationStub.java:181)
at
com.yokogawa.ia.rpo.activemq.jaas.RpoLoginModule.login(RpoLoginModule.java:126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.access$000(Unknown Source)
at javax.security.auth.login.LoginContext$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
at javax.security.auth.login.LoginContext.login(Unknown Source)
at
org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)
at
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:89)
at
org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:679)
at
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305)
at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179)
at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
at
org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:205)
at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
May I know is that possible for Axis2 to consume wsHttpBinding in WCF? What
should I do in order to fix this problem? If not possible is there any other
alternative way to consume WCF Web Service from Java, like using Sun Tango?
Thanks!
Yours,
Ng Pei Jiun
R &D Engineer
Yokogawa