.net 上 调用 java 的 webservice
有没有哪位兄弟在用.net调用java写的webservice?
我现在想在.net下调用pdf 7.0的api,但是这些阿api都是j2ee的,
pdf 7.0的开发文档告诉我先创建一个.net client:
1. From the Microsoft .NET Visual Studio development environment, reference the SoapClient.dll file.
2. Add the following import statement to your Microsoft .NET project:
using SoapClient ; // C# syntax
3. Use the FSSoapClient constructor to create a FSSoapClient object:
FSSoapClient formServer = new FSSoapClient(); // C# syntax
4. Set the SOAPClient object’s SOAP end point by calling the setSoapEndPoint method:
formServer.setSoapEndPoint("http://<AppServer>:<AppPort>/FormServerWS/
services/AdobeFSService"); //C# syntax 这里是不是就是引用java写的webservice的地址?
1、2、3已经知道是怎么回事了,4不知道是怎么回事!
http://<AppServer>:<AppPort>/FormServerWS/services/AdobeFSService 这个地址不知道怎么写!
我想应该是的吧!java的包已经有了,但是我不知道哪个才是上面的要引用的webservice,怎么才能找到呢?
这个文档是写给java人看的,我想问一下,假如我已经可以调用它的webservice了,下面的开发方法应该可以参照java的代码了吧! 问题点数:90、回复次数:36Top
1 楼zhanqiangz(闲云野鹤-Overriding)回复于 2005-11-23 10:00:54 得分 5
没有这么干过,纯粹猜测.
http://<AppServer>:<AppPort>/FormServerWS/services/AdobeFSService
http://服务器地址或者名称(主机名):端口号/ws项目名称/目录/ws
下面你就应该看formServer有什么属性了,最重要的还是看formServer的用法.
Top
2 楼jinjazz(近身剪)回复于 2005-11-23 10:01:06 得分 2
没用过,帮不上:(Top
3 楼pxjhy(蒋华莹)回复于 2005-11-23 10:03:30 得分 10
你可以调用webservice后,你可以随便做你想做的开发。
webservice是一个中间结构,它负责把你的要求“翻译”后交给数据库操作,要么增加、要么修改、要么删除、要么查询等,然后将结果传回给你。
如果你要利用人家的webservice进行开发,你得知道人家给定的调用参数及其类型,你相应地传进去就可以了,象函数一样使用。
它不一定只做数据库操作,也可以做其他工作。
http://<AppServer>:<AppPort>/FormServerWS/services/AdobeFSService 这句的意思是:
<AppServer> 服务器的地址,IP。
:<AppPort> 使用的端口
剩下的为提供webservice的路径,或者叫目录吧。
这里有一个调用新浪短信接口webservice的例子,很详细,你参考一下吧。
http://s.sams.cnblogs.com/archive/2005/06/25/180949.aspx
Top
4 楼fangxinggood(JustACoder)回复于 2005-11-23 10:09:18 得分 3
我调用过,只要拿到wsdl就都一样的,VS会根据wsdl创建本地proxy。Top
5 楼lyb_abiandbel(专注于OO分析与设计)回复于 2005-11-23 10:17:59 得分 0
只要拿到wsdl就都一样的
-----------------------
wsdl 应该是j2ee产生的吧?
我现在只有一些java.class文件,我就是不知道哪个是webservice文件!Top
6 楼lyb_abiandbel(专注于OO分析与设计)回复于 2005-11-23 10:21:32 得分 0
就是说我必须要拿到那个j2ee产生的wsdl文件吗?
如果能拿到wsdl文件,估计也就ok了!Top
7 楼sunnystar365(一个人的天空)回复于 2005-11-23 10:34:00 得分 5
没有调用过J2EE的Webservice,不过看上面的这个地址
http://<AppServer>:<AppPort>/FormServerWS/services/AdobeFSService
应该是服务,只要指定服务器和端口号就应该可以连上服务,调用它的方法了
假如我已经可以调用它的webservice了,下面的开发方法应该可以参照java的代码了吧!
--------------------------------------
调用服务之后,应该可以看到它的服务里面的所有的方法了,这时当然可以根据它方法进行程序编写了Top
8 楼goody9807(http://goody9807.cnblogs.com)回复于 2005-11-23 10:34:07 得分 3
http://goody9807.cnblogs.com/archive/2005/08/17/216725.htmlTop
9 楼lyb_abiandbel(专注于OO分析与设计)回复于 2005-11-23 11:00:11 得分 0
就是说我必须要拿到那个j2ee产生的wsdl文件吗?
------------------------------
这个理解还是不对的,我又看了一下资料,必须在.net中创建一个webservice和j2ee的进行交互,然后产生一个asmx文件,这个才是我需要的文件!
The only exception is the client API for Microsoft.net.
Using this client API,you can create applications such as web services in a Microsoft.net development enviroment that interact with the Form Server Module.
Form Server has integrated the Simple Object Access Protocol (SOAP) service. Using the SOAP and .NET client libraries, you can create applications that access the Form Server Module remotely from any platform.
Top
10 楼lyb_abiandbel(专注于OO分析与设计)回复于 2005-11-23 11:02:08 得分 0
然后就是创建client
Creating a Microsoft .NET client object
You use the Form Server SOAP client for Microsoft .NET to create Form Server applications in the Microsoft
.NET development environment. This client API consists of a file named SoapClient.dll and is located in the
Form Server library directory. For information about this directory, see “Including Form Server library files”
on page 11.
The Microsoft .NET SOAP client consists of two classes. The first class is FSSoapClient and is used to
create a Form Server object and is equivalent to the SOAPClient class used in the Java implementation.
The second class is named OutputContext and is equivalent to the IOutputContext interface used in
the Java implementation. For information about these classes, see the API Reference.
Invoking the Form Server service by using the Microsoft .NET SOAP client API is a four-step process:
1. From the Microsoft .NET Visual Studio development environment, reference the SoapClient.dll file. For
information, see “Referencing the Form Server SOAP client” on page 14.
2. Add the following import statement to your Microsoft .NET project:
using SoapClient ; // C# syntax
3. Use the FSSoapClient constructor to create a FSSoapClient object:
FSSoapClient formServer = new FSSoapClient(); // C# syntax
4. Set the SOAPClient object’s SOAP end point by calling the setSoapEndPoint method:
formServer.setSoapEndPoint("http://<AppServer>:<AppPort>/FormServerWS/
services/AdobeFSService"); //C# syntax
注意:要引用SoapClient.dll:
Referencing the Form Server SOAP client
You create a reference to the SoapClient.dll assembly within the Microsoft .NET Visual Studio development
environment. Before doing so, ensure that Form Server is installed on your development computer.
Getting the ICSharp utility
The Form Server SOAP client is dependent on an ICSharp utility, that consists of a single file named
ICSharpCode.SharpZipLib.dll. You must reference this file from your Microsoft .NET Visual Studio project.
You can download this utility from the following web site:
http://prdownloads.sourceforge.net/sharpdevelop/050SharpZipLib.zip?download.
➤ To reference the Form Server SOAP client within Microsoft .NET Visual Studio
1. From the Project menu, click Add Reference.
2. Click the .NET tab.
3. Click Search and navigate to the Form Server library directory located at
C:\Program Files\Adobe\idp\lib.
4. Select SoapClient.dll.
Once you create a Form Server object, you can perform tasks such as rendering a form. For information,
see “Rendering forms” on page 25.Top