Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

Consume .net webservice

Thread view: 
Peter K - 28 Jun 2007 14:06 GMT
Hi,

I have a webservice written in c#, which I now want to consume from a
java application.

In the .net world it is relatively simple to use Microsoft's visual
studio IDE to automatically generate all the interface and data classes
for accessing a webservice. But I haven't successfully achieved this in
java yet - I hope I can get some help here...

I am using the Eclipse IDE and have looked at XFire and JAXWS, but
haven't managed to get them to work properly yet.

JAXWS complains with some warnings:

[WARNING] src-resolve: cannot resolve the name 's1:guid' to a(n) 'type
definition' component.

[WARNING] SOAP port "MyWSSoap12": uses a non-standard SOAP 1.2 binding

and in the generated source there is an error:

@WebEndpoint(name = "MyWSSoap")
public MyWSSoap getMyWSSoap(WebServiceFeature... features) {

Where "WebServiceFeature..." is unknown to the compiler.

XFire generates some classes with a whole lot of stub methods which just
throw UnsupportedOperationExceptions.

Can anyone give me some hints on an easy way to import WSDL data and
generate the necessary classes for accessing a webservice via java?

Thanks,
Peter
Manish Pandit - 28 Jun 2007 20:08 GMT
> Hi,
>
[quoted text clipped - 31 lines]
> Thanks,
> Peter

Hi,

I use eclipse with WTP (Web Tools Platform) which supports WSDL
import. Right click the WSDL and it will give you options to generate
test client, stubs etc. It will even give you a test GUI (Web Services
Explorer) where in you can populate the SOAP request and send it to
the endpoint and view the SOAP response.

http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceExplor
er/WebServiceExplorer.html


-cheers,
Manish
Arne Vajhøj - 01 Jul 2007 01:55 GMT
> I have a webservice written in c#, which I now want to consume from a
> java application.
[quoted text clipped - 6 lines]
> I am using the Eclipse IDE and have looked at XFire and JAXWS, but
> haven't managed to get them to work properly yet.

Axis comes with a command line tool WSDL2Java that works very
much like the .NET wsdl utility.

There are also an ant task, so if you are using ant for build,
then you are all set.

I think you can get a plugin to Eclipse that makes you do it
from within Eclipse similar to Visual Studio.

Arne
Twisted - 01 Jul 2007 07:13 GMT
> Hi,
>
> I have a webservice written in c#, which I now want to consume from a
> java application.

Consume ... yes ... yes ... consume ... Consume .NET service! CONSUME!
EAT! CRUSH! DESTROY! DESTROY .NET SERVICE! CONSUME IT, MY CREATION,
AND GROW STRONGER! TOGETHER WE SHALL ELIMINATE THE MIGHTY MICROSOFT
THREAT! TOGETHER WE SHALL RULE THE WORLD! MUAHAHAHAHAHA!

Er, yeah, go kill that evil Microsoft dreck, and bring me back its
steaming entrails.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.