我有一个SOAP,需要从Oracle调用,我听说解决这个问题的唯一方法是通过Java类,但不幸的是,我不熟悉Java, m Oracle开发人员(Oracle Forms)我真的很感激它,如果有人能够帮助我创建一个调用此SOAP的类,以便我可以在Oracle数据库上构建它,并以我称为函数的方式从Oracle表单构建器调用它。调用SOAP的Java类 - Web服务
有两种皂(1.1 ND 1.2),二者的任何可以工作:
* SOAP 1.1
以下是一个示例SOAP 1.1请求和响应。显示的占位符需要用实际值替换。
POST /gmgwebservice/service.asmx HTTP/1.1
Host: 212.35.66.180
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/SendSMS"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SendSMS xmlns="http://tempuri.org/">
<UserName>string</UserName>
<Password>string</Password>
<MessageBody>string</MessageBody>
<Sender>string</Sender>
<Destination>string</Destination>
</SendSMS>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SendSMSResponse xmlns="http://tempuri.org/">
<SendSMSResult>string</SendSMSResult>
</SendSMSResponse>
</soap:Body>
</soap:Envelope>
* * SOAP 1.2
以下是一个示例SOAP 1.2请求和响应。显示的占位符需要用实际值替换。
POST /gmgwebservice/service.asmx HTTP/1.1
Host: 212.35.66.180
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<SendSMS xmlns="http://tempuri.org/">
<UserName>string</UserName>
<Password>string</Password>
<MessageBody>string</MessageBody>
<Sender>string</Sender>
<Destination>string</Destination>
</SendSMS>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<SendSMSResponse xmlns="http://tempuri.org/">
<SendSMSResult>string</SendSMSResult>
</SendSMSResponse>
</soap12:Body>
</soap12:Envelope>
如果调用Web服务这不是强制使用Java,你可以使用另一个langage。无论如何,如果您必须使用Java,我会建议使用CXF框架来实现此目的(请参阅http://cxf.apache.org/)。 – reef 2011-02-23 14:52:12
我不知道Oracle Forms如何工作,所以也许我的问题很愚蠢。无论如何,是否有可能使用Oracle Forms开发Java代码,我的意思是有可能拥有一个真正的Java项目?如果有可能,那么CXF是解决方案恕我直言。 – reef 2011-02-23 15:11:25