Web Services using UTL_DBWS
Hiiiii Guys,
Can you pls give a simple working example of procedure through which we can call a web services. I have tried example given on oracle's site, but it seems its not working.
I have just installed oracle in my PC, so guys pls give me the names of extra JARs which are required
Thanks in advance
Cheers!!!
Vikas
Your question makes no sense in this forum.
This is the XML DB forum.
XML DB Native web services allows SQL statements and PL/SQL procedures packages and functions to be invoked from any client that understands how to process a WSDL withot requring any additional code or jars to be installed. It is a feature of database 11.1.x
If you are wanting to invoke a Web Service from PL/SQL code then you can do this with UTL_HTTP, again with no jars required..
DECLARE
V_SOAP_REQUEST XMLTYPE := XMLTYPE(
'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<m:CXMLTYPE-POSTInput xmlns:m="http://xmlns.oracle.com/orawsv/SOAPTEST/POST">
<m:P_REQUEST-XMLTYPE-IN><Request>4</Request></m:P_REQUEST-XMLTYPE-IN>
</m:CXMLTYPE-POSTInput>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>');
V_SOAP_REQUEST_TEXT CLOB := V_SOAP_REQUEST.getClobVal();
V_REQUEST UTL_HTTP.REQ;
V_RESPONSE UTL_HTTP.RESP;
V_BUFFER VARCHAR2(32000);
V_RESPONSE_TEXT CLOB;
V_RESPONSE_XML XMLTYPE;
V_WSDL XMLTYPE;
BEGIN
DBMS_LOB.CREATETEMPORARY(V_RESPONSE_TEXT, TRUE);
begin
V_REQUEST := UTL_HTTP.BEGIN_REQUEST(URL => :URL, METHOD => 'POST');
UTL_HTTP.SET_HEADER(V_REQUEST, 'User-Agent', 'Mozilla/4.0');
V_REQUEST.METHOD := 'POST';
UTL_HTTP.SET_HEADER (R => V_REQUEST, NAME => 'Content-Length', VALUE => DBMS_LOB.GETLENGTH(V_SOAP_REQUEST_TEXT));
UTL_HTTP.WRITE_TEXT (R => V_REQUEST, DATA => V_SOAP_REQUEST_TEXT);
V_RESPONSE := UTL_HTTP.GET_RESPONSE(V_REQUEST);
LOOP
UTL_HTTP.READ_LINE(V_RESPONSE, V_BUFFER, TRUE);
if (LENGTH(V_BUFFER) > 0) then
DBMS_LOB.WRITEAPPEND(V_RESPONSE_TEXT,LENGTH(V_BUFFER),V_BUFFER);
end if;
END LOOP;
UTL_HTTP.END_RESPONSE(V_RESPONSE);
EXCEPTION
WHEN UTL_HTTP.END_OF_BODY THEN
UTL_HTTP.END_RESPONSE(V_RESPONSE);
END;
V_RESPONSE_XML := XMLTYPE(V_RESPONSE_TEXT);
select XMLQUERY
'declare namespace SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; (::)
declare namespace SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; (::)
declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; (::)
declare namespace xsd="http://www.w3.org/2001/XMLSchema"; (::)
declare namespace m="http://xmlns.oracle.com/orawsv/WSDLTEST/TEST_CLOB"; (::)
$resp/SOAP-ENV:Envelope/SOAP-ENV:Body/*'
passing V_RESPONSE_XML as "resp" returning content
into V_WSDL
from DUAL;
select V_WSDL.getClobVal()
into :RESULT
from dual;
DBMS_LOB.FREETEMPORARY(V_RESPONSE_TEXT);
END;
/I've no idea about UTL_DBWS or why you would need it
Similar Messages
-
Consuming Web Services using UTL_DBWS
Hi,
I am trying to call a web service using UTL_DBWS package.
But I am getting this error:
ORA-29532: Java call terminated by uncaught Java exception: [failed to localize] No Deserializer found!
It is failing at this point:
l_result := sys.UTL_DBWS.invoke (
call_handle => l_call,
input_params => l_input_params);
Is this a problem with database or Web Service? How to resolve this?No awnsers???
I'm having the same problem here.... -
Unable to call WSS (WS-Security) enabled Web Service using UTL_DBWS
We are attempting to call a WSS (WS-Security) enabled Web Service from PL/SQL using the UTL_DBWS package (see [http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_dbws.htm#CHDIDGJH] ). We are doing this in similar fashion to [http://www.oracle-base.com/articles/10g/utl_dbws10g.php] with calls to utl_dbws.create_service, utl_dbws.create_call and utl_dbws.invoke.
Using this method we can successfully call an unsecured Web Service, but calls to WSS-enabled Web Services fail. We are currently using Oracle Database 10.2.0.3.
The failure we are getting is:
ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException:
com.sun.xml.wss.XWSSecurityException: Message does not conform to configured
policy ( AuthenticationTokenPolicy(S) ): No Security Header found;nested
exception is com.sun.xml.wss.XWSSecurityException:
com.sun.xml.wss.XWSSecurityException: Message does not conform to configured
policy ( AuthenticationTokenPlicy(S) ): No Security Header found
Apparently UTL_DBWS does not support calling WSS enabled services, although this doesn't appear to be an officially recognised position. Does anyone know if Oracle are planning to support this soon (if ever)? Looking at Re: Calling WS from PL/SQL using WS-security suggests that support has been considered before, but not yet realised.
Thanks,
TomHaving raised a Service Request with Oracle support on this, I got the following response from Oracle Development (On unpublished bug [8542959|https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=BUG&p_id=8542959]):
Development has confirmed that WS-Security is not supported through UTL_DBWS. They have also acknowledged that this is not documented and they will change the official Oracle documentation will reflect this fact. From what is being stated, it would appear that there is no plan to support the use of WS-Security through UTL_DBWS in any release in the near future.
So, in short, without developing your own home-grown SOAP request, there is no way to call a WSS enabled web service from within PL/SQL.
-Tom -
ORA-29532 error when invoking SSL web services using UTL_DBWS
Web Service gurus,
The WSDL for web services is as follows -
<definitions name="Webservice" targetNamespace="http://webservice.airclic.com/">
−
<types>
−
<xs:schema targetNamespace="http://webservice.airclic.com/" version="1.0">
<xs:element name="Exception" type="tns:Exception"/>
<xs:element name="listenForEvents" type="tns:listenForEvents"/>
<xs:element name="listenForEventsResponse" type="tns:listenForEventsResponse"/>
<xs:element name="sendAuthenticationResponse" type="tns:sendAuthenticationResponse"/>
<xs:element name="sendAuthenticationResponseResponse" type="tns:sendAuthenticationResponseResponse"/>
<xs:element name="upsertTask" type="tns:upsertTask"/>
<xs:element name="upsertTaskResponse" type="tns:upsertTaskResponse"/>
−
<xs:complexType name="upsertTask">
−
<xs:sequence>
<xs:element minOccurs="0" name="task" type="tns:Task"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Task">
−
<xs:complexContent>
−
<xs:extension base="tns:PlatformObject">
−
<xs:sequence>
<xs:element minOccurs="0" name="status" type="tns:status"/>
<xs:element minOccurs="0" name="assignee" type="xs:string"/>
<xs:element minOccurs="0" name="assigneeUserId" type="xs:string"/>
<xs:element minOccurs="0" name="name" type="xs:string"/>
<xs:element minOccurs="0" name="type" type="xs:string"/>
<xs:element minOccurs="0" name="creationTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="updateTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="startTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="endTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="source" type="tns:source"/>
<xs:element minOccurs="0" name="notes" type="xs:string"/>
<xs:element minOccurs="0" name="priority" type="xs:int"/>
<xs:element minOccurs="0" name="penalized" type="xs:boolean"/>
<xs:element minOccurs="0" name="hasSLA" type="xs:boolean"/>
<xs:element minOccurs="0" name="location" type="tns:Location"/>
<xs:element minOccurs="0" name="windowStartTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="windowEndTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="signee" type="xs:string"/>
<xs:element minOccurs="0" name="signature" type="xs:base64Binary"/>
<xs:element minOccurs="0" name="customerId" type="xs:string"/>
<xs:element minOccurs="0" name="travelTime" type="xs:int"/>
<xs:element minOccurs="0" name="expirationTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="parentId" type="xs:long"/>
<xs:element minOccurs="0" name="externalTimezone" type="xs:string"/>
<xs:element minOccurs="0" name="localTimeOffset" type="xs:long"/>
<xs:element minOccurs="0" name="consignee" type="xs:string"/>
<xs:element minOccurs="0" name="assignmentWindowStartTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="assignmentWindowEndTimestamp" type="xs:long"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
−
<xs:complexType name="PlatformObject">
−
<xs:sequence>
<xs:element name="id" type="xs:string"/>
<xs:element name="externalId" type="xs:string"/>
<xs:element name="revision" type="xs:long"/>
<xs:element name="platformDateCreated" type="xs:dateTime"/>
<xs:element name="platformDateUpdated" type="xs:dateTime"/>
<xs:element name="objectName" type="xs:string"/>
<xs:element maxOccurs="unbounded" name="extendedAttributes" type="tns:ExtendedAttribute"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Location">
−
<xs:sequence>
<xs:element minOccurs="0" name="name" type="xs:string"/>
<xs:element minOccurs="0" name="description" type="xs:string"/>
<xs:element minOccurs="0" name="type" type="xs:string"/>
<xs:element minOccurs="0" name="address" type="tns:Address"/>
<xs:element minOccurs="0" name="position" type="tns:Position"/>
<xs:element minOccurs="0" name="geofenceId" type="xs:long"/>
<xs:element minOccurs="0" name="capcity" type="xs:int"/>
<xs:element minOccurs="0" name="contact" type="xs:string"/>
<xs:element minOccurs="0" name="email" type="xs:string"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Address">
−
<xs:sequence>
<xs:element minOccurs="0" name="addressLine" type="xs:string"/>
<xs:element minOccurs="0" name="addressLine2" type="xs:string"/>
<xs:element minOccurs="0" name="city" type="xs:string"/>
<xs:element minOccurs="0" name="secondaryCity" type="xs:string"/>
<xs:element minOccurs="0" name="subdivision" type="xs:string"/>
<xs:element minOccurs="0" name="postalCode" type="xs:string"/>
<xs:element minOccurs="0" name="country" type="xs:string"/>
<xs:element minOccurs="0" name="phone" type="xs:string"/>
<xs:element minOccurs="0" name="freeform" type="xs:string"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Position">
−
<xs:sequence>
<xs:element name="latitude" type="xs:double"/>
<xs:element name="longitude" type="xs:double"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="ExtendedAttribute">
−
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="value" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="upsertTaskResponse">
−
<xs:sequence>
<xs:element minOccurs="0" name="task" type="tns:Task"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Exception">
−
<xs:sequence>
<xs:element minOccurs="0" name="message" type="xs:string"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="listenForEvents">
−
<xs:sequence>
<xs:element minOccurs="0" name="listenParams" type="tns:ListenParams"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="ListenParams">
−
<xs:sequence>
<xs:element name="queueName" type="xs:string"/>
<xs:element name="resendLast" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="listenForEventsResponse">
−
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="events" type="tns:Event"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Event">
−
<xs:sequence>
<xs:element name="id" type="xs:string"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="AuthenticationRequestEvent">
−
<xs:complexContent>
−
<xs:extension base="tns:RequestEvent">
−
<xs:sequence>
<xs:element name="username" type="xs:string"/>
<xs:element minOccurs="0" name="password" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
−
<xs:complexType name="RequestEvent">
−
<xs:complexContent>
−
<xs:extension base="tns:Event">
−
<xs:sequence>
<xs:element name="correlationId" type="xs:string"/>
<xs:element name="response" type="tns:Response"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
−
<xs:complexType name="Response">
−
<xs:sequence>
<xs:element name="correlationId" type="xs:string"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="AuthenticationResponse">
−
<xs:complexContent>
−
<xs:extension base="tns:Response">
−
<xs:sequence>
<xs:element name="success" type="xs:boolean"/>
<xs:element name="username" type="xs:string"/>
<xs:element minOccurs="0" name="password" type="xs:string"/>
<xs:element minOccurs="0" name="firstName" type="xs:string"/>
<xs:element minOccurs="0" name="lastName" type="xs:string"/>
<xs:element minOccurs="0" name="email" type="xs:string"/>
<xs:element minOccurs="0" name="active" type="xs:boolean"/>
<xs:element minOccurs="0" name="timeZone" type="xs:string"/>
<xs:element minOccurs="0" name="group" type="xs:string"/>
<xs:element minOccurs="0" name="role" type="xs:string"/>
<xs:element minOccurs="0" name="errorCode" type="xs:string"/>
<xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
−
<xs:complexType name="DispatchEvent">
−
<xs:complexContent>
−
<xs:extension base="tns:Event">
−
<xs:sequence>
<xs:element name="type" type="tns:eventType"/>
<xs:element minOccurs="0" name="previousTask" type="tns:Task"/>
<xs:element name="changeTask" type="tns:Task"/>
<xs:element minOccurs="0" name="newTask" type="tns:Task"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
−
<xs:complexType name="sendAuthenticationResponse">
−
<xs:sequence>
<xs:element minOccurs="0" name="authenticationResponse" type="tns:AuthenticationResponse"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="sendAuthenticationResponseResponse">
<xs:sequence/>
</xs:complexType>
−
<xs:simpleType name="status">
−
<xs:restriction base="xs:string">
<xs:enumeration value="NULL"/>
<xs:enumeration value="UNASSIGNED"/>
<xs:enumeration value="ASSIGNED"/>
<xs:enumeration value="RECEIVED"/>
<xs:enumeration value="ACCEPTED"/>
<xs:enumeration value="REJECTED"/>
<xs:enumeration value="IN_PROGRESS"/>
<xs:enumeration value="POSTPONED"/>
<xs:enumeration value="COMPLETED"/>
<xs:enumeration value="CANCELED"/>
<xs:enumeration value="CLEARED"/>
<xs:enumeration value="EXPIRED"/>
</xs:restriction>
</xs:simpleType>
−
<xs:simpleType name="source">
−
<xs:restriction base="xs:string">
<xs:enumeration value="NULL"/>
<xs:enumeration value="DISPATCH"/>
<xs:enumeration value="SYSTEM"/>
<xs:enumeration value="ENDUSER"/>
</xs:restriction>
</xs:simpleType>
−
<xs:simpleType name="eventType">
−
<xs:restriction base="xs:string">
<xs:enumeration value="TaskCreated"/>
<xs:enumeration value="TaskUpdated"/>
<xs:enumeration value="TaskAssigned"/>
<xs:enumeration value="TaskDeleted"/>
<xs:enumeration value="TaskStatusChanged"/>
<xs:enumeration value="TaskConflicted"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
</types>
−
<message name="Webservice_listenForEvents">
<part element="tns:listenForEvents" name="listenForEvents"/>
</message>
−
<message name="Webservice_sendAuthenticationResponseResponse">
<part element="tns:sendAuthenticationResponseResponse" name="sendAuthenticationResponseResponse"/>
</message>
−
<message name="Webservice_sendAuthenticationResponse">
<part element="tns:sendAuthenticationResponse" name="sendAuthenticationResponse"/>
</message>
−
<message name="Webservice_upsertTaskResponse">
<part element="tns:upsertTaskResponse" name="upsertTaskResponse"/>
</message>
−
<message name="Exception">
<part element="tns:Exception" name="Exception"/>
</message>
−
<message name="Webservice_upsertTask">
<part element="tns:upsertTask" name="upsertTask"/>
</message>
−
<message name="Webservice_listenForEventsResponse">
<part element="tns:listenForEventsResponse" name="listenForEventsResponse"/>
</message>
−
<portType name="Webservice">
−
<operation name="listenForEvents" parameterOrder="listenForEvents">
<input message="tns:Webservice_listenForEvents"/>
<output message="tns:Webservice_listenForEventsResponse"/>
<fault message="tns:Exception" name="Exception"/>
</operation>
−
<operation name="sendAuthenticationResponse" parameterOrder="sendAuthenticationResponse">
<input message="tns:Webservice_sendAuthenticationResponse"/>
<output message="tns:Webservice_sendAuthenticationResponseResponse"/>
<fault message="tns:Exception" name="Exception"/>
</operation>
−
<operation name="upsertTask" parameterOrder="upsertTask">
<input message="tns:Webservice_upsertTask"/>
<output message="tns:Webservice_upsertTaskResponse"/>
<fault message="tns:Exception" name="Exception"/>
</operation>
</portType>
−
<binding name="WebserviceBinding" type="tns:Webservice">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
−
<operation name="listenForEvents">
<soap:operation soapAction=""/>
−
<input>
<soap:body use="literal"/>
</input>
−
<output>
<soap:body use="literal"/>
</output>
−
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</fault>
</operation>
−
<operation name="sendAuthenticationResponse">
<soap:operation soapAction=""/>
−
<input>
<soap:body use="literal"/>
</input>
−
<output>
<soap:body use="literal"/>
</output>
−
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</fault>
</operation>
−
<operation name="upsertTask">
<soap:operation soapAction=""/>
−
<input>
<soap:body use="literal"/>
</input>
−
<output>
<soap:body use="literal"/>
</output>
−
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</fault>
</operation>
</binding>
−
<service name="Webservice">
−
<port binding="tns:WebserviceBinding" name="WebservicePort">
<soap:address location="https://webservice.mp.b.airclic.com:443/webservice/product/fieldservice/v1/Webservice"/>
</port>
</service>
</definitions>
Following is the pl/sql code using UTL_DBWS
DECLARE
l_service UTL_DBWS.service;
l_call UTL_DBWS.call;
l_wsdl_url VARCHAR2(32767);
l_namespace VARCHAR2(32767);
l_service_qname UTL_DBWS.qname;
l_port_qname UTL_DBWS.qname;
l_operation_qname UTL_DBWS.qname;
l_input_params UTL_DBWS.anydata_list;
soap_request xmltype;
l_result xmltype;
result_output VARCHAR2(32767);
BEGIN
l_wsdl_url := 'https://webservice.mp.b.airclic.com/webservice/product/fieldservice/v1/Webservice?WSDL';
l_namespace := 'http://webservice.airclic.com/';
dbms_output.put_line ('1');
l_service_qname := UTL_DBWS.to_qname(l_namespace, 'Webservice');
dbms_output.put_line ('2');
l_port_qname := UTL_DBWS.to_qname(l_namespace, 'WebservicePort');
dbms_output.put_line ('3');
l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'sendAuthenticationResponse');
dbms_output.put_line ('4');
l_service := UTL_DBWS.create_service (
wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
service_name => l_service_qname);
dbms_output.put_line ('5');
l_call := UTL_DBWS.create_call (
service_handle => l_service,
port_name => l_port_qname,
operation_name => l_operation_qname);
dbms_output.put_line ('6');
UTL_DBWS.SET_PROPERTY(l_call,'USERNAME',<username to access wsdl>);
dbms_output.put_line ('7');
UTL_DBWS.SET_PROPERTY(l_call,'PASSWORD',<password>);
dbms_output.put_line ('8');
utl_dbws.set_property(l_call,'OPERATION_STYLE', 'document');
dbms_output.put_line ('9');
soap_request := xmltype.createxml('<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:sendAuthenticationResponse xmlns:ns2="http://webservice.airclic.com/">
<authenticationResponse>
<correlationId>4646735802698040711:[email protected]</correlationId>
<success>true</success>
<username>changlanih</username>
<password>abcd1234</password>
<firstName>hero</firstName>
<lastName>changlani</lastName>
<email>[email protected]</email>
<active>true</active>
<timeZone>eastern</timeZone>
<group>Northeast</group>
<role>Service Manager</role>
</authenticationResponse>
</ns2:sendAuthenticationResponse>
</S:Body>
</S:Envelope>');
l_result := UTL_DBWS.invoke ( l_call,soap_request);
UTL_DBWS.release_call (call_handle => l_call);
UTL_DBWS.release_service (service_handle => l_service);
result_output := l_result.getstringval;
dbms_output.put_line('web svc output ===> ' || result_output);
END;
Following is the error from pl/sql code
1
2
3
4
DECLARE
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: java.lang.IllegalAccessException: error.build.wsdl.model: oracle.j2ee.ws.common.tools.api.WsdlValidationException:
Failed to read WSDL from https://webservice.mp.b.airclic.com/webservice/product/fieldservice/v1/Webservice?WSDL:
HTTP connection error code is 401
ORA-06512: at "SYS.UTL_DBWS", line 193
ORA-06512: at "SYS.UTL_DBWS", line 190
ORA-06512: at line 20
Notes
The program fails at following line of code -
l_service := UTL_DBWS.create_service (
wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
service_name => l_service_qname);
Web services are SSL.
The WSDL is at https location and needs username/password for access. The username/password to access WSDL are set using UTL_DBWS.SET_PROPERTY
To access the SSL site, I have imported the CA in Oracle Wallet, JVM home and JDK home.
Can anyone tell me what am I doing wrong here. I am not able to even establish connection to web service host.
This is very frustrating - Oracle has no examples on how to access a SSL Web Service (that needs authentication) from Database.
This is effecting our project deadlines ......... any help would be greatly appreciated.
Thanks.Hi,
I presume your Web Service needs HTTP (BASIC?) Authentication.
All this needs is setting the following 2 properties, which as can be seen, you are setting....
UTL_DBWS.set_property(l_call, 'USERNAME', '<username>');
UTL_DBWS.set_property(l_call, 'PASSWORD', '<pwd>');
This should work as long as your DBWS Callout Utility was downloaded from OTN after June 2008, and it's version is atleast 10.1.3.1.
Following is a sample code snippet that was tested successfully for this :
Declare
l_service UTL_DBWS.service;
l_call UTL_DBWS.call;
l_result sys.XMLTYPE;
l_request sys.XMLTYPE;
BEGIN
l_service := UTL_DBWS.create_service(null);
l_call := UTL_DBWS.create_call(l_service);
UTL_DBWS.set_target_endpoint_address(l_call, 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
UTL_DBWS.set_property(l_call, 'USERNAME', 'username');
UTL_DBWS.set_property(l_call, 'PASSWORD', 'pwd');
UTL_DBWS.set_property(l_call, 'OPERATION_STYLE', 'document');
UTL_DBWS.set_property(l_call, 'SOAPACTION_USE', 'true');
UTL_DBWS.set_property(l_call, 'SOAPACTION_URI', 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
l_request := XMLTYPE('<Z_CENTRICITY_GET_DOCLIST
xmlns:urn="urn:sap-com:document:sap:rfc:functions">' ||
'<I_INCLUDE_OLD_VERSIONS></I_INCLUDE_OLD_VERSIONS>' ||
'<I_INSTITUTION>0001</I_INSTITUTION>' ||
'<I_PATIENT_NR>0000000181</I_PATIENT_NR>' ||
'</Z_CENTRICITY_GET_DOCLIST>');
l_result := UTL_DBWS.invoke(l_call, l_request);
UTL_DBWS.release_call (call_handle => l_call);
UTL_DBWS.release_service (service_handle => l_service);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqlcode || ' ' || sqlerrm);
END;
Hope this helps,
Yogesh -
Calling a web service using UTL_DBWS
Hello,
I am trying to call a web service froma PL/SQL procedure using UTL_DBWS. I've been able to use a different method to determine that the web service is working correctly, so I know my problem is somewhere within my UTL_DBWS call. It seems like my call to the web service is not authenticating correctly. What I would like to do is be able to take a look at the XML header that is created by UTL_DBWS based on the parameters I have supplied, in order to ensure that everything is correct. Does anyone know a way to do this?
Thanks,
JasonHello,
I am trying to call a web service froma PL/SQL procedure using UTL_DBWS. I've been able to use a different method to determine that the web service is working correctly, so I know my problem is somewhere within my UTL_DBWS call. It seems like my call to the web service is not authenticating correctly. What I would like to do is be able to take a look at the XML header that is created by UTL_DBWS based on the parameters I have supplied, in order to ensure that everything is correct. Does anyone know a way to do this?
Thanks,
Jason -
ORA-29541 while trying to access web service using UTL_DBWS
Hi all,
Solicit your help in the beforesaid scenario:
I've 9.2.01 RDBMS, JPub 9.2.0.1.0 Production and OC4J Release 10.1.2 (standalone) environment and a local webservice.
While issuing jpub, I get the following response:
jpub -user=scott/tiger@ORACLE -sysuser sys/tiger -proxywsdl="e:\IMyFloatWebService.wsdl" -endpoint="http://10.177.238.71:8988/WS_Appln-WSFloat_prj-context-root/MyFloatWebService" -proxyopts=soap,tabfun -dir=FloatValue -plsqlpackage=soap_callout_wrap_eg -proxyopts=noload
Note: FloatValue\MyFloatWebServiceProxy.java uses unchecked or unsafe operations
Note: Recompile with -Xlint:unchecked for details.
FloatValue\MyFloatWebServiceProxyJPub.java
FloatValue\plsql_wrapper.sql
FloatValue\plsql_dropper.sql
FloatValue\plsql_grant.sql
FloatValue\plsql_revoke.sql
FloatValue\plsql_proxy.jar
Please run FloatValue\plsql_wrapper.sql in the user schema, load the generated j
ar file and run FloatValue\plsql_grant.sql in the SYS schema.
i. e - I get message as seen above:
"Please run FloatValue\plsql_wrapper.sql in the user schema, load the generated j
ar file and run FloatValue\plsql_grant.sql in the SYS schema."
And in sqlplus, while I try to access the web service, I get this error:
"SQL> sho user;
USER is "SCOTT"
SQL> SELECT soap_callout_wrap_eg.getCircumference(20)
2 FROM dual;
FROM dual
ERROR at line 2:
ORA-29541: class SCOTT.MyWebServiceFloatRTEProxyJPub could not be resolved"
Could somebody please advise me where I might be going wrong? Any help in this regards will be highly appreciated.
Regards,
LeslieHi,
I presume your Web Service needs HTTP (BASIC?) Authentication.
All this needs is setting the following 2 properties, which as can be seen, you are setting....
UTL_DBWS.set_property(l_call, 'USERNAME', '<username>');
UTL_DBWS.set_property(l_call, 'PASSWORD', '<pwd>');
This should work as long as your DBWS Callout Utility was downloaded from OTN after June 2008, and it's version is atleast 10.1.3.1.
Following is a sample code snippet that was tested successfully for this :
Declare
l_service UTL_DBWS.service;
l_call UTL_DBWS.call;
l_result sys.XMLTYPE;
l_request sys.XMLTYPE;
BEGIN
l_service := UTL_DBWS.create_service(null);
l_call := UTL_DBWS.create_call(l_service);
UTL_DBWS.set_target_endpoint_address(l_call, 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
UTL_DBWS.set_property(l_call, 'USERNAME', 'username');
UTL_DBWS.set_property(l_call, 'PASSWORD', 'pwd');
UTL_DBWS.set_property(l_call, 'OPERATION_STYLE', 'document');
UTL_DBWS.set_property(l_call, 'SOAPACTION_USE', 'true');
UTL_DBWS.set_property(l_call, 'SOAPACTION_URI', 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
l_request := XMLTYPE('<Z_CENTRICITY_GET_DOCLIST
xmlns:urn="urn:sap-com:document:sap:rfc:functions">' ||
'<I_INCLUDE_OLD_VERSIONS></I_INCLUDE_OLD_VERSIONS>' ||
'<I_INSTITUTION>0001</I_INSTITUTION>' ||
'<I_PATIENT_NR>0000000181</I_PATIENT_NR>' ||
'</Z_CENTRICITY_GET_DOCLIST>');
l_result := UTL_DBWS.invoke(l_call, l_request);
UTL_DBWS.release_call (call_handle => l_call);
UTL_DBWS.release_service (service_handle => l_service);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqlcode || ' ' || sqlerrm);
END;
Hope this helps,
Yogesh -
Loadjava and jpub in web service using UTL_DBWS giving errors - Help Please
Hi all,
Solicit your help in the below-mentioned scenario.
I am trying to access some published web services from 9.2.0.1.0 RDBMS using UTL_DBMS API. I have accomplished the same using UTL_HTTP. I have followed the instructions specified in:
'http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm#Web_Service_Callout_Utility_Download_'
to prepare the database, download Callout Utility for pre-10g RDBMS (ZIP, 5.68MB), JPub 9.2.0.1.0 Production and OC4J Release 10.1.2 (standalone) and set the environment variables.
loadjava ran successfully for:
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/OC4J/j2ee/home/lib/servlet.jar
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/OC4J/j2ee/home/lib/ejb.jar
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/jlib/jssl-1_2.jar
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/soap/webapps\soap\WEB-INF\lib\soap.jar
But it gave error for:
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/OC4J/j2ee/home/lib/mail.jar
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/OC4J/lib/dms.jar
ORA-29534: referenced object SCOTT.oracle/core/odjl/logMessage could not be resolved.
ORA-29545: badly formed class.
And while trying to run JPub using:
jpub -user=scott/tiger -sysuser sys/change_on_install -httpproxy=www-proxy.us.oracle.com:80 -proxywsdl=http://www.webservicex.net/stockquote.asmx?wsdl -endpoint=http://www.webservicex.net/stockquote.asmx -proxyopts=soap,tabfun -dir=Stock -plsqlpackage=soap_callout_wrapper
I get error:
J2T-120, ERROR: Illegal option "-proxywsdl=http://www.webservicex.net/stockquote.asmx?wsdl" ignored
J2T-120, ERROR: Illegal option "-endpoint=http://www.webservicex.net/stockquote.asmx" ignored
J2T-120, ERROR: Illegal option "-proxyopts=soap,tabfun" ignored
Any help in resolving these issues will be appreciated. Kindly also advise which api – UTL_HTTP or UTL_DBWS I should go for and why.
Regards,
LeslieIt may be better to post this problem to this forum - http://forums.oracle.com/forums/category.jspa?categoryID=24 since this is much more related to loadjava and jpub
-
Return NULL when invoke Web Service via UTL_DBWS
Hi all,
right now, i'm using UTL_DBWS to acces Web Service via database.. but when i'm trying to get data from WEB SERVICE, using utl_dbws.invoke , i got NULL value.
It happened if The result more than Varchar2 / 32767 byte.
i'have tried to change code by :
result := sys.utl_dbws.invoke(l_call, l_input_params);
P_clob := sys.anydata.accessCLOB(result);
The Output IS NULL value even if the data was less than Varchar2 or 32767 byte..
this is my script looks like ::
declare
service sys.utl_dbws.SERVICE;
l_call sys.utl_dbws.CALL;
result ANYDATA;
wsdl_url VARCHAR2(1024);
service_name VARCHAR2(200);
operation_name VARCHAR2(200);
input_params sys.utl_dbws.ANYDATA_LIST;
p_out VARCHAR2(32767);
p_xml XMLTYPE;
p_clob CLOB;
begin
wsdl_url := 'http://127.0.0.1/Exercise/WSDL2.php?wsdl';
service_name :='{urn:hellowsdl}hellwsdl';
operation_name := 'getData';
service := sys.UTL_DBWS.create_service (
wsdl_document_location => URIFACTORY.getURI(wsdl_url),
service_name => service_name);
l_call := sys.utl_dbws.create_call(
service_handle => service,
port_name => null,
operation_name => operation_name
input_params(1) := ANYDATA.ConvertVarchar2('DOCCODE');
result := sys.utl_dbws.invoke(l_call, l_input_params);
p_out := sys.anydata.accessVarchar2(result);
sys.UTL_DBWS.release_call (call_handle => l_call);
sys.UTL_DBWS.release_service (service_handle => service);
end;
Thanx for Any HelpThe basics are simple:
- format a valid SOAP envelope
- use UTL_HTTP to make the call
- process the response (typically XML output)
Sample source code in {message:id=4205205}. -
Unable to pass xmlbeans object in weblogic web services using OEPE
Migrating Weblogic web services from Weblogic Workshop 10.3 to Oracle Enterprise for Eclipse...Passing xmlbean generated types in arguments of webservice call
How to work around the following errors? I do not have this error when in workshop 10.3 only in OEPE eclipse
"oracle.eclipse.tools.webservices.compiler.CompilationException: Errors: JAX-WS web services must not have xmlBean parameter or return type"
PLease note that I want DocType to be xmlbeans generated or inherited from org.apache.xmlbeans.XmlObject....
@WebMethod
public void upload(String filename, DocType doc) {
Hi, I have legacy codes from Weblogic workshop 10.1 and 10.3.....
I am able to compile and run in Weblogic workshop 10.3 by passing the xmlbean generated DocType as arguments in the web services call.... but why am I not able to do this in Oracle Enterprise for Eclipse OEPE......
If I were to generate the web service from teh wsdl...it will generate it's own DocType.class in the jar files and not use the xmlbean generated class one....
How to get iOEPE to generate the classes in build\jws\ for
testWSService-annotation.xml
weblogic-webservices.xml etc like in workshop
How can I resolve this??? Am I stuck with Workshop on this?? How to work around??
Any help or clarifications would be much appreciated.
Inside testWS.java,
package ws;
import java.io.File;
import javax.jws.*;
import org.example.doc.DocType;
@WebService
public class testWS {
@WebMethod
public void upload(String filename, DocType doc) {
try {
doc.save(new File(filename));
catch(Exception e) {
System.out.println(e);
Inside xmlbeans generated DocType.java.....and DocTypeDocuments.java
* XML Type: DocType
* Namespace: http://www.example.org/doc
* Java type: org.example.doc.DocType
* Automatically generated - do not modify.
package org.example.doc;
* An XML DocType(@http://www.example.org/doc).
* This is a complex type.
public interface DocType extends org.apache.xmlbeans.XmlObject
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(DocType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.testWSTypeSystem").resolveHandle("doctypec217type");
* Gets the "element1" element
java.lang.String getElement1();
* Gets (as xml) the "element1" element
org.apache.xmlbeans.XmlString xgetElement1();
* Sets the "element1" element
void setElement1(java.lang.String element1);
* Sets (as xml) the "element1" element
void xsetElement1(org.apache.xmlbeans.XmlString element1);
* Gets the "element2" element
java.lang.String getElement2();
* Gets (as xml) the "element2" element
org.apache.xmlbeans.XmlString xgetElement2();
* Sets the "element2" element
void setElement2(java.lang.String element2);
* Sets (as xml) the "element2" element
void xsetElement2(org.apache.xmlbeans.XmlString element2);
* A factory class with static methods for creating instances
* of this type.
public static final class Factory
public static org.example.doc.DocType newInstance() {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
public static org.example.doc.DocType newInstance(org.apache.xmlbeans.XmlOptions options) {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
/** @param xmlAsString the string value to parse */
public static org.example.doc.DocType parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
public static org.example.doc.DocType parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
/** @param file the file from which to load an xml document */
public static org.example.doc.DocType parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
public static org.example.doc.DocType parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
public static org.example.doc.DocType parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
public static org.example.doc.DocType parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
public static org.example.doc.DocType parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
public static org.example.doc.DocType parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
public static org.example.doc.DocType parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
public static org.example.doc.DocType parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
public static org.example.doc.DocType parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
public static org.example.doc.DocType parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
public static org.example.doc.DocType parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
public static org.example.doc.DocType parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.example.doc.DocType parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.example.doc.DocType parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
private Factory() { } // No instance of this class allowed
Edited by: user11079482 on Jan 1, 2010 2:09 AMOk just as I expected. So I guess I am left with the following two options
1) either I switched to using JAXB in my apps instaed of xmlbeans....
2) or if I still wanna use the old JAX-RPC web services to deploy on the Weblogic 10gR3 server i will have to create my own ant task jwsc directly......as shown below in your docs
Programming Web Services for WebLogic Server (ant tasks)
http://download.oracle.com/docs/cd/E13222_01/wls/docs92/webserv/anttasks.html
Getting Started With WebLogic Web Services Using JAX-RPC
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webserv_rpc/index.html
Will OEPE be supporting the old JAX-RPC anytime in the near future release? or have to create own build ant task to call jwsc ant task directly to compile JAX-RPC web services?? -
How can I call a web service using JAVAscript in LCD
hi guys,
I know it can call a WSDL in LCD, but I have not any WSDL web service , and I have a REST web service ,how can I call this REST web service in LCD? I checked some documents and found nothing...if it's possible that it can call a REST web service using JAVAScript code, I mean I can program some code to call this web service ?
thanks,
JesseHi Jesse,
You can do GET, PUT and POST using FormCalc, so you should be able to access a REST web service.
There is a example of accessing a RSS feed in this thread, http://forums.adobe.com/message/5695433#5695433
Regards
Bruce -
How to invoke a web service using https
Hi,
I have a few security related questions surrounding BPEL process manager.
1. Does the BPEL engine have the capability to invoke a web service using https (HTTP over SSL)? Does it automatically do that if partner link URI starts with https:// ?
2. If not, what needs to be done to enable accessing a https based web service?
3. I need to write a web service that accepts a message and updates certain information in the database. The web service will be deployed in an OC4J instance in Oracle App Server. We want to allow the web service to be accessed from BPEL only by users registered in the database. What is the recommended way to pass username and password to a webservice if service is invoked from BPEL process manager? Note that specifying username/password in bpel.xml is not an option.
Thanks,
Pranav1. Does the BPEL engine have the capability to invoke a web service using https (HTTP over SSL)? Does it automatically do that if partner link URI starts with https:// ?
We currently don't have support for HTTP over SSl. We are working on it to include this functionality in near future.
2. If not, what needs to be done to enable accessing a https based web service?
I am not sure it is possible with current product offering. I will confirm it after discussing with our concerned development group. There is some work going to integrate with Oblix security mechanism [recently acquired by Oracle].
3. I need to write a web service that accepts a message and updates certain information in the database. The web service will be deployed in an OC4J instance in Oracle App Server. We want to allow the web service to be accessed from BPEL only by users registered in the database. What is the recommended way to pass username and password to a webservice if service is invoked from BPEL process manager? Note that specifying username/password in bpel.xml is not an option.
This will be easier to do if we can use Oblix along with BPEL PM. Could you please let us know more about your application so that we can provide you the customized solution till it's part of the product. You can send this query to [email protected] so that our product management team can give you more detailed roadmap regarding this.
HTH.
Thanks,
Rakesh -
How to call a secure external Web Service using Oracle BPEL and OWSM
Hi,
i have to invoke an external secure Web Service using SOA Suite 10.1.3.1, but i don´t know how to do this. Do i use OWSM gateway or Agent? how to configure the gateway or agent to pass the required security to the external secure web service.
thanks in advance
DongAre you getting any errors? What type of XAI Class are you using?
One thing I've noticed is that if you are making changes to the XAI Sender you will have to restart the environment before the changes can take effect.
Also, if you are using RTHTTPSNDR as XAI Class you may have to include the HTTP Method - Post in the context.
Hope this helps.
Regards,
Philip -
Unallowed RFC-XML Tag (SOAP_EINVALDOC) - Web Service using ABAP Proxy
Hi there
I am trying to consume a Web Service using ABAP Proxies. I have done the following in the system:
I configured the HTTP and HTTPS Proxy settings.
I created a package with package interfaces SAI_TOOLS and SAPPINT included under the Use Access tab.
I created the proxy classes by using the WSDL provided by the system I'm trying to interface with.
I created my HTTP destination RFC via SM59.
I configured a logical port for the proxy.
I developed the ABAP code for calling the proxy.
In the code the exception CX_AI_SYSTEM_FAULT gets raised with error message <b>"Unallowed RFC-XML Tag (SOAP_EINVALDOC)"</b> when I call the method for passing data to the destination system in the proxy class.
I had a look at SM21 and the following message was written in the log:
<b>"SOAP Runtime: SOAP Runtime exception: 111 occurred in method XP_READ_TAG of class CL_SOAP_XP at position 1
SOAP Runtime: Exception message: Unallowed RFC-XML Tag (SOAP_EINVALDOC)"</b>. I also looked at SAP Note 919886 which states that it can be dumps in the system, missing configuration or the path prefix of the RFC destination that is incorrect. I cannot find any ST22 entries. The trace file looks as follows:
SAP System ID: DGH
Client: 009
User: COLESKG
System time: 072910
System date: 20070531
SAP Release: 700
Host: hd307c
Operating system: AIX
DB System: ORACLE
Program: ZUK_IPA00003
Processing State: 0
Location: Client
Transport Binding: http://schemas.xmlsoap.org/soap/http
SOAP Application: urn:sap-com:soap:runtime:application:client
SOAP Runtime Protocol: http://www.sap.com/webas/630/soap
/runtime/protocol
SOAP Protocols: <initial>
Request Message: <initial>
Response Message: <initial>
Fault: <initial>
Registry: <initial>
SOAP Roles: <initial>
Trace Level: 3
Logging Level: 2
Monitoring Level: 0
Security Profile: <initial>
WS Security Protocol: <initial>
INFO 07:29:10: SOAP LP Registry CL_SRT_LP_MAINTENANCE->CREATE_CLIENT_APPL() Try to create client application for Proxyclass:
ZES_CO_PROCESS_EMPLOYEE_BATCH LP name: DEFAULT
INFO 07:29:10: SOAP LP Registry CL_SRT_LP_MAINTENANCE->CREATE_CLIENT_APPL() Client application created
INFO 07:29:10: SOAP LP Registry CL_SRT_LP_MAINTENANCE->CREATE_CLIENT_APPL() Try to initialize client application
INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT->IF_SOAP_APPLICATION_CS~INIT() Try to initialize application
urn:sap-com:soap:runtime:application:client
INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT->INTERNAL_CLIENT_INIT() Create new runtime CL_SOAP_RUNTIME_CLIENT
INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->REGISTER_APPLICATION() Try to register application
INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->REGISTER_APPLICATION() Application registered
INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT->INTERNAL_CLIENT_INIT() Read type of transport binding from
configuration
INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT->INTERNAL_CLIENT_INIT() Create new transport binding type
http://schemas.xmlsoap.org/soap/http
INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~INIT() Try to initialize
http://schemas.xmlsoap.org/soap/http
INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~INIT() http://schemas.xmlsoap
.org/soap/http initialized
INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~REQUEST() Try to create request message
INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~REQUEST() Request message created
INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~RESPONSE() Try to create response message
INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~RESPONSE() Response message
created
INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->INIT() Try to initialize
INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->INIT() Check transport binding
INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->INIT() Create runtime protocol
INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->IF_SOAP_PROTOCOL~INIT() Try to initialize SOAP Runtime-intrinsic
Protocol as SENDER with Priority 5
INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->INIT_MODULES() Try to create trace header/part
INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->INIT_MODULES() Trace header/part created
INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->INIT_MODULES() Try to create logging header/part
INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->INIT_MODULES() Logging header/part created
INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->IF_SOAP_PROTOCOL~INIT() Protocol initialized
INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->INIT()
Initialized
INFO 07:29:10: SOAP Protocol CL_SOAP_PROTOCOL_FACTORY->CREATE()
Try to create instance for http://www.sap.com/webas/630/soap
/runtime/session/protocol::http://www.sap.com/webas/630/soap
/runtime/session/protocol/srt640_impl
INFO 07:29:10: SOAP Protocol CL_SOAP_PROTOCOL_FACTORY->CREATE()
Instance of CL_SOAP_SESSION_PROTOCOL created for http://www.sap.com/webas/630/soap/runtime/session/protocol::http://www.sap.com/webas/630/soap/runtime/session/protocol/srt640_impl
INFO 07:29:10: SOAP SESSION Protocol CL_SOAP_SESSION_PROTOCOL->IF_SOAP_PROTOCOL~INIT() Try to initialize SOAP Session Protocol
as SENDER with Priority 5
INFO 07:29:10: SOAP SESSION Protocol CL_SOAP_SESSION_PROTOCOL->IF_SOAP_PROTOCOL~INIT() Protocol initialized
INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT_GEN->CONFIGURE_FEATURES() Try to configure features
INFO 07:29:10: SOAP HTTP Binding CL_SOAP_HTTP_TPBND_ROOT->IF_SOAP_HTTP_TRANSPORT_BINDING~SET_CLIENT_BY_DESTINATION() Try to
create ICF Client for DESTINATION = ALSB
INFO 07:29:10: SOAP HTTP Binding CL_SOAP_HTTP_TPBND_ROOT->IF_SOAP_HTTP_TRANSPORT_BINDING~SET_CLIENT_BY_DESTINATION() ICF
Client created by DESTINATION
INFO 07:29:10: SOAP HTTP Binding CL_SOAP_HTTP_TPBND_ROOT->IF_SOAP_HTTP_TRANSPORT_BINDING~SET_DESTINATION_URL_PATH() Set
DESTINATION PATH = /SapHRSmartIntegrationWeb/processes/ProcessEmployeeBatch.jpd
INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT_GEN->CONFIGURE_FEATURES() Features configured
INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT->IF_SOAP_APPLICATION_CS~INIT() Application urn:sap-com:soap
:runtime:application:client initialized
INFO 07:29:10: SOAP LP Registry CL_SRT_LP_MAINTENANCE->CREATE_CLIENT_APPL() Client application initialized
Trace file opened at 20070531 073030 GMT SAP-REL 700,0,95
Error in module XMLParserGetNextElement:773
Id @(#) $Id: //bas/700_REL/src/krn/rfc/xrfcpars.c#2 $
Unallowed RFC-XML Tag
Error in module XMLConverterReadTag:3061
Id @(#) $Id: //bas/700_REL/src/krn/rfc/xrfccnvrt.c#5 $
Unallowed RFC-XML Tag(24)
Error in module ab_soap:4392
Id @(#) $Id: //bas/700_REL/src/krn/rfc/abxrfccal.c#2 $
failed with return code 1
It then must be something in the config. Has anyone got any idea why this message is encountered?
Kind Regards
Gustav Coleske
Message was edited by:
Gustav ColeskeHi,
I have the same problem as described.
Can you give me a little more information about the error you have solved in the proxy.
Thanks for help
John -
Calling a web-service using JAX-WS client on the browser
Hi,
I created a basic web-service using netbeans/glassfish, which can be successfully called from a JavaFX application running stand-alone.
But when I try to run the same JavaFX application on a browser, the web-service call does not work, and it is hard to get any information on where it is failing.
I can see the error is a Throwable (not an Exception), but the message is null.
What are the restrictions on being able to call a webservice using the JAX-WS libraries? Are there security issues? I am not using the javafx HTTP libraries.
Also, if Java1.6u10 is available on the machine running the browser, do I still need to package all the JAX-WS libraries for the client?
Any help is appreciated, even if it is just about how to track down the problem.Thank you very much for responding.
There was no error due to WebService. Actually, I was using xmlbeans and I did not put those xmlbeans jar files into appropriate place. That is what caused the problem. I have solved it now and it is working fine.
I put those xmlbeans jar files into my war file. It is working. Earlier, I had put them in tomcat 5.5's shared/lib directory. It was not working.
Thank you once again for replying.
Sasi. -
Fault while calling a Web service using SOAP 1.2
Hi ,
I have created a simple PL/SQL web service using Jdeveloper from PL/SQL using SOAP 1.2.
But while i call that from PL/SQL, i am getting a version mismatch.
While the same service created from SOAP 1.1 is working fine.
Can anyone Help???Yip - Acrobat or Reader Extensions are needed.
Try right click on the PDF and open in Internet Explorer and try your submit (hopefully the domain is trusted)
Maybe you are looking for
-
How do I change the volume for a single midi instrument in GarageBand 10? Every time I move the volume, it moves back!
-
Hello Experts !!!! My Client requires a Stock Age analysis report . It is a trading company of steel . my client wants to know that how old my stock is in warehouse or how much is 30 days old ,60 days old ,90 days old. Below is my query SELECT T0.IT
-
Laptop goes back to sleep after closing and opening lid
When I close the lid to put the computer to sleep and then reopen the lid, the computer comes back on briefly and then goes back to sleep. It will come back on if I unplug the SafMag. I've reset the SMC following the on-line instructions; I current
-
How do i set the size of 3d picture control
dear sir, I have attached my vi.I have one doubt ie I have used translate object. vi in my vi to move my picture according to the value set by the y position.This y position indicates depth my object.this is sample object insteat of i a
-
Best Practice for Debugging Code
Hi! I am new to development in Crystal. What method do you recommend to verify my formulas are doing what I expect? For example, in other environments I would print or prompt the result. What is the best approach in Crystal? Any help you can provi