我有一個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