Generating a Web Service and Oracle DATE type

Hi,
I need to generate a Web Service from an EJB model based upon entities generated from the Oracle 11g database that contain DATE types.
I realize that java.sql.Date may not be a supported JAX-RPC type but I would be VERY grateful for some instructions about the easiest way to solve this problem when generating the web service in JDeveloper 11g.
The integrated WLS server log looks like this:
<2009-apr-26 kl 23:13 CEST> <Error> <HTTP> <BEA-101216> <Servlet: "WSEE_SERVLET" failed to preload on startup in Web application: "/SessionFacadeBean".
javax.xml.ws.WebServiceException: Unable to create JAXBContext
     at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:158)
     at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:87)
     at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:264)
     at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322)
     at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188)
     Truncated. see log file for complete stacktrace
java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.sql.Timestamp does not have a no-arg default constructor.
     this problem is related to the following location:
          at java.sql.Timestamp
          at public java.sql.Timestamp oracle.Lan.getAterlamnadDatum()
          at oracle.Lan
          at public java.util.List ejbmodel.jaxws.QueryLanFindByNrResponse._return
          at ejbmodel.jaxws.QueryLanFindByNrResponse
..... and so on
The entity bean i question looks like this:
package oracle;
import java.io.Serializable;
import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
@Entity
@NamedQueries({
@NamedQuery(name = "Lan.findAll", query = "select o from Lan o"),
@NamedQuery(name = "Lan.FindByNr", query = "select o from Lan o where o.lanNr = :p_lanNr")
public class Lan implements Serializable {
@Column(name="ATERLAMNAD_DATUM")
private Timestamp aterlamnadDatum;
@Column(nullable = false)
private Long demandcount;
private Timestamp demanddate;
@Column(name="EXEMPLAR_NR", nullable = false)
private Long exemplarNr;
@Column(nullable = false)
private String isbn;
@Id
@Column(name="LAN_NR", nullable = false)
private Long lanNr;
@Column(nullable = false)
private Long remindercount;
private Timestamp reminderdate;
@Column(name="TILLBAKA_DATUM")
private Timestamp tillbakaDatum;
@Column(name="UTLANAD_DATUM")
private Timestamp utlanadDatum;
@ManyToOne
@JoinColumn(name = "PERSON_NR")
private Lantagare lantagare;

Hi All,
When i'm developing EJB Webservice i am getting following error .. i think it doesn't support java.sql.Date; and java.sql.timestamp; types
the error are as show in below please suggest me.
[Running application oil on Server Instance IntegratedWebLogicServer...]
[05:04:09 AM] ---- Deployment started. ----
[05:04:09 AM] Target platform is (Weblogic 10.3).
[05:04:09 AM] Retrieving existing application information
[05:04:09 AM] Running dependency analysis...
[05:04:09 AM] Deploying 2 profiles...
[05:04:10 AM] Wrote EJB Module to C:\Documents and Settings\Administrator\Application Data\JDeveloper\system11.1.1.4.37.59.23\o.j2ee\drs\oil\oil_webservicesEJB.jar
[05:04:10 AM] Wrote Enterprise Application Module to C:\Documents and Settings\Administrator\Application Data\JDeveloper\system11.1.1.4.37.59.23\o.j2ee\drs\oil
[05:04:10 AM] Redeploying Application...
<Jun 30, 2011 5:04:10 AM EDT> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application oil is not versioned.>
<Jun 30, 2011 5:04:10 AM EDT> <Warning> <Munger> <BEA-2156203> <A version attribute was not found in element webservices in the deployment descriptor in C:\Documents and Settings\Administrator\Application Data\JDeveloper\system11.1.1.4.37.59.23\o.j2ee\drs\oil\oil_webservicesEJB.jar/META-INF/webservices.xml. A version attribute is required, but this version of the Weblogic Server will assume that the JEE5 is used. Future versions of the Weblogic Server will reject descriptors that do not specify the JEE version.>
<Jun 30, 2011 5:04:10 AM EDT> <Error> <HTTP> <BEA-101216> <Servlet: "WSEE_SERVLET" failed to preload on startup in Web application: "/oil-oil_webservices-webapp".
javax.xml.ws.WebServiceException: Unable to create JAXBContext
     at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:164)
     at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94)
     at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:281)
     at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:363)
     at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:202)
     Truncated. see log file for complete stacktrace
Caused By: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.sql.Timestamp does not have a no-arg default constructor.
     this problem is related to the following location:
          at java.sql.Timestamp
>
[05:04:11 AM] #### Deployment incomplete. ####
#### Cannot run application oil due to error deploying to IntegratedWebLogicServer.
[05:04:11 AM] Remote deployment failed
[Application oil stopped and undeployed from Server Instance IntegratedWebLogicServer]
Thanks in advance..
Siva
Edited by: Shankar on Jun 30, 2011 7:02 AM

