views:

1166

answers:

2

Hi,

i have local WSDL file. i tried to create JAX-WS Web service client which is available by default in Netbeans. But there are problems in accessing the service. So i tried to create Axis Web Service client by installing the plugin.

But i don't find any way to import the WSDL and access the services available like JAX- WS Style.

I have looked at Create Axis Service from WSDL option but when i import the WSDL i don't find any method available

How can i import and access the WSDL in Netbeans using Axis?

EDIT:

The problem is not in accessing, i was successful in invoking the services but in few services i wasn't able to find one method that is part of the service. However when i tried the same in C# environment i was able to find all the method. So that's the reason i was moving to Axis

A: 

I Agree with Pascal comment here, moving to another stack might not solve your problems. Also I suggest not creating the web service client with Netbeans wizard but using the jax-ws wsimport commands (part of any java SDK). You can use this ant task:

<target name="wsimport" depends="" description="create client code">
    <exec executable="C:\Program Files\Java\jdk1.6.0_16\bin\wsimport">
        <arg line="-d ${basedir}/bin -keep -p com.ttt.client.ws -s ${basedir}/src  wsdl/wsdlfile.wsdl -b wsdl/wsdlfile.xsd"/>
    </exec> 
</target>

Or just run the command from a shell/cmd.

Tal
May i know why your suggesting me not to use Netbeans wizard? it seems pretty easier to create in netbeans
Sri Kumar
I used it long time ago and it didn't work for me.Ended up with this kind of ant script (which is quite simple to implement/run).
Tal
+1  A: 

You can also try creating the service through soapUI. Moreover if you are in an early phase of deciding which web service framework to use, you can also consider CXF instead of Axis.

EDIT: In soapUI from the tools menu you can create artifacts for JAX-WS, Axis, CXF etc.

Ravi Gupta
soapUI seems to be a testing tool. How can i use it to invoke web service and program in Java?
Sri Kumar
i am really new and i don't know to use it. Can you please point me to any tutorial please
Sri Kumar
You can start from http://www.soapui.org/gettingstarted/index.html soapUI is fairly easy to learn and use.
Ravi Gupta