开发者

Using Axis to generate a web service implementation that calls another web service

I need to provide an implementation of a web service for which I have the WSDL, to run under Weblogic 9.2.

I aim to use the Axis (1, not 2) tools for this , having tried and failed to make it work with thw weblogic web service generation tools (due to an inability to set the authentication - see my other question here),

This web service need开发者_JAVA技巧s to make calls to another web service (for which I also have the WSDL).

I can use the Axis tools to generate the client stubs etc.

But how do I do the two in combination? Is there a tutorial or other step by step guide? I have googled and found some mailing list postings, but they're about specific issues.

If someone's done it, could they share the relevant parts of their build.xml for this?

If I used the weblogic web service generation tools, there's a tool that in one go generates the skeleton implementation of the web service and the client stubs for the web service it calls - is there something similar in Axis?

Any gotchas if I just try to mash up the skeleton and client generation output from WSDL2Java?

Update:

Got this to work.

Used the Eclipse tools to build the client, then the service, allowing the second to overwrite the duplicate files from the first. We then had some issues with the client_deploy.wsdd file (see my other question How do I refer to a client_deploy.wsdd file that's in WEB-INF?) and with jar versions (needed to update the jars that Axis uses to newer version), then it just worked.


Speaking for axis2, you can create the client stub like this (I reckon axis1 is not much different):

/wsdl2java.sh -uri webservice.wsdl -p com.your.client.package -d adb -s -o output_folder_client

Once you have the client package you should be able to use it in your own webservice implementation by just importing it, creating a client instance and submitting requests.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