Java web service: XML to SQL
Background: I am a second year degree student currently on placement. The company I am with wants me to design a web service that listens for incoming XML data from an external system and uses this data to update a database.
Does anyone have any tips as to the best place to start?, what API's will be required? or just general pointers for a newbe tackling this task?
Any advice greatly apprieciated.
marekst wrote:
webservice receives xml data as parameter or webservice use SOAP XML letter to receive data?
if you get xml as parameter then you have to process XML to get java objects, if it is SOAP letter, then webservice has done job for you and you get set of java objects that should be persisted.
To persist data easiest way is to use EJB 3.0 and JPA. Webservice create using EJB 3.0 is easy as well.
to convert data in XML into java objects you can use DOM document + xPath or http://commons.apache.org/digester/ or something else, depending on size of XML doc
No need to be muddying the waters with such a heavyweight solution at this point. The guy's a relative newbie, and also has stated that the number of messages is very small. The simple APIs suggested above are much more in order, otherwise the guy's got a massive learning curve ahead of him, for no real benefit. Besides, you've not mentioned ESBs, message routing, EIP and the like, so your buzzword-compliance score has dropped dramatically :-)
Similar Messages
-
Java web service using pl/sql DB package - JDev 10.1.3.1
Hi All,
I wanted to create a java web service, instead of a pl/sql web service, that calls a pl/sql package in my DB.
Jdev (10.1.3.1) can generate java code for my pl/sql package. But the generated code can't be used with a java web service. I've found that the generated code uses types that can't be serialized for a webservice (ie. java.sql.Timestamp).
Does anyone know of a work around?
Thanks!http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
It's pretty well documented within Jdev also.
Thanks, Rob -
Can I Include an xml-stylesheet Link in a Java Web-Service?
The ability to easily create a SOAP-based web-service from a Java class using JDev's built in "Java Web Service" wizard is great.
From an "Ajax enablement" perspective, I see tremendous value in having the ability to specify an XSL url in the call to that web-service, so that the server will insert an <?xml-stylesheet .../> link to the specified URL prior to the SOAP message that it returns. That way, different callers to the web-service could render the same SOAP response differently (via an XSL transformation performed on the client-side via the XSL they've specified).
Is there already an undocumented way to do this with an Oracle "Java Web Service" that I am not aware of? If not, adding that capability would be trivial for Oracle, and it would add tremendous value to developers using Oracle's "Java Web Service" capability.Hi Chris,
I take it you are using the RESTful API method to GET the data. In that case you shoul be able to perform a http POST from your js code in order to update the controls.
This could be done as form components are updated, or after a submit button is pressed (I'm sure you are familiar with this part).
Please see here for more information: http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/build_web_service/
I hope this helps. -
Urgent: Calling web service from PL/SQl fails with XML parsing
Hi,
I am trying to call a web service from PL/SQL (using SOAP protocol and UTL_HTTP built in Package).I am using Oracle 9i .I am calling from pl/sql block invoking web service method created in java.
I am getting the below response object as a SOAP protocol, but i couldn't able to parse the SOAP.
Could you please provide the values of FirstName, LastName and ErrorDescription
declare
request_env varchar2(32767);
v_xml XMLTYPE;
l_user_first_name varchar2(100);
l_user_last_name varchar2(100);
l_error_value varchar2(100);
begin
response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
<axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
<axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
<axis2ns1:ErrorDescription />
</UserInfoObjResponse>
</soapenv:Body>
</soapenv:Envelope>';
dbms_output.put_line('Length of Request:' || length(response_env));
dbms_output.put_line ('Request: ' || response_env);
v_xml := XMLTYPE(response_env);
-- SELECT EXTRACTVALUE(v_xml, '//UserInfoObjResponse/FirstName') INTO l_user_fast_name varchar2(100); FROM DUAL;
dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
dbms_output.put_line ('l_error_value: ' || l_error_value);
end;In Oracle 9i:
SQL> declare
2 response_env varchar2(32767);
3 v_xml XMLTYPE;
4 l_user_first_name varchar2(100);
5 l_user_last_name varchar2(100);
6 l_error_value varchar2(100);
7 begin
8 response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
9 <soapenv:Body>
10 <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
11 <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
12 <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
13 <axis2ns1:ErrorDescription />
14 </UserInfoObjResponse>
15 </soapenv:Body>
16 </soapenv:Envelope>';
17
18 dbms_output.put_line('Length of Request:' || length(response_env));
19 -- dbms_output.put_line ('Request: ' || response_env);
20
21 v_xml := XMLTYPE(response_env);
22
23 select EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:FirstName/text()') first_name,
24 EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:LastName/text()') last_name,
25 EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:ErrorDescription/text()') error_description
26 into l_user_first_name, l_user_last_name, l_error_value
27 from dual;
28
29 dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
30 dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
31 dbms_output.put_line ('l_error_value: ' || l_error_value);
32 end;
33 /
Length of Request:530
l_user_first_name: First Name Output
l_user_last_name : Last Name Output
l_error_value:
PL/SQL procedure successfully completed.In Oracle 10g:
SQL> declare
2 response_env varchar2(32767);
3 v_xml XMLTYPE;
4 l_user_first_name varchar2(100);
5 l_user_last_name varchar2(100);
6 l_error_value varchar2(100);
7 begin
8 response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
9 <soapenv:Body>
10 <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
11 <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
12 <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
13 <axis2ns1:ErrorDescription />
14 </UserInfoObjResponse>
15 </soapenv:Body>
16 </soapenv:Envelope>';
17
18 dbms_output.put_line('Length of Request:' || length(response_env));
19 -- dbms_output.put_line ('Request: ' || response_env);
20
21 v_xml := XMLTYPE(response_env);
22
23 select r.*
24 into l_user_first_name, l_user_last_name, l_error_value
25 from XMLTABLE('/' PASSING v_xml
26 COLUMNS
27 first_name varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:FirstName/text()',
28 last_name varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:LastName/text()',
29 error_description varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:ErrorDescrition/text()'
30 ) r;
31
32 dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
33 dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
34 dbms_output.put_line ('l_error_value: ' || l_error_value);
35 end;
36 /
Length of Request:530
l_user_first_name: First Name Output
l_user_last_name : Last Name Output
l_error_value:
PL/SQL procedure successfully completed.Max
http://oracleitalia.wordpress.com
Edited by: Massimo Ruocchio on Feb 14, 2010 11:55 PM
Added the first one. -
Calling Web Service from PL/SQL (ORA-31011: XML parsing failed)
hi all,
i want to invoke a web service from PL/SQL.
i found a soap_api package from "Tim Hall".
but it gives error in "ealtas.soap_api.invoke function"
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00007: unexpected end-of-file encountered
ORA-06512: at "SYS.XMLTYPE", line 48
ORA-06512: at "EALTAS.SOAP_API", line 135
ORA-06512: at line 44
set scan off;
declare
P_ADRES_WS VARCHAR2(100) := 'http://<host>:<port>/dswsbobje/qaawsservices/biws?wsdl=1&cuid=AVhBxL14I2dDjz8yFoznRLY';
P_ENVELOPE VARCHAR2(32767);
P_FNC VARCHAR2(256) := 'runQueryAsAService';
ol_req ealtas.soap_api.t_request;
ol_resp ealtas.soap_api.t_response;
message varchar2(500);
BEGIN
p_envelope := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:db="DB_SUBS_BUDGET">
<soapenv:Body>
<db:runQueryAsAService>
<db:login>DWH_BO</db:login>
<db:password>Pass1234</db:password>
</db:runQueryAsAService>
</soapenv:Body>
</soapenv:Envelope>
ol_req := ealtas.soap_api.new_request(P_FNC, 'xmlns="'||P_ADRES_WS||'"');
ol_resp := ealtas.soap_api.invoke(ol_req, P_ADRES_WS, p_fnc,P_ENVELOPE);
ealtas.soap_api.show_envelope(p_envelope);
message := ealtas.soap_api.get_return_value(ol_resp, 'Db_Timeid', 'xmlns:m="'||P_ADRES_WS||'"');
DBMS_OUTPUT.PUT_LINE('AAAA -'||message);
end;
thanks.
ealtas.AlexAnd thanks for your help.
ACL is ok.
can you help me about how can i edit this function. i tried many times but i could not do it :( .
web service url : <host>:<port>/dswsbobje/qaawsservices/biws?WSDL=1&cuid=AVhBxL14I2dDjz8yFoznRLY
what must be these variables values ?
l_url :=
l_namespace :=
l_method :=
l_soap_action :=
l_result_name :=
this is the xml;
<?xml version="1.0" encoding="UTF-8" ?>
- <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="DB_SUBS_BUDGET" xmlns:tns1="dsws.businessobjects.com" targetNamespace="DB_SUBS_BUDGET" xmlns="http://schemas.xmlsoap.org/wsdl/" name="queryasaservice">
- <types>
- <s:schema elementFormDefault="qualified" targetNamespace="DB_SUBS_BUDGET">
- <s:element name="runQueryAsAService">
- <s:complexType>
- <s:sequence>
<s:element name="login" type="s:string" />
<s:element name="password" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:complexType name="Row">
- <s:sequence>
<s:element name="Db_Timeid" type="s:string" nillable="true" />
<s:element name="Db_Tariff" type="s:string" nillable="true" />
<s:element name="Grossadds" type="s:double" nillable="true" />
<s:element name="Cancellations" type="s:double" nillable="true" />
<s:element name="Netadds" type="s:double" nillable="true" />
<s:element name="Subs" type="s:double" nillable="true" />
<s:element name="Churn_P" type="s:double" nillable="true" />
</s:sequence>
</s:complexType>
- <s:complexType name="Table">
- <s:sequence>
<s:element name="row" maxOccurs="unbounded" type="s0:Row" />
</s:sequence>
</s:complexType>
- <s:element name="runQueryAsAServiceResponse">
- <s:complexType>
- <s:sequence>
<s:element name="table" type="s0:Table" />
<s:element name="message" type="s:string" />
<s:element name="creatorname" type="s:string" />
<s:element name="creationdate" type="s:dateTime" />
<s:element name="creationdateformated" type="s:string" />
<s:element name="description" type="s:string" />
<s:element name="universe" type="s:string" />
<s:element name="queryruntime" type="s:int" />
<s:element name="fetchedrows" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="QaaWSHeader">
- <s:complexType>
- <s:sequence>
<s:element name="sessionID" type="s:string" minOccurs="0" maxOccurs="1" nillable="true" />
<s:element name="serializedSession" type="s:string" minOccurs="0" maxOccurs="1" nillable="true" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</types>
- <message name="runQueryAsAServiceSoapIn">
<part name="parameters" element="s0:runQueryAsAService" />
<part name="request_header" element="s0:QaaWSHeader" />
</message>
- <message name="runQueryAsAServiceSoapOut">
<part name="parameters" element="s0:runQueryAsAServiceResponse" />
</message>
- <portType name="QueryAsAServiceSoap">
- <operation name="runQueryAsAService">
<documentation>Get Web Service Provider server info</documentation>
<input message="s0:runQueryAsAServiceSoapIn" />
<output message="s0:runQueryAsAServiceSoapOut" />
</operation>
</portType>
- <binding name="QueryAsAServiceSoap" type="s0:QueryAsAServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <operation name="runQueryAsAService">
<soap:operation soapAction="DB_SUBS_BUDGET/runQueryAsAService" style="document" />
- <input>
- <soap:header message="s0:runQueryAsAServiceSoapIn" part="request_header" use="literal">
<soap:headerfault message="s0:runQueryAsAServiceSoapIn" part="request_header" use="literal" />
</soap:header>
<soap:body use="literal" parts="parameters" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="DB_SUBS_BUDGET">
<documentation />
- <port name="QueryAsAServiceSoap" binding="s0:QueryAsAServiceSoap">
<soap:address location="http://<host>:<port>/dswsbobje/qaawsservices/queryasaservice?&cuid=AVhBxL14I2dDjz8yFoznRLY&authType=secEnterprise&locale=en_US&timeout=60&ConvertAnyType=false" />
</port>
</service>
</definitions> -
Creating PL/SQL web services from PL/SQL records
Hello
Jdeveloper does not allow to create web services from pl/sql packages that use PL/SQL records.to do this,we have to use the jpublisher ?without using the jpublisher,if we create a webservice then the following error is displayed in the web service xml output file.
<faultstring>Internal Server Error (Caught exception while handling request: java.rmi.RemoteException: java.sql.SQLException: ORA-06550: line 1, column 49: PLS-00181: unsupported preprocessor directive '$WS_SP_EVEN' )</faultstring>
</env:Fault>
Could any one suggest me, how to solve the above issue..?
Regards
MalathiThank you, with db adapter it was working and also
pl/sql web-services working successfully with object types.If we want to send the web-services to the client, do we need to send the entire folder that is created in the web-services folder of the external oc4j..?
Creating the client process:
we are using the wsdl file that is generated in the web-services and adding to the partner link to Invoke the operations of web-services. Is there any other way to invoke the webservices?Could any one please suggest me?
Thanking you
Malathi -
Error while calling .svc web service from pl/sql using utl_dbws
Hello Folks,
I am calling a .svc web service from pl/sql using utl_dbws and encountering the following error
javax.xml.rpc.soap.SOAPFaultException: The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
Can you help me find what am I doing wrong?
Thanks
RkHi,
Here are the details
1. What version?
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
2. What error message ... we need the full and complete error stack not your interpretation of it.
ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException: The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Messag
3. "I am calling means what?" We need the full and complete statement showing the values of all parameters.
The input to the web-service is a xmltype containing address information and the web-service returns a string
CREATE OR REPLACE FUNCTION get_id
RETURN VARCHAR2
AS
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_xmltype_in SYS.XMLTYPE;
l_xmltype_out SYS.XMLTYPE;
l_return VARCHAR2 (32767);
BEGIN
l_wsdl_url := 'http://test.com/test.svc?wsdl';
l_namespace := 'http://test.org/';
l_service_qname := UTL_DBWS.to_qname (l_namespace, 'SName');
l_port_qname := UTL_DBWS.to_qname (l_namespace, 'BasicHttpBinding_ISName');
l_operation_qname := UTL_DBWS.to_qname (l_namespace, 'Iden');
l_service :=
UTL_DBWS.create_service
(wsdl_document_location => urifactory.geturi
(l_wsdl_url),
service_name => l_service_qname
l_call :=
UTL_DBWS.create_call (service_handle => l_service,
port_name => l_port_qname,
operation_name => l_operation_qname
l_xmltype_in :=
SYS.XMLTYPE
('<IdenRequest xmlns:i="http://www.w3.org/XMLSchema-instance" xmlns="http://test.org/SNameIden.WCFService">
<address />
<zip>12345</zip>
<state>AA</state>
<street>W Test </street>
</address>
</IdenRequest>'
l_xmltype_out :=
UTL_DBWS.invoke (call_handle => l_call,
request => l_xmltype_in);
UTL_DBWS.release_call (call_handle => l_call);
UTL_DBWS.release_service (service_handle => l_service);
l_return := l_xmltype_out.EXTRACT ('//Iden/text()').getstringval();
RETURN l_return;
END;
/ -
Issue Consuming a Java Web Service
I've been doing research and on how to consume a Web Service from PL/SQL. The following is a chunk of the code. I can call the Web Service from other clients but not from my PL/SQL client. I keep getting this error
ORA-29532: Java call terminated by uncaught Java exception: service: {http://10.93.38.134:7001/nmrwws/RewardsValidationService}RewardsValidationService does not contain port: {http://10.93.38.134:7001/nmrwws/RewardsValidationService}RewardsValidationPort
What am I missing and can someone lead more to better info on using UTL_DBWS.
CREATE OR REPLACE PACKAGE BODY nmrw_http_post_pkg
AS
PROCEDURE get_batch( x_errbuf OUT varchar2
, x_retcode OUT varchar2
, p_batch_id IN number
IS
l_service sys.UTL_DBWS.service;
l_call sys.UTL_DBWS.call;
l_result anydata;
l_wsdl_url varchar2( 32767 );
l_namespace varchar2( 32767 );
l_service_qname sys.UTL_DBWS.qname;
l_port_qname sys.UTL_DBWS.qname;
l_operation_qname sys.UTL_DBWS.qname;
l_input_params sys.UTL_DBWS.anydata_list;
BEGIN
l_wsdl_url := 'http://10.93.38.134:7001/nmrwws/RewardsValidationService?WSDL';
l_namespace := 'http://10.93.38.134:7001/nmrwws/RewardsValidationService';
l_service_qname := sys.UTL_DBWS.to_qname( l_namespace
, 'RewardsValidationService'
l_port_qname := sys.UTL_DBWS.to_qname( l_namespace
, 'RewardsValidationPort'
l_operation_qname := sys.UTL_DBWS.to_qname( l_namespace
, 'getAuthorizations'
l_service := sys.UTL_DBWS.create_service( wsdl_document_location => urifactory.geturi( l_wsdl_url )
, service_name => l_service_qname
l_call := sys.UTL_DBWS.create_call( service_handle => l_service
, port_name => l_port_qname
, operation_name => l_operation_qname
l_input_params( 0 ) := anydata.convertvarchar2( 'NMCLL' );
l_result := sys.UTL_DBWS.invoke( call_handle => l_call
, input_params => l_input_params
sys.UTL_DBWS.release_call( call_handle => l_call );
sys.UTL_DBWS.release_service( service_handle => l_service );
Here is the WSDL:
<?xml version="1.0" encoding="UTF-8" ?>
- <!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).
-->
- <!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).
-->
- <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.nmrw.neimanmarcus.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.nmrw.neimanmarcus.com/" name="RewardsValidationService">
- <types>
- <xsd:schema>
<xsd:import namespace="http://ws.nmrw.neimanmarcus.com/" schemaLocation="http://10.93.38.134:7001/nmrwws/RewardsValidationService?xsd=1" />
</xsd:schema>
</types>
- <message name="getAuthenticated">
<part name="parameters" element="tns:getAuthenticated" />
</message>
- <message name="getAuthenticatedResponse">
<part name="parameters" element="tns:getAuthenticatedResponse" />
</message>
- <message name="getAuthorizations">
<part name="parameters" element="tns:getAuthorizations" />
</message>
- <message name="getAuthorizationsResponse">
<part name="parameters" element="tns:getAuthorizationsResponse" />
</message>
- <message name="isValidAuthorization">
<part name="parameters" element="tns:isValidAuthorization" />
</message>
- <message name="isValidAuthorizationResponse">
<part name="parameters" element="tns:isValidAuthorizationResponse" />
</message>
- <message name="getValidJobNames">
<part name="parameters" element="tns:getValidJobNames" />
</message>
- <message name="getValidJobNamesResponse">
<part name="parameters" element="tns:getValidJobNamesResponse" />
</message>
- <message name="isValidJobName">
<part name="parameters" element="tns:isValidJobName" />
</message>
- <message name="isValidJobNameResponse">
<part name="parameters" element="tns:isValidJobNameResponse" />
</message>
- <message name="isValidFacilityNum">
<part name="parameters" element="tns:isValidFacilityNum" />
</message>
- <message name="isValidFacilityNumResponse">
<part name="parameters" element="tns:isValidFacilityNumResponse" />
</message>
- <message name="isValidFacilityCode">
<part name="parameters" element="tns:isValidFacilityCode" />
</message>
- <message name="isValidFacilityCodeResponse">
<part name="parameters" element="tns:isValidFacilityCodeResponse" />
</message>
- <message name="getValidFacilityCodes">
<part name="parameters" element="tns:getValidFacilityCodes" />
</message>
- <message name="getValidFacilityCodesResponse">
<part name="parameters" element="tns:getValidFacilityCodesResponse" />
</message>
- <message name="isValidDunsNumber">
<part name="parameters" element="tns:isValidDunsNumber" />
</message>
- <message name="isValidDunsNumberResponse">
<part name="parameters" element="tns:isValidDunsNumberResponse" />
</message>
- <message name="isValidGlAccount">
<part name="parameters" element="tns:isValidGlAccount" />
</message>
- <message name="isValidGlAccountResponse">
<part name="parameters" element="tns:isValidGlAccountResponse" />
</message>
- <message name="isValidVendorNumber">
<part name="parameters" element="tns:isValidVendorNumber" />
</message>
- <message name="isValidVendorNumberResponse">
<part name="parameters" element="tns:isValidVendorNumberResponse" />
</message>
- <message name="isValidDivisionNumber">
<part name="parameters" element="tns:isValidDivisionNumber" />
</message>
- <message name="isValidDivisionNumberResponse">
<part name="parameters" element="tns:isValidDivisionNumberResponse" />
</message>
- <message name="isValidMerchDivision">
<part name="parameters" element="tns:isValidMerchDivision" />
</message>
- <message name="isValidMerchDivisionResponse">
<part name="parameters" element="tns:isValidMerchDivisionResponse" />
</message>
- <message name="getValidMerchDivision">
<part name="parameters" element="tns:getValidMerchDivision" />
</message>
- <message name="getValidMerchDivisionResponse">
<part name="parameters" element="tns:getValidMerchDivisionResponse" />
</message>
- <message name="isValidMerchDeptClass">
<part name="parameters" element="tns:isValidMerchDeptClass" />
</message>
- <message name="isValidMerchDeptClassResponse">
<part name="parameters" element="tns:isValidMerchDeptClassResponse" />
</message>
- <message name="getValidMerchDeptClass">
<part name="parameters" element="tns:getValidMerchDeptClass" />
</message>
- <message name="getValidMerchDeptClassResponse">
<part name="parameters" element="tns:getValidMerchDeptClassResponse" />
</message>
- <message name="isValidMerchDeptClassVendor">
<part name="parameters" element="tns:isValidMerchDeptClassVendor" />
</message>
- <message name="isValidMerchDeptClassVendorResponse">
<part name="parameters" element="tns:isValidMerchDeptClassVendorResponse" />
</message>
- <message name="getValidMerchDeptClassVendor">
<part name="parameters" element="tns:getValidMerchDeptClassVendor" />
</message>
- <message name="getValidMerchDeptClassVendorResponse">
<part name="parameters" element="tns:getValidMerchDeptClassVendorResponse" />
</message>
- <message name="isValidMerchDivisionDeptVendor">
<part name="parameters" element="tns:isValidMerchDivisionDeptVendor" />
</message>
- <message name="isValidMerchDivisionDeptVendorResponse">
<part name="parameters" element="tns:isValidMerchDivisionDeptVendorResponse" />
</message>
- <message name="getValidMerchDivisionDeptVendor">
<part name="parameters" element="tns:getValidMerchDivisionDeptVendor" />
</message>
- <message name="getValidMerchDivisionDeptVendorResponse">
<part name="parameters" element="tns:getValidMerchDivisionDeptVendorResponse" />
</message>
- <message name="isValidMerchDivisionDeptVendorStyle">
<part name="parameters" element="tns:isValidMerchDivisionDeptVendorStyle" />
</message>
- <message name="isValidMerchDivisionDeptVendorStyleResponse">
<part name="parameters" element="tns:isValidMerchDivisionDeptVendorStyleResponse" />
</message>
- <message name="getValidMerchDivisionDeptVendorStyle">
<part name="parameters" element="tns:getValidMerchDivisionDeptVendorStyle" />
</message>
- <message name="getValidMerchDivisionDeptVendorStyleResponse">
<part name="parameters" element="tns:getValidMerchDivisionDeptVendorStyleResponse" />
</message>
- <portType name="RewardsValidationDelegate">
- <operation name="getAuthenticated">
<input message="tns:getAuthenticated" />
<output message="tns:getAuthenticatedResponse" />
</operation>
- <operation name="getAuthorizations">
<input message="tns:getAuthorizations" />
<output message="tns:getAuthorizationsResponse" />
</operation>
- <operation name="isValidAuthorization">
<input message="tns:isValidAuthorization" />
<output message="tns:isValidAuthorizationResponse" />
</operation>
- <operation name="getValidJobNames">
<input message="tns:getValidJobNames" />
<output message="tns:getValidJobNamesResponse" />
</operation>
- <operation name="isValidJobName">
<input message="tns:isValidJobName" />
<output message="tns:isValidJobNameResponse" />
</operation>
- <operation name="isValidFacilityNum">
<input message="tns:isValidFacilityNum" />
<output message="tns:isValidFacilityNumResponse" />
</operation>
- <operation name="isValidFacilityCode">
<input message="tns:isValidFacilityCode" />
<output message="tns:isValidFacilityCodeResponse" />
</operation>
- <operation name="getValidFacilityCodes">
<input message="tns:getValidFacilityCodes" />
<output message="tns:getValidFacilityCodesResponse" />
</operation>
- <operation name="isValidDunsNumber">
<input message="tns:isValidDunsNumber" />
<output message="tns:isValidDunsNumberResponse" />
</operation>
- <operation name="isValidGlAccount">
<input message="tns:isValidGlAccount" />
<output message="tns:isValidGlAccountResponse" />
</operation>
- <operation name="isValidVendorNumber">
<input message="tns:isValidVendorNumber" />
<output message="tns:isValidVendorNumberResponse" />
</operation>
- <operation name="isValidDivisionNumber">
<input message="tns:isValidDivisionNumber" />
<output message="tns:isValidDivisionNumberResponse" />
</operation>
- <operation name="isValidMerchDivision">
<input message="tns:isValidMerchDivision" />
<output message="tns:isValidMerchDivisionResponse" />
</operation>
- <operation name="getValidMerchDivision">
<input message="tns:getValidMerchDivision" />
<output message="tns:getValidMerchDivisionResponse" />
</operation>
- <operation name="isValidMerchDeptClass">
<input message="tns:isValidMerchDeptClass" />
<output message="tns:isValidMerchDeptClassResponse" />
</operation>
- <operation name="getValidMerchDeptClass">
<input message="tns:getValidMerchDeptClass" />
<output message="tns:getValidMerchDeptClassResponse" />
</operation>
- <operation name="isValidMerchDeptClassVendor">
<input message="tns:isValidMerchDeptClassVendor" />
<output message="tns:isValidMerchDeptClassVendorResponse" />
</operation>
- <operation name="getValidMerchDeptClassVendor">
<input message="tns:getValidMerchDeptClassVendor" />
<output message="tns:getValidMerchDeptClassVendorResponse" />
</operation>
- <operation name="isValidMerchDivisionDeptVendor">
<input message="tns:isValidMerchDivisionDeptVendor" />
<output message="tns:isValidMerchDivisionDeptVendorResponse" />
</operation>
- <operation name="getValidMerchDivisionDeptVendor">
<input message="tns:getValidMerchDivisionDeptVendor" />
<output message="tns:getValidMerchDivisionDeptVendorResponse" />
</operation>
- <operation name="isValidMerchDivisionDeptVendorStyle">
<input message="tns:isValidMerchDivisionDeptVendorStyle" />
<output message="tns:isValidMerchDivisionDeptVendorStyleResponse" />
</operation>
- <operation name="getValidMerchDivisionDeptVendorStyle">
<input message="tns:getValidMerchDivisionDeptVendorStyle" />
<output message="tns:getValidMerchDivisionDeptVendorStyleResponse" />
</operation>
</portType>
- <binding name="RewardsValidationPortBinding" type="tns:RewardsValidationDelegate">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <operation name="getAuthenticated">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="getAuthorizations">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidAuthorization">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="getValidJobNames">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidJobName">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidFacilityNum">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidFacilityCode">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="getValidFacilityCodes">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidDunsNumber">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidGlAccount">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidVendorNumber">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidDivisionNumber">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidMerchDivision">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="getValidMerchDivision">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidMerchDeptClass">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="getValidMerchDeptClass">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidMerchDeptClassVendor">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="getValidMerchDeptClassVendor">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidMerchDivisionDeptVendor">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="getValidMerchDivisionDeptVendor">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="isValidMerchDivisionDeptVendorStyle">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="getValidMerchDivisionDeptVendorStyle">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="RewardsValidationService">
- <port name="RewardsValidationPort" binding="tns:RewardsValidationPortBinding">
<soap:address location="http://10.93.38.134:7001/nmrwws/RewardsValidationService" />
</port>
</service>
</definitions>I see this in the wsdl (all the way down).
<port name="RewardsValidationPort" binding="tns:RewardsValidationPortBinding">Seems the port has its own namespace tns:? Which maps to: xmlns:tns="http://ws.nmrw.neimanmarcus.com/" (see at top of wsdl).
You are using l_namespace in your to_qname call.
l_port_qname := sys.UTL_DBWS.to_qname( l_namespace
, 'RewardsValidationPort'
);And l_namespace was set to:
l_namespace := 'http://10.93.38.134:7001/nmrwws/RewardsValidationService';Maybe that is the issue? -
Invoking P6 web services using PL/SQL block
Hi Team,
We have requirement like
Oracle jobs will invoke PL/SQL code to authenticate and establish a session with the P6 Web services.
Web service will export Project data from One Primavera database as an XML and copy to common location.
Then this XML project files will be imported into archive database.
Could anyone help me how I can establish sessio between Pl/SQL and P6 webservices?
Please let me know if you need any more information.
Regards,
Santosh
Edited by: SantoshV Singh on Apr 29, 2013 10:09 PMIt will be no different than connecting to any web services through PL/SQL which is pretty hard to do and if you are asking how to do it then you have a steep learning curve ahead of you and not a great deal in the way of good examples out there.
I wouldn't even attempt the approach you suggest. Instead I would probably write a Java application to do it and use your PL/SQL to enqueue a message that routed to the Java application. Then the java application with the Web Services support and P6 client would be easier to do what you want with web services. -
Creating Web service for PL/SQL Procedure with Complex Data Types
I need to created web service for PL/SQL Procedure with Complex Data types like table of records as parameters, how do we map the pl/sql table type parameters with web service, how to go about these?
Hello,
When you are creating a service from a Stored Procedure, the OracleAS WS tools will create necessary Java and PL wrapper code to handle the complex types (table of record) properly and make them compatible with XML format for SOAP messages.
So what you should do is to use JDeveloper or WSA command line, to create a service from your store procedure and you will see that most of the work will be done for you.
You can find more information in the:
- Developing Web Services that Expose Database Resources
chapter of the Web Service Developer's guide.
Regards
Tugdual Grall -
Publishing a stateless java web service
Hi All,
Two questions:
1 - Does Oracle still support publishing java web services (stateless and stateful) just by declaring it in the web.xml file? I see that there are instructions on how to do this in an old whitepaper but any recent programmer documentation does not have it.
2 - I tried declaring a java class as a web service in the web.xml and it seems to do something (ie., when I go to the URI, there is actually the wsdl, and the various methods that can be invoked). However, when invoking one of the methods (which should just return "Hello World" without any processing at all), I get the following exception. Any ideas?
javax.servlet.ServletException
at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:632)
at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:292)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:606)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:312)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:779)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:264)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:536)
Thanks,
Johnnyhello Jonathan
In Jdev903 doc it is given that (pl/sql web service)
Limitations
On Oracle9i Database release 2, when a stored procedure or function of the same name and the same package name is accessible in more than one schema, then the SQLJ translator invoked during publication of PL/SQL web services will fail. In order to resolve this problem, ensure that packages to be published are visible only in one schema, and that no other packages in other schemas share the same name.
The problem u explained come into the same category.Which database version u r using ? .
regards
Mangesh -
Serialization error while invoking a Java web service
Hi,
I've a requirement where I need to create a Java web service, which returns a collection (a set of records).
The way I've created a web service is by having a Java Class, which internally calls a Pl/sql package returning Ref cursors and a bean Class, which wraps the method of the Java Class, to return the collection. I could create the web service successfully and could invoke the end point. The end point looks like this: http://localhost:8988/MyJavaWebService-New_JWS-context-root/MyWebService_finalSoapHttpPort
The method exposed for the web service in my Java class is of type ArrayList, to fetch the collection element.
After giving the input at the end point, while I say invoke, for the web service, I get the following error:
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns0="http://mypkg/types/"
xmlns:ns1="http://www.oracle.com/webservices/internal/literal">
<env:Body>
<env:Fault>
<faultcode>env:Server</faultcode>
<faultstring>Internal Server Error (serialization error: no serializer is registered for (class mypkg.EmpBean, null))</faultstring>
</env:Fault>
</env:Body>
</env:Envelope>
I've tried making my exposed method of type Vector as well and re-generated the web service. But still I face the same issue at invocation.
Can anybody help me out and hint me on how I should proceed? I'm not sure if my approach is correct and so please correct me if I'm wrong.
Thanks in Advance,
GayathriHi,
do you use 10.1.2 or 10.1.3?
Take a look at:
Re: How to create a web service with ArrayList or Collection -
How to generate param-prefix in web-services.xml
Hello I am using source2wsdd to generate my WSDL and my web-services.xml. For sake
of interoperability I would like to have the type param-prefix in the web-services.xml
file. From my Bean class what kind of javadoc comments would help me generate
the type param-prefix ?
I also would like the location="header" in the param list.
Thanks,
Aswin.
<param xmlns:param-prefix="http://tempuri.org/"
type="param-prefix:SOAPCredentials"
location="header"
class-name="com.xyz.webservices.SOAPCredentials"
name="SOAPCredentials"
style="in">
</param>
<return-param xmlns:param-prefix="http://tempuri.org/"
type="param-prefix:GetFileProfileInformationResponse"
class-name="com.xyz.webservices.GetFileProfileInformationResponse"
name="parameters">
</return-param>
</params>Please try this:
* @wlws:part p_SOAPAuthToken location="header"
* type="typeNS:p_SOAPAuthToken"
* class-name="com.xyz.webservices.SOAPAuthToken"
* style="inout"
* xmlns:typeNS=http://namespace/of/the/type
* @wlws:part p_SOAPCredentials location="header"
* type="typeNS:p_SOAPCredentials"
* class-name="com.xyz.webservices.SOAPCredentials"
* style="in"
* xmlns:typeNS=http://namespace/of/the/type
* @ejbgen:remote-method
public void login(SOAPAuthToken p_SOAPAuthToken,
SOAPCredentials p_SOAPCredentials)
I did not try this one out. So i can only hope that it works.
Regards,
-manoj
http://manojc.com
"Aswin Dinakar" <[email protected]> wrote in message
news:40aeeb5d$1@mktnews1...
>
I tried this
* @wlws:part p_SOAPAuthToken location="header"
* @wlws:part p_SOAPAuthToken type="param-prefix:p_SOAPAuthToken"
* @wlws:part p_SOAPAuthTokenclass-name="com.xyz.webservices.SOAPAuthToken"
* @wlws:part p_SOAPAuthToken style="inout"
* @wlws:part p_SOAPCredentials location="header"
* @wlws:part p_SOAPCredentials type="param-prefix:p_SOAPCredentials"
* @wlws:part p_SOAPCredentialsclass-name="com.xyz.webservices.SOAPCredentials"
* @wlws:part p_SOAPCredentials style="in"
* @ejbgen:remote-method
public void login(SOAPAuthToken p_SOAPAuthToken,
SOAPCredentials p_SOAPCredentials)
and I got the following error -
[source2wsdd] source2wsdd: In doclet classweblogic.webservice.tools.ddgen.Servi
ceGen, method start has thrown an exceptionjava.lang.reflect.InvocationTargetE
xception
[source2wsdd] weblogic.xml.stream.XMLStreamException: Attribute QNamevalue "par
am-prefix:p_SOAPAuthToken" does not map to a prefix that is in scope
[source2wsdd] atweblogic.webservice.dd.NSAttribute.getValueAsXMLName(NSAttrib
ute.java:45)
[source2wsdd] atweblogic.webservice.dd.DDLoader.processParamElement(DDLoader.
java:1252)
"manoj cheenath" <[email protected]> wrote:
Check out this example:
http://manojc.com/?sample3
You can find more details regarding the tags here:
http://manojc.com/tutorial/sample3/source2wsdd.html
Regards,
-manoj
http://manojc.com
"Aswin D" <[email protected]> wrote in message
news:[email protected]...
Hello I am using source2wsdd to generate my WSDL and my
web-services.xml.
For sake
of interoperability I would like to have the type param-prefix inthe
web-services.xml
file. From my Bean class what kind of javadoc comments would help megenerate
the type param-prefix ?
I also would like the location="header" in the param list.
Thanks,
Aswin.
<param xmlns:param-prefix="http://tempuri.org/"
type="param-prefix:SOAPCredentials"
location="header"
class-name="com.xyz.webservices.SOAPCredentials"
name="SOAPCredentials"
style="in">
</param>
<return-param xmlns:param-prefix="http://tempuri.org/"
type="param-prefix:GetFileProfileInformationResponse"
class-name="com.xyz.webservices.GetFileProfileInformationResponse"
name="parameters">
</return-param>
</params> -
Fault elt in web-services.xml NOT WORKING
We are trying to capture an invalid message coming into our service before our
service actually processes it. Per WLS7 documentation, it provides the ability
to add a <fault> elt under the <params> elt in web-services.xml to perform that.
Here's how the operations portion of our web-services.xml looks like:
<operations>
<operation method="echo(java.lang.String)" component="jcComp0" name="echo"
handler-chain="diagnosticChain">
<params>
<param location="body" class-name="java.lang.String" style="in" name="echoString"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
</param>
<return-param location="body" class-name="java.lang.String" name="Result"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
</return-param>
<fault name="InvalidMessageException" class-name="com.gmacfs.routeone.diagnostic.InvalidMessageException"/>
</params>
</operation>
</operations>
However, when we tried doing that, we got a BIG set of exception while trying
to build our client. It looks as follows:
client:
[clientgen] Generating client jar for diagnostic.ear ...
[clientgen] Could not read Web Service deployment descriptor
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:112)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --- Nested Exception ---
[clientgen] Could not read Web Service deployment descriptor
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EARClientGen.java:332)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:110)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --- Nested Exception ---
[clientgen] weblogic.webservice.dd.DDProcessingException: Could not find required
attribute "type" for element <fault> (Line 28, Column 8)
[clientgen] at weblogic.webservice.dd.ParsingHelper.getRequiredAttribute(ParsingHelper.java:287)
[clientgen] at weblogic.webservice.dd.DDLoader.processFaultElement(DDLoader.java:1195)
[clientgen] at weblogic.webservice.dd.DDLoader.processFaultElements(DDLoader.java:1166)
[clientgen] at weblogic.webservice.dd.DDLoader.processParamsElement(DDLoader.java:1004)
[clientgen] at weblogic.webservice.dd.DDLoader.processOperationElement(DDLoader.java:977)
[clientgen] at weblogic.webservice.dd.DDLoader.processOperationElements(DDLoader.java:853)
[clientgen] at weblogic.webservice.dd.DDLoader.processOperationsElement(DDLoader.java:841)
[clientgen] at weblogic.webservice.dd.DDLoader.processWebServiceElement(DDLoader.java:378)
[clientgen] at weblogic.webservice.dd.DDLoader.processWebServiceElements(DDLoader.java:283)
[clientgen] at weblogic.webservice.dd.DDLoader.processWebServicesElement(DDLoader.java:271)
[clientgen] at weblogic.webservice.dd.DDLoader.load(DDLoader.java:249)
[clientgen] at weblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:79)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EARClientGen.java:330)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:110)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --------------- nested within: ------------------
[clientgen] weblogic.webservice.util.WebServiceJarException: Could not load deployment
descriptor - with nested exception:
[clientgen] [weblogic.webservice.dd.DDProcessingException: Could not find required
attribute "type" for element <fault> (Line 28, Column 8)]
[clientgen] at weblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:81)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EARClientGen.java:330)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:110)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
BUILD FAILED
Anybody has any ideas?
Thanks much,
samiManoj,
Thanks a lot, THAT DID IT... two very helpful hints from you in a row.
By the way, one thing worth mentioning is that the Weblogic documentation that
we explored did not have enough information about that issue.
Thanks again.
sami
"manoj cheenath" <[email protected]> wrote:
Buried deep in the stack trace, is this little
detail:
Could not find required
attribute "type" for element <fault> (Line 28, Column 8)
So the correct DD should look something like:
<fault type="typeNS:string"
xmlns:typeNS="http://www.w3.org/2001/XMLSchema"
class-name="tutorial.sample9.HelloWorldException"
name="HelloWorldException">
</fault>
Also, check out this example:
http://manojc.com/?sample9
There is a know problem: WLS can not handle
exceptions that contain complex data types.
This will be fixed in SP1.
Regards,
-manoj
http://manojc.com
"sami titi" <[email protected]> wrote in message
news:[email protected]...
We are trying to capture an invalid message coming into our servicebefore
our
service actually processes it. Per WLS7 documentation, it providesthe
ability
to add a <fault> elt under the <params> elt in web-services.xml toperform
that.
Here's how the operations portion of our web-services.xml looks like:
<operations>
<operation method="echo(java.lang.String)" component="jcComp0"name="echo"
handler-chain="diagnosticChain">
<params>
<param location="body" class-name="java.lang.String" style="in"name="echoString"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
</param>
<return-param location="body" class-name="java.lang.String"name="Result"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
</return-param>
<fault name="InvalidMessageException"class-name="com.gmacfs.routeone.diagnostic.InvalidMessageException"/>
</params>
</operation>
</operations>
However, when we tried doing that, we got a BIG set of exception whiletrying
to build our client. It looks as follows:
client:
[clientgen] Generating client jar for diagnostic.ear ...
[clientgen] Could not read Web Service deployment descriptor
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
va:112)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
ask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --- Nested Exception ---
[clientgen] Could not read Web Service deployment descriptor
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EAR
ClientGen.java:332)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
va:110)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
ask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --- Nested Exception ---
[clientgen] weblogic.webservice.dd.DDProcessingException: Could notfind
required
attribute "type" for element <fault> (Line 28, Column 8)
[clientgen] atweblogic.webservice.dd.ParsingHelper.getRequiredAttribute(ParsingHelper.java
:287)
[clientgen] atweblogic.webservice.dd.DDLoader.processFaultElement(DDLoader.java:1195)
[clientgen] atweblogic.webservice.dd.DDLoader.processFaultElements(DDLoader.java:1166)
[clientgen] atweblogic.webservice.dd.DDLoader.processParamsElement(DDLoader.java:1004)
[clientgen] atweblogic.webservice.dd.DDLoader.processOperationElement(DDLoader.java:977)
[clientgen] atweblogic.webservice.dd.DDLoader.processOperationElements(DDLoader.java:853)
[clientgen] atweblogic.webservice.dd.DDLoader.processOperationsElement(DDLoader.java:841)
[clientgen] atweblogic.webservice.dd.DDLoader.processWebServiceElement(DDLoader.java:378)
[clientgen] atweblogic.webservice.dd.DDLoader.processWebServiceElements(DDLoader.java:283)
[clientgen] atweblogic.webservice.dd.DDLoader.processWebServicesElement(DDLoader.java:271)
[clientgen] at weblogic.webservice.dd.DDLoader.load(DDLoader.java:249)
[clientgen] atweblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:79
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EAR
ClientGen.java:330)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
va:110)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
ask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --------------- nested within: ------------------
[clientgen] weblogic.webservice.util.WebServiceJarException: Couldnot
load deployment
descriptor - with nested exception:
[clientgen] [weblogic.webservice.dd.DDProcessingException: Could not
find>required>> attribute "type" for element <fault> (Line 28, Column 8)
[clientgen] atweblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:81
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EAR
ClientGen.java:330)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
va:110)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
ask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
BUILD FAILED
Anybody has any ideas?
Thanks much,
sami -
Invoking Web Service From PL SQL package
Below is the sample code to invoke web service from pl/sql package using UTL_HTTP:
Declare
http_req UTL_HTTP.req;
http_resp UTL_HTTP.resp;
Begin
http_req :=
UTL_HTTP.begin_request
'http://'
|| lv_hosturl
-- || '.net/soa-infra/services/finance_rt/Payments/paymentsprocess_client_ep',
--new url
|| '.net/soa-infra/services/finance_rt/PaymentsReq/paymentsprocess_client_ep?WSDL',
'POST',
'HTTP/1.1'
UTL_HTTP.set_header (http_req, 'Content-Type', 'text/xml');
-- since we are dealing with plain text in XML documents
UTL_HTTP.set_header (http_req,
'Content-Length',
LENGTH (lv_soap_request)
UTL_HTTP.set_header (http_req, 'SOAPAction', '');
-- required to specify this is a SOAP communication
UTL_HTTP.write_text (http_req, lv_soap_request);
http_resp := UTL_HTTP.get_response (http_req);
UTL_HTTP.read_text (http_resp, lv_soap_respond);
UTL_HTTP.end_response (http_resp);
resp := XMLTYPE.createxml (lv_soap_respond);
End;Hi,
there are a lot of option to make plsql web services .
First you can stay with jdev 10.1.3
Use the xmldb servlets
use jdev 11g tp4 to create plsql ws and upgrade to jdev 11g production
And I think in the next release of jdev it will be back , there are more options which disappeared like the adf bc sdo ws or jmx datacontrol etc.
thanks Edwin
Maybe you are looking for
-
How to distinguish built-in SQL functions of PL/SQL?
I m having a hard time to figure out which functions are used ONLY in SQL statements and which are used in regular expr(ie, variable assignment,). Can anyone show me a list of each or perhaps a URL to look for? I have searched through either the deve
-
I can't view the latest text in a conversation
I can't view the latest text in a conversation with iOS 8.1.3 I have an iPhone 5s. When I try to view the last text it automatically snaps up to the 3rd to last text.
-
WRT160NL - Connection drops, Reboots, USB performance
WRT160NL - Connection drops, Reboots, USB performance After reading many posts dating back several months regarding internittent connectivty drops, usb performance issues and users having to reboot there routers frequently with the WRT160NL, I was f
-
Hi, When I try to run the offline distribution wizard, I get the following message. "You cannot run this task with the current security settings" It goes on to tell me to enable access to VB project. I am running MS office 2007 and have this check
-
Accroding to two previous threads: http://forum.java.sun.com/thread.jspa?threadID=5123284 http://forum.java.sun.com/thread.jspa?threadID=790563 A cascading situation is like: JVM-1 + MBeanServer-1 + MBean-1 JVM-2 + MBeanServer-2 + MBean-2 So MBeanSer