Standard Java Class Deployment Descriptor
A deployment descriptor which exposes a service which is implemented via a standard Java class (including a normal Java Bean) looks like the following:<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:service-urn" [type="message"] [checkMustUnderstands="true|false"]> <isd:provider type="java" scope="Request | Session | Application" methods="exposed-methods"> <isd:java class="implementing-class" [static="true|false"]/> </isd:provider> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>!!!!!!!!!!!!!!!!!!!!!!!!!
Where service-urn is the URN that you want to give to a service, exposed-methods is a space separated list of methods which you wish to expose, and implementing-class is fully qualified class name (i.e. packagename.classname) that provides the methods which are being exposed.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!On the <service> element, there is an optional attribute called type which may be set to the value "message" if the service is document-oriented instead of being an RPC invoked service, and an optional attribute called checkMustUnderstands which may be set to either "true" or "false" depending upon whether or not you want the server to throw a Fault if there were SOAP headers in the request which were ed as MustUnderstand. On the <java> element, there is an optional attribute called static, which may be set to either "true" or "false", depending upon whether or not the methods which are being exposed are static or not. The <provider> element also takes a scope attribute which indicates the lifetime of the instantiation of the implementing class. "Request" indicates that the object will be removed after this request has completed, "Session" indicates that the object will last for the current lifetime of the HTTP session, and Application indicates that the object will last until the servlet which is servicing the requests is terminated.
A deployment descriptor which exposes a service which is implemented via a standard Java class (including a normal Java Bean) looks like the following:<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:service-urn" [type="message"] [checkMustUnderstands="true|false"]> <isd:provider type="java" scope="Request | Session | Application" methods="exposed-methods"> <isd:java class="implementing-class" [static="true|false"]/> </isd:provider> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>!!!!!!!!!!!!!!!!!!!!!!!!!
Where service-urn is the URN that you want to give to a service, exposed-methods is a space separated list of methods which you wish to expose, and implementing-class is fully qualified class name (i.e. packagename.classname) that provides the methods which are being exposed.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!On the <service> element, there is an optional attribute called type which may be set to the value "message" if the service is document-oriented instead of being an RPC invoked service, and an optional attribute called checkMustUnderstands which may be set to either "true" or "false" depending upon whether or not you want the server to throw a Fault if there were SOAP headers in the request which were ed as MustUnderstand. On the <java> element, there is an optional attribute called static, which may be set to either "true" or "false", depending upon whether or not the methods which are being exposed are static or not. The <provider> element also takes a scope attribute which indicates the lifetime of the instantiation of the implementing class. "Request" indicates that the object will be removed after this request has completed, "Session" indicates that the object will last for the current lifetime of the HTTP session, and Application indicates that the object will last until the servlet which is servicing the requests is terminated.
解决方案 »
- 事务的处理问题
- 使用了未经检查或不安全的操作,什么意思?
- 哪位大虾试过从这类数据中,提取出需要的内容。(商品扩展属性用到的)在线等,急!
- EL表达式计算值错误!?
- java中怎么设置一个文件夹为只读 并且里面的文件也为也为只读
- java打开一个页面2次时,出来的问题、、、求解决!!
- 使用dos命令生成Axis2客户端Java类报错!
- 如何较好处理session timeout以后自动forward到一个jsp,登录后回到timeout前的页面
- JBuilder中如何不必每次调试都启动一次Weblogic服务
- 小问题请教,给分!!!!!!!!!!!!!
- 图片数据恢复问题。500分相送
- struts 中参数的传递问题
With the Apache-SOAP Administration Tools it is possible to use a Web browser to deploy and un-deploy services and to review the list and the definitions of the services deployed on a given SOAP server.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Point your browse to http://hostname:port/soap/admin (see above) and you will get the "Apache-SOAP Admin" screen with three options:
!!!!!!!!!!!!!!!!!!!!!!Deploy to deploy a new service.
Un-deploy to remove a deployed service.
List shows the list of services currently deployed in the server.
The usage of these functions is immediate once one understands the nature of the information required for deploying a service. In the next section we describe this information.
/*
however what soap do, I suggest using Apache Axis instead of Apache SOAP.
Apache Axis is a more useful and convenient implementing tools of soap
the address: http://ws.apache.org/axis/
*/
Mother said: "you need get more point back".
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="GeneralLedgerFeedbackRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="SenderID" type="xs:string"/>
<xs:element name="Authenticator" type="xs:string"/>
<xs:element name="TimeStamp" type="xs:string"/>
<xs:element name="SPID" type="xs:string"/>
<xs:element name="LedgerType" type="xs:string"/>
<xs:element name="StartTime" type="xs:string"/>
<xs:element name="EndTime" type="xs:string"/>
<xs:element name="Result" type="xs:int"/>
<xs:element name="TotalCount" type="xs:long"/>
<xs:element name="TotalFee" type="xs:long"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>接口应答消息GeneralLedgerFeedbackResponse包含如下信息:
名称 说明 数据类型 长度(字节)
SPID SP编码 String 8
Result 0:接收成功
-1001:接收失败
-10001:包数据格式不正确
-10002:数据校验不正确 Int 4
ErrorDescription 对错误/异常的详细描述信息 String ≤256
定义GeneralLedgerFeedbackResponse的Schema格式如下:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="GeneralLedgerFeedbackResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="GeneralLedgerFeedbackResult">
<xs:complexType>
<xs:sequence>
<xs:element name="SPID" type="xs:string"/>
<xs:element name="Result" type="xs:int"/>
<xs:element name="ErrorDescription" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>那么我该如何部署这个webservice呢?谢谢楼上的回复,能加我QQ 46960550 吗?解决后定高分相送。绝不食言!