Similar Messages

  • Apex, Web Services, and complex data types?

    Hi all,
    I was wondering if somebody could explain to me what sort of support apex has for using web services with complex data types, and how data returned like this could be interpreted and stored in the database.
    Any help would be aprreciated.
    Thankyou in advance

    Hi can anyone help me with this?

  • Recommended steps to generate a web service using nested complex types

    Hello,
    I need to generate a web service that uses nested complex types with built in types on the bottom layer. I hve posted an attempt at a WSDL. Please give advice on if I am doing it correctly.
    I have the suspicion that I should nest the complex types into the final complex type VendorStockingInterface. Please confirm.
    <?xml version="1.0" encoding="utf-8"?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/"
    xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:s0="http://www.openuri.org/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    targetNamespace="http://www.openuri.org/">
    <types>
    <s:schema targetNamespace="http://www.openuri.org/"
    xmlns:s="http://www.w3.org/2001/XMLSchema">
    <s:element name="RegisterServiceRequest">
    <s:complexType>
    <s:sequence>
    <s:element name="DeviceCapabilities">
    <s:complexType>
    <s:sequence>
    <s:element name="OSName" type="s:string" nillable="true"/>
         <s:element name="OSVersion" type="s:string" nillable="true"/>
         <s:element name="BRType" type="s:string" nillable="true"/>
         <s:element name="DisplayColors" type="s:string" nillable="true"/>
         <s:element name="DisplayTechnology" type="s:string" nillable="true"/>
         <s:element name="NetworkAccess" type="s:boolean" nillable="true"/>
         <s:element name="DownloadMethod" type="s:string" nillable="true"/>
         <s:element name="DownloadVersion" type="s:string" nillable="true"/>
         <s:element name="Protocols" type="s:string" nillable="true"/>
         </s:sequence>
    </s:complexType>
    </s:element>
         <s:element name="LicenseType">
    <s:complexType>
    <s:sequence>
         <s:element name="Licences" type="s:string" nillable="false"/>
    </s:sequence>
    </s:complexType>
    </s:element>
         <s:element name="PriceValue">
    <s:complexType>
    <s:sequence>
         <s:element name="Value" type="s:float" nillable="false"/>
         <s:element name="CurrencyType" type="s:string" nillable="false"/>
    </s:sequence>
    </s:complexType>
    </s:element>
         <s:element name="RevenueModelType">
    <s:complexType>
    <s:sequence>
         <s:element name="VSRP" type="RegisterServiceRequest:PriceValue" nillable="true"/>
         <s:element name="WholesalePrice" type="RegisterServiceRequest:PriceValue" nillable="true"/>
         <s:element name="VendorSplitPercentage" type="s:float" nillable="true"/>
         <s:element name="VendorPurchasePrice" type="RegisterServiceRequest:PriceValue" nillable="true"/>
         <s:element name="License" type="RegisterServiceRequest:LicenseType" nillable="false"/>
    </s:sequence>
    </s:complexType>
    </s:element>
         <s:element name="VendorItemIdentifierType">
    <s:complexType>
    <s:sequence>
         <s:element name="VendorProductDisplay" type="s:string" nillable="false"/>
         <s:element name="VendorProductVersion" type="s:string" nillable="false"/>
         <s:element name="VendorProductCode" type="s:string" nillable="false"/>
    </s:sequence>
    </s:complexType>
    </s:element>     
         <s:element name="VendorBriefType">
    <s:complexType>
    <s:sequence>
         <s:element name="VendorID" type="s:string" nillable="false"/>
    </s:sequence>
    </s:complexType>
    </s:element>     
         <s:element name="VendorItemBriefType">
    <s:complexType>
    <s:sequence>
         <s:element name="VendorProductID" type="RegisterServiceRequest:VendorItemIdentifierType" nillable="false"/>
         <s:element name="VendorID" type="RegisterServiceRequest:VendorBriefType" nillable="false"/>
         <s:element name="VendorDescription" type="s:string" nillable="true"/>
         <s:element name="VendorPricing" type="RegisterServiceRequest:RevenueModelType" nillable="false"/>
         <s:element name="DownloadURL" type="s:string" nillable="true"/>
         <s:element name="ShortCode" type="s:string" nillable="true"/>
         <s:element name="ApplicationCode" type="s:string" nillable="true"/>
         <s:element name="DRMMethod" type="s:string" nillable="true"/>
    </s:sequence>
    </s:complexType>
    </s:element>     
         <s:element name="ContentType">
    <s:complexType>
    <s:sequence>
         <s:element name="Categorization" type="s:string" nillable="false"/>
         <s:element name="MIMEType" type="s:string" nillable="true"/>
    </s:sequence>
    </s:complexType>
    </s:element>     
         <s:element name="VendorStockingInterface">
    <s:complexType>
    <s:sequence>
         <s:element name="VendorItemInfo" type="RegisterServiceRequest:VendorItemBriefType" nillable="false"/>
         <s:element name="ProductType" type="RegisterServiceRequest:ContentType" nillable="false"/>
         <s:element name="DeviceRequirements" type="RegisterServiceRequest:DeviceCapabilitiesType" nillable="true"/>
         <s:element name="VendorPricing" type="RegisterServiceRequest:RevenueModelType" nillable="false"/>
         <s:element name="ProgramMemory" type="s:int" nillable="true"/>
         <s:element name="DataMemory" type="s:int" nillable="true"/>
         <s:element name="Author" type="s:string" nillable="true"/>
         <s:element name="Language" type="s:string" nillable="true"/>
    </s:sequence>
    </s:complexType>
    </s:element>          
    <s:element name="RegisterServiceResponse">
    <s:complexType>
    <s:sequence>
    <s:element name="Message" type="s:string"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </types>
    <message name="RegisterServiceSoapIn">
    <part name="parameters" element="s0:RegisterServiceRequest"/>
    </message>
    <message name="RegisterServiceSoapOut">
    <part name="parameters" element="s0:RegisterServiceResponse"/>
    </message>
    <portType name="RegisterServiceSoap">
    <operation name="RegisterService">
    <input message="s0:RegisterServiceSoapIn"/>
    <output message="s0:RegisterServiceSoapOut"/>
    </operation>
    </portType>
    <binding name="RegisterServiceSoap" type="s0:RegisterServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="RegisterService">
    <soap:operation soapAction="http://www.openuri.org/RegisterService" style="document"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="RegisterService">
    <port name="RegisterServiceSoap" binding="s0:RegisterServiceSoap">
    <soap:address location="http://localhost:7001/RegisterService.jws"/>
    </port>
    </service>
    </definitions>
    I'd like the the consumer of the web service to send it a document with the fields formatted to the VendorInterface complextype which contains the other complextypes. In return the consumer will get another document with some acknowledgement messages.
    To make this happen I'd like to generate the web service, creating the complex type classes and XMLBeans. I'd like advice on the steps to take once I get a good WSDL.
    There is also the option to go from the other direction. Is it better to attempt to create a schema XSD document instead and use that to work towards the web service and WSDL? If so, could someone give an example of how to format an XSD using my example needs.

    I think I have got it all in place, though I have not tested it as of yet. For others who are looking at this, here is my XSD file from which all my complextypes were generated and lastly here is the actual web service file.
    ?xml version="1.0"?>
    <xs:schema targetNamespace="http://openuri.org/RegisterService"
    xmlns:rs="http://openuri.org/RegisterService"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    xmlns:tns="http://temp.openuri.org/VerizonBOBO/RegisterServiceRequestDocument.xsd">
    <xs:element name="RegisterServiceRequest" type="rs:VendorStockingInterface"/>
    <xs:complexType name="DeviceCapabilitiesType">
    <xs:sequence>
    <xs:element name="OSName" type="xs:string" nillable="true"/>
    <xs:element name="OSVersion" type="xs:string" nillable="true"/>
    <xs:element name="BRType" type="xs:string" nillable="true"/>
    <xs:element name="DisplayColors" type="xs:string" nillable="true"/>
    <xs:element name="DisplayTechnology" type="xs:string" nillable="true"/>
    <xs:element name="NetworkAccess" type="xs:boolean" nillable="true"/>
    <xs:element name="DownloadMethod" type="xs:string" nillable="true"/>
    <xs:element name="DownloadVersion" type="xs:string" nillable="true"/>
    <xs:element name="Protocols" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="LicenseType">
    <xs:sequence>     
    <xs:element name="Licences" type="xs:string" nillable="false"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="PriceValue">
    <xs:sequence>
    <xs:element name="Value" type="xs:float" nillable="false"/>
    <xs:element name="CurrencyType" type="xs:string" nillable="false"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="RevenueModelType">
    <xs:sequence>
    <xs:element name="VSRP" type="rs:PriceValue" nillable="true"/>
    <xs:element name="WholesalePrice" type="rs:PriceValue" nillable="true"/>
    <xs:element name="VendorSplitPercentage" type="xs:float" nillable="true"/>
    <xs:element name="VendorPurchasePrice" type="rs:PriceValue" nillable="true"/>
    <xs:element name="License" type="rs:LicenseType" nillable="false"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="VendorItemIdentifierType">
    <xs:sequence>
    <xs:element name="VendorProductDisplay" type="xs:string" nillable="false"/>
    <xs:element name="VendorProductVersion" type="xs:string" nillable="false"/>
    <xs:element name="VendorProductCode" type="xs:string" nillable="false"/>
         </xs:sequence>
    </xs:complexType>
    <xs:complexType name="VendorBriefType">
    <xs:sequence>
    <xs:element name="VendorID" type="xs:string" nillable="false"/>
         </xs:sequence>
    </xs:complexType>
    <xs:complexType name="VendorItemBriefType">
    <xs:sequence>
    <xs:element name="VendorProductID" type="rs:VendorItemIdentifierType" nillable="false"/>
    <xs:element name="VendorID" type="rs:VendorBriefType" nillable="false"/>
    <xs:element name="VendorDescription" type="xs:string" nillable="true"/>
    <xs:element name="VendorPricing" type="rs:RevenueModelType" nillable="false"/>
    <xs:element name="DownloadURL" type="xs:string" nillable="true"/>
    <xs:element name="ShortCode" type="xs:string" nillable="true"/>
    <xs:element name="ApplicationCode" type="xs:string" nillable="true"/>
    <xs:element name="DRMMethod" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="ContentType">
    <xs:sequence>
    <xs:element name="Categorization" type="xs:string"/>
    <xs:element name="MIMEType" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="VendorStockingInterface">
    <xs:sequence>
    <xs:element name="VendorItemInfo" type="rs:VendorItemBriefType"/>
    <xs:element name="ProductType" type="rs:ContentType"/>
    <xs:element name="DeviceRequirements" type="rs:DeviceCapabilitiesType"/>
    <xs:element name="VendorPricing" type="rs:RevenueModelType"/>
    <xs:element name="ProgramMemory" type="xs:int"/>
    <xs:element name="DataMemory" type="xs:int"/>
    <xs:element name="Author" type="xs:string"/>
    <xs:element name="Language" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="RegisterServiceResponse">
    <xs:sequence>
    <xs:element name="Message" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    The Web Service File:
    import org.openuri.registerService.RegisterServiceResponse;
    import org.openuri.registerService.RegisterServiceRequestDocument;
    import com.verizon.hp.registerservice.*;
    public class RegisterService implements com.bea.jws.WebService
    static final long serialVersionUID = 1L;
    * @common:operation
    * @jws:protocol form-post="false" form-get="false"
    public org.openuri.registerService.RegisterServiceResponse RegisterService(org.openuri.registerService.RegisterServiceRequestDocument RegisterServiceDoc)
    VendorStockingInterface vsInterface = (VendorStockingInterface)RegisterServiceDoc.getRegisterServiceRequest();
    System.out.println(vsInterface.toString());
    com.verizon.hp.registerservice.RegisterServiceResponse serviceResponse = new com.verizon.hp.registerservice.RegisterServiceResponse();
    serviceResponse.setMessage("Register New Service Message has been received successfully");
    org.openuri.registerService.RegisterServiceResponse response = (org.openuri.registerService.RegisterServiceResponse)serviceResponse;
    return response;
    }

  • Web Services with Complex Data Types in ADF 11g

    Shay Shmeltzer's following blogpost can answer my questions but all the links there
    http://blogs.oracle.com/shay/2009/09/web_services_with_complex_data.html
    Can you please point us to the correct links for the following documents?
    http://www.oracle.com/technology/tech/fmw4apps/agile/pdf/adf11g-agile.pdf
    http://www.oracle.com/technology/products/jdev/tips/fnimphius/wsdccomplexinputtype/index.html

    Thanks. We are using a Java Proxy to consume the web service as we need to use JAX-WS handlers. We created data control from the service stub that was created by the proxy. Our issue is with the response XML which comes as a complex type. Also, the data control is understanding the complex type and is creating the structure right. The problem is when we drag that control on a JSF page. No data is displayed. We think that we are not traversing the complex object properly which is creating the issue.
    I understand that you answer related to the input is applicable to output as well. We can change the structure by flattening it but we thought that in 11G there is some new features where we can use the complex types out of the box without any change. Is that true? Also, any luck in finding the documents (broken links) on your blog page?

  • JAVA WEB SERVICE AND ORACLE DATABASE

    Hi,
    I working with Oracle database 10g, Oracle Bpel 10.1.2.0 and JDeveloper 10g on windows xp home.
    I have created a java class with incapsulated sql statement (jdbc protocol).
    All it's ok when the class runs from command line (JCreator).
    After that i created the web service from java classes (with JDeveloper) and I connected (with success) database to OC4J and run the web service, i have this xml message like result:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <SOAP-ENV:Body>
    - <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring>java.lang.NullPointerException</faultstring>
    <faultactor>/DipendentiWebService/DipendentiWebService</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Which's my error?
    Thanks

    Hi Frank,
    thank you for the reply, but i don't undertsand what do you mean "add print statement to java class".
    follows the java class code that loads a mail address from database oracle:
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    import java.sql.SQLException;
    import java.util.*;
    import java.sql.*;
    import utility.*;
    import java.lang.*;
    import java.io.*;
    public class DipendentiWS{
    protected static String matricola = null;
    protected static String email = null;
    private static DBConnectionManager connMgr;
    private static Connection conn = null;
    private static Statement st = null;
    private static PreparedStatement pstmt;
    private static ResultSet rs = null;
    private static final String FIND_BY_MATRICOLA = "SELECT Email FROM ARDIP.DIPENDENTI " +
                                                           "WHERE Matricola = ?";
    // metodo ausiliario per il rilascio delle risorse
    * @webmethod
         public static String leggiMail(String matricola)throws SQLException{
         // Caricamento dati Dipendente da DB
         try {
    connMgr = DBConnectionManager.getInstance();
         Connection conn = connMgr.getConnection("access");
    if (conn != null) {
         conn.setAutoCommit(false);
    st = conn.createStatement();
    pstmt = conn.prepareStatement(FIND_BY_MATRICOLA);
                   pstmt.setString(1, matricola);
                   rs = pstmt.executeQuery();
    if (rs.next()) {
    email =rs.getString(1);
    conn.commit();
    // conn.setAutoCommit(true);
    catch(SQLException e){
         e.printStackTrace();
         System.err.println("ATTENZIONE!!!!");
              finally {
         try {st.close();}
         catch(SQLException ex){ ex.printStackTrace();}
              return email;      
         }

  • Web Services and Nested Complex Types

    I am having troubles trying to get coldfusion to use a web
    service function.
    I know that the web service works as I am sending another
    function in a simple variable and receiving a simple variable. I
    know the function exists as I when I dump the object the function
    is there and I have been told by who supplies it that it works in
    other languages.
    The problem I am having is that when I call the function I
    get the following error: Web service operation "[function name]"
    with parameters [parameters] could not be found. I am lead to
    believe that it may have to do with the fact that one of the
    parameters is a complex type with nested complex types, because of
    the amount of trouble it took to get nested complex types to
    (apparently) work.
    Has anyone had this problem before and/or know how to fix
    it?

    You can invoke methods which take complextypes as parameters.
    The idea is to create first a structure which represents the
    complextype. For example; crit = structNew(), crit.paramname1 =
    value1, ctir.paramname2 = value2. After this, you just pass the
    structure
    crit as a parameter value, for example with
    <cfinvokeargument>.
    Always check the wsdl and the possible documentation
    carefully. You'll get always an error if the types of the
    parameters passed didn't match exactly to what was expected.
    Handling complextype responses is also possible, but not very
    elegant with ColdFusion.
    For example, you have <cfinvoke
    returnvariable="wsResult"... >, and you get a java object as a
    response which you can really do nothing about with CF functions,
    you must use Java Reflection API to extract the values.
    <cfset oFields =
    wsresult.getClass().getDeclaredFields()>
    <cfoutput>
    <cfloop from="1" to="#arraylen(oFields)#" index="fi">
    <cfset field = oFields[fi].getName()>
    <cfif isdefined("wsresult." & field) AND field NEQ
    "typedesc">
    #field# = #wsResult[field]#<br>
    </cfif>
    </cfloop>
    </cfoutput>
    The above is just an example, and It might work with only
    some types of complextype responses. But it's a start. :)
    http://www.mail-archive.com/[email protected]/msg00553.html
    is also another example about handling complextype responses. It
    plays "safer", not relying that CF can extract values without
    "getters" automatically, and is more of a complete solution.

  • Web Service and Oracle HTTP Server

    I have a web environment with Oracle Database 10.2.0.3 , oracle http server (using mod_plsql), Oracle pl/sql web toolkit. I need to create a web service that is accessed externally which will interact with the database (select, insert, delete). Is it possible to publish a web service to the Oracle Http Server or to implement web services with the environment above

    Hello,
    In RDBMS 10g you cannot directly expose WS from the DB you need to use the OracleAS Web Service Runtime to do it, following this documentation:
    - Developing Web Services that Expose Database Resources
    This is true if we are talking about "tooling/runtime/API" but after all Web Services are mainly XML (WSDL and SOAP) so it is still possible to create by hands (PL/SQL & static files) but it is probably a long work depending of the complexity of your services.
    Also, in RDBMS 11, you can now directly expose WS from the DB using the embedded HTTP server, see this Oracle 11g New Features Document
    Note that before taking one approach you must take time to write up your requirement regarding Web Services eg: do I need security, which time of encoding, interoperability, ..., ... For example WS-Security that is the standard to secure SOAP messages is not (yet) supported by the Oracle 11g RDBMS Native Web Services... where when you do use the WS-Runtime you can secure the Web Service..
    Regards
    Tugdual Grall

  • Quick questions on the topic of Web Services and EJB POJOs

    I have been reading about Web Services and the data types that are aloud as operation parameters and return types. I was wondering what the standard practice for return types; is it to use the Entity classes straight and customize the WSDL instead of letting the EE container do it (avoid cyclic problems in the schema that can occur when using entity 1-to-many and many-to-1 mappings) or; is it to off load the data into a DTO/VO/Bean and let the EE container take care of all the schema mapping for the WSDL? I look at the EE tutorial and bought a EE book both use very basic examples that do not include connecting to a database or using EJB3 for the data store.
    Thanks for any information

    bump

  • Web Services and Internal Tables.

    Hi.
    In the next days I will need to create a program to consume a Web Service that is going to return data like an internal table, I mean...
    Field1a | Field2a | Field3a
    Field1b | Field2b | Field3b
    Field1c | Field2c | Field3c
    Do you have any ABAP example of consuming a Web Service and receiving data into an internal table?
    Thanx in advanced.
    Edited by: urjose on Jun 19, 2008 8:47 PM

    Hello,
    Maybe this links will give you a hint.
    /people/thomas.jung3/blog/2005/01/05/develop-a-web-service-that-sends-an-email--in-abap
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/ae1b9a5d2cef4ea4b579f19d902871/content.htm
    Bye
    Gabriel P.-

  • No data in generated document/web service data source/complex response type

    I can define a report with a template with the BI Publisher server and the Template Builder Desktop plugin. When I use an sql statement as data source the preview functionality in Word and in the browser (logged in to the server) results in a correct report, with the correct data from the data source.
    When I use a web service as a data source I can still generate and preview reports but no data from the data source is visible in the reports. However this data is available in the Template Builder plugin in MS-Word.
    How do I know this ? When I try to insert a field from the data source into my rtf template the plugin shows a screen with the available fields. Or actually, the screen shows all fields returned by a dummy call to the web service. When I click on a field it shows the value returned by the web service just after the test "Example". I have set up my web service such that it always returns the same response.
    The field I want to show is in a repeating record, but it does not make a difference when I surround it by a group:
    <?for-each-group:/getValidationGroupsResponse/body/validationGroupList/validationGroup[1];./name?><?name?><?end for-each-group?>
    Neither does looping over all fields display any data:
    <?for-each-group:/getValidationGroupsResponse/body/validationGroupList/validationGroup;./name?><?name?><?end for-each-group?>
    The fact that the response of my web service data source contains repeating records might be different from what others have tested so far.
    I also found two other features when defining reports. I mention them here because they could be related to my problem. When I define two data source for my report, a web service and an sql query then only the fields from the sql query are visible in MS-Word/Template Builder. Even when the Data Model specifies the web service as "Main Data Set". And the "Default data source" is always a database even when the Data Model only defines a web service as "Data Set".
    Edited by: CalculateOnline.org on May 21, 2010 2:36 PM: changed title

    Unfortunately I can not test against a public webservice and follow the examples in the tutorials, since BI Publisher does not seem to offer any proxy configuration to connect to the internet.
    My local webservice returns the following data, visible when viewing the report from the backend, when no template has been defined yet:
    <ns2:getValidationGroupsResponse xmlns:ns2="amsterdam/wabo/services/data/validationOperations" xmlns="amsterdam/wabo/services/data/common">
    <ns2:responseHeader>
    <resultaatcode>OK</resultaatcode>
    </ns2:responseHeader>
    <ns2:body>
    <ns2:validationGroupList>
    <ns2:validationGroup>
    <ns2:name>testgroep1</ns2:name>
    <ns2:caption>kop1</ns2:caption>
    <ns2:description>Voor testen ontvankelijkheidstest 1</ns2:description>
    </ns2:validationGroup>
    <ns2:validationGroup>
    <ns2:name>testgroep2</ns2:name>
    <ns2:caption>kop2</ns2:caption>
    <ns2:description>Voor testen ontvankelijkheidstest 2</ns2:description>
    </ns2:validationGroup>
    </ns2:validationGroupList>
    </ns2:body>
    </ns2:getValidationGroupsResponse>
    After defining the template, the values of the first group are visible in MS-Word as well, as example values.
    I put the the template in a public place:
    http://www.calculateonline.org/projects/bipublisher/template1.rtf
    Just in case you need the wsdl as well:
    http://www.calculateonline.org/projects/bipublisher/validationOperations.wsdl

  • Oracle Web Services and HashMap

    Hi All,
    I am trying to create a web service for a method that accepts HashMap parameter. When I try to generate the web service for this method, I am getting error message mentioning that there is no mapping for HashMap.
    I am using JDev 10.1.3.3.
    Can someone please let me know how to handle this issue.
    Thanks,
    J

    Hi,
    I am having a similar issue and I want to use java.util.List in one of the remote method's return type.
    This is the schema:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://ae.amaf.mems/webservices/types"
    elementFormDefault="qualified"
    xmlns:tns="http://ae.amaf.mems/webservices/types"
    xmlns:owi="http://www.oracle.com/webservices/internal/literal">
    <xsd:import namespace="http://www.oracle.com/webservices/internal/literal"></xsd:import>
    <xsd:complexType name="BankType">
    <xsd:sequence>
    <xsd:element name="id" type="xsd:int" nillable="true"/>
    <xsd:element name="nameE" type="xsd:string" nillable="true"/>
    <xsd:element name="nameA" type="xsd:string" nillable="true"/>
    <xsd:element name="address" type="xsd:string" nillable="true"/>
    <xsd:element name="pobox" type="xsd:string" nillable="true"/>
    <xsd:element name="phone" type="xsd:string" nillable="true"/>
    <xsd:element name="fax" type="xsd:string" nillable="true"/>
    <xsd:element name="email" type="xsd:string" nillable="true"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="BankBranchType">
    <xsd:sequence>
    <xsd:element name="id" type="xsd:int" nillable="true"/>
    <xsd:element name="nameE" type="xsd:string" nillable="true"/>
    <xsd:element name="nameA" type="xsd:string" nillable="true"/>
    <xsd:element name="address" type="xsd:string" nillable="true"/>
    <xsd:element name="pobox" type="xsd:string" nillable="true"/>
    <xsd:element name="phone" type="xsd:string" nillable="true"/>
    <xsd:element name="fax" type="xsd:string" nillable="true"/>
    <xsd:element name="email" type="xsd:string" nillable="true"/>
    <xsd:element name="bankId" type="xsd:int" nillable="true"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="BankTypeCollection">
         <xsd:sequence>
              <xsd:element name="banks" type="owi:list" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    When I am trying to generate interfaces for the weservices using web service assembler, it is reporting:
    SEVERE: OWS-30033 WSDL validation failed. model error: type "{http://www.oracle.com/webservices/internal/literal}list" not found.
    If somebody knows where to find schema xsd file for the namespace "http://www.oracle.com/webservices/internal/literal" please reply.
    Regards,
    Mehdi

  • Insert current date and time into Oracle date type field

    I have a JDBC current date and time insert into Oracle 9i that almost works. It submits the current date and a fixed time into the Oracle date type field. I am using Tomcat 6.0.20.
    For example if I insert the data at 7:24:04 PM on Feb 16, 2010 it will insert as: 16-Feb-2010 12:00:00 AM
    The date part works but the time always shows 12:00:00 AM no matter what date or time the data is inserted.
    Here is what I have for my JDBC inserts and I also tried something with DateFormat:
    PreparedStatement ps; Date mydate = new Date(new java.util.Date().getTime()); //insert statement here.... stmt.setDate(1,mydate);
    I also tried:
    PreparedStatement ps; java.sql.Timestamp mydate = new java.sql.Timestamp(new java.util.Date().getTime()); SimpleDateFormat fmt = new SimpleDateFormat(.... //insert statement here.... ps.setTimestamp(1,fmt.format(mydate));
    Both keep submitting the date into Oracle as 16-Feb-2010 12:00:00 AM
    Anyway to get the current date and time? For example if I insert the data at 7:24.04 pm today it should show as 16-Feb-2010 07:24.04 PM in Oracle.

    sportsMarkr wrote:
    Date mydate = new Date(new java.util.Date().getTime());Please see the javadocs for java.sql.Date and note the part that says "...to zero"
    [http://java.sun.com/javase/6/docs/api/java/sql/Date.html]
    If you want a date and time then use java.sql.Timestamp.

  • UNDERSTAND THE NEW DATE AND TIME DATA TYPES IN ORACLE 9I

    제품 : SQL*PLUS
    작성날짜 : 2001-08-01
    UNDERSTAND THE NEW DATE AND TIME DATA TYPES IN ORACLE 9I
    ========================================================
    PURPOSE
    Oracle 9i 에서 소개되는 새로운 datetime data type 에 대해 소개한다.
    Explanation
    Example
    1. Datetime Datatypes
    1) TIMESTAMP
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND
    2) TIMESTAMP WITH TIME ZONE
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND/
    TIMEZONE_HOUR/TIMEZONE_MINUTE( +09:00 )
    or TIMEZONE_REGION( Asia/Seoul )
    3) TIMESTAMP WITH LOCAL TIME ZONE
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND
    4) TIME WITH TIME ZONE
    : HOUR/MINUTE/SECOND/TIMEZONE_HOUR/TIMEZONE_MINUTE
    2. Datetime Fields
    1) YEAR/MONTH/DAY/HOUR/MINUTE
    2) SECOND(00 to 59.9(N) is precision) : Range 0 to 9, default is 6
    3) TIMEZONE_HOUR : -12 to 13
    4) TIMEZONE_MINUTE : 00 to 59
    5) TIMEZONE_REGION : Listed in v$timezone_names
    3. DATE 와 TIMESTAMP 와의 차이점
    SQL> select hiredate from emp;
    HIREDATE
    17-DEC-80
    20-FEB-81
    SQL> alter table employees modify hiredate timestamp;
    SQL> select hiredate from employees;
    HIREDATE
    17-DEC-80 12.00.00.000000 AM
    20-FEB-81 12.00.00.000000 AM
    단, 해당 Column 에 Data 가 있다면 DATE/TIMESTAMP -> TIMESTAMP WITH
    TIME ZONE 으로 Convert 할 수 없다.
    SQL> alter table employees modify hiredate timestamp with time zone;
    alter table employees modify hiredate timestamp with time zone
    ERROR at line 1:
    ORA-01439: column to be modified must be empty to change datatype
    4. TIMESTAMP WITH TIME ZONE Datatype
    TIMESTAMP '2001-05-24 10:00:00 +09:00'
    TIMESTAMP '2001-05-24 10:00:00 Asia/Seoul'
    TIMESTAMP '2001-05-24 10:00:00 KST'
    5. TIMESTAMP WITH LOCAL TIME ZONE Datatype
    SQL> create table date_tab (date_col TIMESTAMP WITH LOCAL TIME ZONE);
    SQL> insert into date_tab values ('15-NOV-00 09:34:28 AM');
    SQL> select * from date_tab;
    DATE_COL
    15-NOV-00 09.34.28.000000 AM
    SQL> alter session set TIME_ZONE = 'EUROPE/LONDON';
    SQL> select * from date_tab;
    DATE_COL
    15-NOV-00 12.34.28.000000 AM
    6. INTERVAL Datatypes
    1) INTERVAL YEAR(year_precision) TO MONTH
    : YEAR/MONTH
    : Year_precision default value is 2
    SQL> create table orders (warranty interval year to month);
    SQL> insert into orders values ('2-6');
    SQL> select warranty from orders;
    WARRANTY
    +02-06
    2) INTERVAL DAY (day_precision) TO SECOND (fractional_seconds_precision)
    : DAY/HOUR/MINUTE/SECOND
    : Logon time 확인시 주로 사용
    : day_precision range 0 to 9, default is 2
    SQL> create table orders (warranty interval day(2) to second);
    SQL> insert into orders values ('90 00:00:00');
    SQL> select warranty from orders;
    WARRANTY
    +90 00:00:00.000000
    7. Interval Fields
    - YEAR : Any positive or negative integer
    - MONTH : 00 to 11
    - DAY : Any positive or negative integer
    - HOUR : 00 to 23
    - MINUTE : 00 to 59
    - SECOND : 00 to 59.9(N) where 9(N) is precision
    8. Using Time Zones
    1) Database operation
    - Defined at CREATE DATABASE
    - Can be altered with ALTER DATABASE
    - Current value given by DBTIMEZONE
    2) Session operation
    - Defined with environment variable ORA_SDTZ
    - Can be altered with ALTER SESSION SET TIME_ZONE
    - Current value given by SESSIONTIMEZONE
    3) TIMESTAMP WITH LOCAL TIMEZONE
    - TIME_ZONE Session parameter
    : O/S Local Time Zone
    Alter session set time_zone = '-05:00';
    : An absolute offset
    Alter session set time_zone = dbtimezone;
    : Database time zone
    Alter session set time_zone = local;
    : A named region
    Alter session set time_zone = 'America/New_York';
    Reference Document
    ------------------

    Hi ,
    I am facing the same problem and my scenario is also same (BAPI's).
    So can you please tell me how you overcome this problem .
    Thanks,
    Rahul

  • Mapping between oracle data types and ms sql server data types

    hello
    i need mapping between oracle data types and ms sql server data types
    where can i find them ?

    read this
    http://download.oracle.com/docs/cd/E10405_01/doc/appdev.120/e10379/ss_oracle_compared.htm

  • How to Create and Deploy Web Services Using Oracle 9i JDeveloper

    Hi,
    My Question is how to create and deploy Web Services using Oracle 9i JDeveloper.Anybody please give me a detailed Reply.Please Reply to [email protected]
    Hopr to Hear From you,
    Regards,
    G Sreekumar

    You could use datasources. You should do this in your BC4J Configuration. Then when deploying your applicaiton use the command -installDataSource (from admin.jar) to create the right datasource.
    You could probably use the name of your connection + "DS" so you can also use it locally in JDeveloper as JDev seesm to create this automaticly for your Connections.

Maybe you are looking for