Ask the WSIT/Project Tango Experts

As mentioned earlier, Ask the WSIT Experts (Web Services Interoperability Technologies, aka Project Tango) is now live!

Please start shooting your questions and we are ready.

Technorati: wsit tango webservices glassfish

Comments:

Guys, I wonder if you could help me out with this. I am trying to integrate MS WCF service with Jax-WS client. On Java side I use JDK 6.0. I generated all the webservice artifacts for my Java client and I tested it successfully with my WCF service that implements BasicHttpBinding. Then I wanted to use WCF with WSHttpBinding. I regenerated Java webservice artifacts but the Java client was unable to call the WCF service any more. After doing some digging I found out that Java client does not send To and Action headers to the WCF service and therefore the latter drops the call. To be more specific, WCF reported the following error: The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree The problem seems to be related to WCF's using WS-Addressing policy. So my question is - what is the right (or easiest) way to handle this problem? Thanks, Dmitriy

Posted by Dmitriy on May 11, 2007 at 07:02 AM PDT #

Hi Dmitriy, Please follow the instructions specified at: http://blogs.sun.com/arungupta/entry/wcf_interop_workaround_for_incorrect Basically you need to specify @WebMethod/action on each operation.

Posted by Arun on May 15, 2007 at 01:49 PM PDT #

I used WCF with NetBeans 5.5.1. and it works fine. but I had some objects which is JAXBElement<T>. to avoid using this I used wsimport util and had an extra file xxxx.xml. what I need if there is any way to use this util without installing glassfish? and should I install classfish to generate proxy classes? Thanks Khalid Jayoussi

Posted by Khalid Jayoussi on July 21, 2007 at 05:36 PM PDT #

Khalid, JAX-WS is part of Metro - the Web services stack in GlassFish. Even though that is the recommended way to obtain JAX-WS, you implementation is also can also download stand-alone bundle at http://jax-ws.dev.java.net. This has no dependency on GlassFish and can be installed on Tomcat as well.

Posted by Arun Gupta on July 21, 2007 at 10:30 PM PDT #

well, when I generated the proxy classes most of DataContracts are binded through JAXBElement<T>. is there any tutorial to use these binding. I dont prefer to use internal or external custumization binding. Thanks Khalid Jayoussi

Posted by Khalid Jayoussi on July 22, 2007 at 04:42 PM PDT #

well, when I generated the proxy classes most of DataContracts are binded through JAXBElement<T>. is there any tutorial to use these binding. I dont prefer to use internal or external custumization binding. Thanks Khalid Jayoussi

Posted by Khalid Jayoussi on July 22, 2007 at 09:44 PM PDT #

Khalid, http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html provides more details on the usage of JAXBElement and why it is generated.

Posted by Arun Gupta on July 22, 2007 at 11:11 PM PDT #

I need to consume my WCF service using Eclipse. but I dont know how to start. is there any tutorial shows how to consume a service using eclipse. Thanks Khalid Jayoussi

Posted by Khalid Jayoussi on July 24, 2007 at 07:56 PM PDT #

I need to consume my WCF service using Eclipse. but I dont know how to start. is there any tutorial shows how to consume a service using eclipse. Thanks Khalid Jayoussi

Posted by Khalid Jayoussi on July 24, 2007 at 08:00 PM PDT #

Khalid, AIU Eclipse allows to invoke a Web service endpoint using Axis runtime only. I'm not sure how much Axis has been tested for interop with WCF. And moroever, as with any Web services stack, you can develop/deploy a variety of services in WCF as well. In a previous blog I talked about how a JAX-WS compliant endpoint can be deployed. But only NetBeans allows to invoke such an endpoint. And since Metro, the Web services stack in GlassFish, has been extensively tested with WCF I recommend to use NetBeans to invoke such an endpoint. Please post if you find out the steps with Eclipse.

Posted by Arun Gupta on July 24, 2007 at 11:01 PM PDT #

how can I install and use AXIS runtime. Thanks Khalid Jayoussi

Posted by Khalid Jayoussi on July 25, 2007 at 12:26 AM PDT #

All the information should be available on: http://ws.apache.org/axis/. However if you are interested, then I published two blog entries:

Posted by Arun Gupta on July 25, 2007 at 12:44 AM PDT #

Hi,
I have 2 WCF services. let us call them Service1 and Service2. In each service there is the Same data contract (DataContract1).

now in service1 there is an operation contract
MyOperation(DataContract1 data).

then I get the proxy classes in netbeans5.5.1 for both services, I need the returned datacontract1 from service2 to be passes to MyOperation. but it gives me incompatable types. how can I resolve this problem. is there any way to share these data between the 2 services. in other words is there any way to generay 1 datacontract for both service when we generate the proxy classes.

Posted by Khalid Jayoussi on August 14, 2007 at 01:29 AM PDT #

any one can help please?

Posted by Khalid Jayoussi on August 17, 2007 at 04:08 PM PDT #

Khalid, If you can share your exact WCF code then I'll work on a solution for you.

Posted by Arun Gupta on August 19, 2007 at 08:40 AM PDT #

can I send you the whole java project.
if yes I will send it via email ok?

Posted by Khalid Jayoussi on August 20, 2007 at 03:00 AM PDT #

I can create the Java client, I need to know the WCF code.

Posted by Arun Gupta on August 20, 2007 at 05:17 AM PDT #

you can find the code here
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2010823&SiteID=1

Thanks
Khalid Jayoussi

Posted by khalid jayoussi on August 20, 2007 at 04:26 PM PDT #

Khalid,

Just curious, why do you duplicate the DataContract in both the services ? Can you not create a separate class for DataContract and then use it in both the ServiceContracts ?

Posted by Arun Gupta on August 21, 2007 at 07:16 AM PDT #

Hello Arun. the problem is that each service
will work seperatly. but the two services can work together. in other world, if you add one service it will work fine alone. and if you add the other service it will work fine two.

these service i will redistrubute it. and my customers will consume these two services.
thats why I cant create separate class. because the customer will be responsible to generate theses classes not me, nad i need to solve this issue for them.

Posted by Khalid Jayoussi on August 21, 2007 at 02:11 PM PDT #

My java client was working well with .Net WCF Services using basicHttpBinding but now when switched to wsHttpBinding it fails on the server side i get the following exception :
Exception Type: System.ServiceModel.ActionMismatchAddressingException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message: The SOAP action specified on the message, '', does not match the HTTP SOAP Action, 'http://tempuri.org/IFileOperation/AuthenticateUser'.

Can anyone please help?

Posted by Prashant Majhwar on October 03, 2007 at 02:52 AM PDT #

Prashant, can you share the WSDL generated by .NET ?

Posted by Arun Gupta on October 03, 2007 at 02:56 AM PDT #

I found the solution. Netbeans 6 was by default loading the jax-ws 2.1 libraries when webservice client was generated so we forced the wsit related libraries to be loaded and it worked !!

Posted by Prashant Majhwar on October 16, 2007 at 12:59 AM PDT #

Hello Arun. the problem is that each service
will work seperatly. but the two services can work together. in other world, if you add one service it will work fine alone. and if you add the other service it will work fine two.

these service i will redistrubute it. and my customers will consume these two services.

Posted by laptop batteries on November 26, 2008 at 12:47 PM PST #

Prashant, we are facing the same issue, can provide more details on
"forced the wsit related libraries to be loaded and it worked !!"

Posted by SH on October 11, 2011 at 03:50 PM PDT #

Post a Comment:
Comments are closed for this entry.
About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today