UI -- Web Services -- PL/SQL API

Hi all,
We inherited an existing application, which has this architecture:
UI - C# (Windows forms, not web based), completely DB agnostic
WS - Web services, C#
DB - Oracle 10g, >500 tables
API - PL/SQL
Because the UI is DB blind, few information (parameters) can be sent to the WS, and this forces highly customized WS (thousands of them; hence, low probability of being by other applications in the future). More, each customized WS calls a customized SP.
What I'd like to do is, if not allowed to use generic WS, at least to be allowed to write generic SP (PL/SQL).
Here's a simple example:
say , in a UI an user enter 5 fields. These strings are sent to WS, as input. We know what table and columns the 5 strings will go to, but only in the WS (not in the UI). So, in the WS I can build:
INSERT INTO tableName(c1, ..., c5) VALUES (v1, ..., v5)
and then call a gSP which will merely execute the SQL statement.
The issue here is that some other apps would want to insert other column attributes in the table, and I do not want to write cSP for, say, 2 fields, or 6, etc. Instead, a cWS has to be written.
Any ideas?
Thanks a lot.

user10817976 wrote:
1. What are the pitfalls of dynamic SQL (OK, other than SQL injection, which can be easilly addressed with regular expressions scanning)Dynamic SQL is not a "+Bad Thing+". It is a very useful tool in the toolbox. The problem is how the tool is used - or abused.
SQL injection is basically only a problem with dynamic SQL when it does not use bind variables. To explain. Dynamically creating the SQL is not the problem - you write the (trusted) code that creates the SQL. The problem is when putting end-user input into that SQL. When the input is strung into the SQL, you're not exactly sure what you are adding to the SQL. If the SQL is using bind variables, and you bind the end-user input as variables values - that is safe. End-user input is not parsed as part of the SQL cursor.
2. How big an application APEX can take (as I said, we have 500+ tables, but we are on Oracle 10g)
Actually, I was considering myself looking into APEX. The thing is that we are tied to the existing architecture and will be hard to convince the IT to give it up.APEX is PL/SQL. How many tables do the large PL/SQL systems like Oracle Applications/Financials/etc have?
People often sees APEX as something else. Exactly what else I'm not sure as I deal with questions like "+Why is APEX down?+" when the database is up and running... or "+APEX is not enterprise enough+" when some of the biggest enterprise systems on Oracle is all PL/SQL. Just like APEX.
I have fought the APEX battle on my side since version 1. The developers choice was J2EE. I simply went ahead and did my stuff in APEX and kept on showing what APEX is capable of. Years later and they are sold on APEX.. as there is no denying that it is a lot faster ito development and deployment than J2EE. It is a lost easier, requiring a much smaller skill set (no real knowledge of stateless web architecture). Heck, basic APEX apps only require very little SQL knowledge. It is cheaper as no expensive app servers are needed. It scales, as APEX is PL/SQL and that scales with the database tier.
I do not like everything about APEX. I would have preferred a differently designed and coded run-time system. It is not generic enough as does not provide the flexibility I would like. But despite that - it is the fastest web development environment there is. And one of the most effective ones.
And as it is PL/SQL, it is "+enterprise+" and can scale and can deal with very large databases.

Similar Messages

  • Web Services SDK (Java API)

    Hi,
    By using Web Services SDK (Java API) can I extract the Table,Join information related to a Universe?
    If so, then can you please give me some guidelines?
    Thanks
    Nirabhra

    Hi Nirabhra,
    I don't think this is possible with the Web Services SDK.
    This can only be done through the Universe Designer SDK (which is only available in COM).
    Please kindly refer to the API reference for the Universe Designer SDK for more details:
    [http://help.sap.com/businessobject/product_guides/boexir31/en/bodessdk.chm]
    Hope this helps.
    Regards,
    Dan

  • Example of Asynchronous Web Service Using Oracle APIs

    Greetings,
    Is there any tutorial, section or example of Oracle, that explains clearly, how to create an Asynchronous Web Service using Oracle APIs.
    Thakns in advance for your help.-

    Does this help:
    http://niallcblogs.blogspot.com/2009/03/calling-async-bpel-process-from-jdev.html

  • Calling web service from SQL 2008 error: System.Security.HostProtectionException: Attempted to perform an operation that was forbidden by the CLR host.

    Hi, 
    Im trying to use web service in c# sql database project. when running stored procedure, in which the web service should be called, im getting this error:
    System.TypeInitializationException: The type initializer for 'System.ServiceModel.ClientBase`1' threw an exception. ---> System.Security.HostProtectionException: Attempted to perform an operation that was forbidden by the CLR host.
    at System.ServiceModel.DiagnosticUtility.GetUtility()
    at System.ServiceModel.DiagnosticUtility.get_Utility()
    at System.ServiceModel.ClientBase`1..cctor()
    The protected resources (only available with full trust) were:
    All
    The demanded resources were:
    Synchronization, ExternalThreading
    --- End of inner exception stack trace ---
    at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()
    at System.ServiceModel.ClientBase`1..ctor()
    at UMGClient..ctor()
    at UMG_StoredProcedures.spUMG_ProcessEmail(SqlInt64 cid_request)
    Here is the code:
    using System;
    using System.Data;
    using System.Data.SqlClient;
    using System.Data.SqlTypes;
    using Microsoft.SqlServer.Server;
    using CredexDB.Workflow;
    using System.Collections.Generic;
    using CredexDB.umgwcftest;
    public partial class UMG_StoredProcedures
    /// <summary>
    /// </summary>
    /// <param name="bankDate"></param>
    /// <param name="stateCategory"></param>
    [Microsoft.SqlServer.Server.SqlProcedure]
    public static void spUMG_ProcessEmail( SqlInt64 cid_request )
    SqlConnection conn = new SqlConnection("Context Connection=true;");
    conn.Open();
    try
    SqlContext.Pipe.Send("A");
    UMGClient umgcl = new UMGClient();
    SqlContext.Pipe.Send("B");
    UMGwcf.SoapExchangeMailMessage email = new UMGwcf.SoapExchangeMailMessage();
    string[] names = new string[1];
    names[0] = "[email protected]";
    email.To = names;
    email.Subject = "Test UmgWcf";
    email.MessageBody = "Testovacia správa - ľľššččťťťýéáí";
    email.From = "[email protected]";
    email.Priority = 20;
    email.Sender = 1;
    email.DoNotArchive = false;
    email.EncryptAndSign = false;
    //long ret = umgcl.SendMailMessage(email);
    catch (Exception e)
    SqlContext.Pipe.Send("C");
    SqlContext.Pipe.Send(e.ToString());
    finally
    SqlContext.Pipe.Send("D");
    conn.Close();
    private static void execSql(string sql, SqlConnection conn)
    new SqlCommand(sql, conn).ExecuteNonQuery();
    The error occurs at this row:
    UMGClient umgcl = new UMGClient();
    Here is the UMG class:
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="vub.sk/UMGwcf", ConfigurationName="IUMG")]
    public interface IUMG
    [System.ServiceModel.OperationContractAttribute(Action="vub.sk/UMGwcf/IUMG/SendMailMessage", ReplyAction="vub.sk/UMGwcf/IUMG/SendMailMessageResponse")]
    long SendMailMessage(UMGwcf.SoapExchangeMailMessage message);
    [System.ServiceModel.OperationContractAttribute(Action="vub.sk/UMGwcf/IUMG/ResendEmailMessage", ReplyAction="vub.sk/UMGwcf/IUMG/ResendEmailMessageResponse")]
    long ResendEmailMessage(long emailid);
    [System.ServiceModel.OperationContractAttribute(Action="vub.sk/UMGwcf/IUMG/GetEmailById", ReplyAction="vub.sk/UMGwcf/IUMG/GetEmailByIdResponse")]
    UMGwcf.SoapDeliveredMailMessage GetEmailById(long emailid);
    [System.ServiceModel.OperationContractAttribute(Action="vub.sk/UMGwcf/IUMG/SendSMSMessage", ReplyAction="vub.sk/UMGwcf/IUMG/SendSMSMessageResponse")]
    long SendSMSMessage(UMGwcf.SoapSMSMessage smsmessage);
    [System.ServiceModel.OperationContractAttribute(Action="vub.sk/UMGwcf/IUMG/GetSMSById", ReplyAction="vub.sk/UMGwcf/IUMG/GetSMSByIdResponse")]
    UMGwcf.SoapDeliveredSMSMessage GetSMSById(long smsid);
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public interface IUMGChannel : IUMG, System.ServiceModel.IClientChannel
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class UMGClient : System.ServiceModel.ClientBase<IUMG>, IUMG
    public UMGClient()
    public UMGClient(string endpointConfigurationName) :
    base(endpointConfigurationName)
    public UMGClient(string endpointConfigurationName, string remoteAddress) :
    base(endpointConfigurationName, remoteAddress)
    public UMGClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
    base(endpointConfigurationName, remoteAddress)
    public UMGClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
    base(binding, remoteAddress)
    public long SendMailMessage(UMGwcf.SoapExchangeMailMessage message)
    return base.Channel.SendMailMessage(message);
    public long ResendEmailMessage(long emailid)
    return base.Channel.ResendEmailMessage(emailid);
    public UMGwcf.SoapDeliveredMailMessage GetEmailById(long emailid)
    return base.Channel.GetEmailById(emailid);
    public long SendSMSMessage(UMGwcf.SoapSMSMessage smsmessage)
    return base.Channel.SendSMSMessage(smsmessage);
    public UMGwcf.SoapDeliveredSMSMessage GetSMSById(long smsid)
    return base.Channel.GetSMSById(smsid);
    the CLR where created as follows:
    ALTER DATABASE XXXX SET TRUSTWORTHY ON;
    CREATE ASSEMBLY [System.ServiceModel]
    FROM 'C:\ttrojcak\System.Runtime.Serialization.dll'
    WITH PERMISSION_SET = UNSAFE
    CREATE ASSEMBLY [System.ServiceModel]
    FROM 'C:\ttrojcak\System.ServiceModel.dll'
    WITH PERMISSION_SET = UNSAFE
    the message window shows warnings:
    Warning: The Microsoft .NET Framework assembly 'system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.web, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=x86.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.drawing, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.directoryservices, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.directoryservices.protocols, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.enterpriseservices, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=x86.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.runtime.remoting, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.runtime.serialization.formatters.soap, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.design, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.windows.forms, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'accessibility, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.drawing.design, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.web.regularexpressions, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.serviceprocess, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.configuration.install, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.identitymodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.messaging, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'system.identitymodel.selectors, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Warning: The Microsoft .NET Framework assembly 'microsoft.transactions.bridge, version=3.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    creating store procedure:
    EXEC sp_executesql N'
    CREATE PROCEDURE [spUMG_ProcessEmail]
    @cid_request bigint
    AS
    EXTERNAL NAME [CredexDB].[UMG_StoredProcedures].[spUMG_ProcessEmail]'
    IF (@@ERROR = 0)
    BEGIN
    DECLARE @procSchema sysname
    DECLARE @procName sysname
    SELECT @procSchema = SCHEMA_NAME(schema_id), @procName = name
    FROM sys.objects
    WHERE object_id = OBJECT_ID(N'[spUMG_ProcessEmail]')
    EXEC sp_addextendedproperty 'AutoDeployed', N'yes',
    'SCHEMA', @procSchema,
    'PROCEDURE', @procName
    EXEC sp_addextendedproperty 'SqlAssemblyFile', N'UMG\UMG.cs',
    'SCHEMA', @procSchema,
    'PROCEDURE', @procName
    EXEC sp_addextendedproperty 'SqlAssemblyFileLine', 95,
    'SCHEMA', @procSchema,
    'PROCEDURE', @procName
    END
    Any tips? 
    Thank you

    and this moves me to another problem. the stored procedure spUMG_ProcessEmail is unable to find and read app.config
    stored procedure is unable to read app.config. it is necesary to rewrite the xml config into c# code:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name="BasicHttpBinding_IUMG" closeTimeout="00:01:00"
    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
    maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
    useDefaultWebProxy="true">
    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
    <security mode="None">
    <transport clientCredentialType="None" proxyCredentialType="None"
    realm="" />
    <message clientCredentialType="UserName" algorithmSuite="Default" />
    </security>
    </binding>
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint address="http://umgwcftest/UMGwcf.svc" binding="basicHttpBinding"
    bindingConfiguration="BasicHttpBinding_IUMG" contract="IUMG"
    name="BasicHttpBinding_IUMG" />
    </client>
    </system.serviceModel>
    </configuration>
    and the rewrited code:
    BasicHttpBinding myBinding = new BasicHttpBinding();
    myBinding.Name = "BasicHttpBinding_IUMG";
    myBinding.CloseTimeout = new TimeSpan(00, 01, 00);
    myBinding.OpenTimeout = new TimeSpan(00, 01, 00);
    myBinding.ReceiveTimeout = new TimeSpan(00, 10, 00);
    myBinding.CloseTimeout = new TimeSpan(00, 01, 00);
    myBinding.AllowCookies = false;
    myBinding.BypassProxyOnLocal = false;
    myBinding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
    myBinding.MaxBufferSize = 65536;
    myBinding.MaxBufferPoolSize = 524288;
    myBinding.MaxReceivedMessageSize = 65536;
    myBinding.MessageEncoding = WSMessageEncoding.Text;
    myBinding.TextEncoding = System.Text.Encoding.UTF8;
    myBinding.TransferMode = TransferMode.Buffered;
    myBinding.UseDefaultWebProxy = true;
    myBinding.ReaderQuotas.MaxDepth = 32;
    myBinding.ReaderQuotas.MaxStringContentLength = 8192;
    myBinding.ReaderQuotas.MaxArrayLength = 16384;
    myBinding.ReaderQuotas.MaxBytesPerRead = 4096;
    myBinding.ReaderQuotas.MaxNameTableCharCount = 16384;
    myBinding.Security.Mode = BasicHttpSecurityMode.None;
    myBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
    myBinding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
    myBinding.Security.Transport.Realm = "";
    myBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
    myBinding.Security.Message.AlgorithmSuite = System.ServiceModel.Security.SecurityAlgorithmSuite.Default;
    EndpointAddress endPointAddress = new EndpointAddress(new Uri("http://umgwcftest/UMGwcf.svc"));
    SqlContext.Pipe.Send("2");
    UMGClient umgcl = new UMGClient(myBinding, endPointAddress);
    after that, I got another error and it's solution is here:
    error and solution
    So I got it finaly working 

  • How to call web services from Acrobat API using VC++

    Hi,
    I have api plugin which installs custom menu and tool bar to adobe acrobat. In this plugin once user installs this plugin, he need to activate this tool by entering key value. this limites to limited number of users (which is decided by client while buying).
    I am using javascript and VC++ with Visual studio 2008.
    So can some one suggest me how can i achive this.
    Thanks
    Shiva

    First, this is the scripting forum.  You want the SDK forum.
    Second, this isn't an Acrobat issue.  It's a C++ programming issue. If you want to connect to a web service you'll need to use the windows or mac socket interface.  If you're doing this using MFC then there is a library for internet interactions. If not, I'm sure there is still a library for it, I know there is a system API, you'll just have to look around.  But the main point is that it's completely outside the Acrobat SDK.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    http://www.adobe.com/devnet/acrobat/javascript.html
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • Accessing Secured Web Services fromPL/SQL  Code.

    Hi ,
    This is an urgent requirement.We need to call a Web Sercured which is secured(That we need Authenticate using Digital Signatures).I don't how to call a Secured web service from PL/SQL code.with java it is possible.
    Can anyone help me in confoguring/Writing code to call web services with Digital Certificates.
    Regards,
    Ram

    In the XmlDigester class you would have to change the following 2 functions...
    public int Compare(Object x, Object y)
    XmlAttribute lhs = (XmlAttribute)x;
    XmlAttribute rhs = (XmlAttribute)y;
    string ls = lhs.NamespaceURI;
    string rs = rhs.NamespaceURI;
    if ((ls == rs) || (ls.Equals(rs) && ls != null && rs != null))
    ls = lhs.LocalName;
    rs = rhs.LocalName;
    if (ls == null)
    return -1;
    if (rs == null)
    return 1;
    byte[] larr = Encoding.UTF8.GetBytes(ls);
    byte[] rarr = Encoding.UTF8.GetBytes(rs);
    int len = Math.Min(larr.Length, rarr.Length);
    for (int i = 0; i < len; i++)
    int li = (int)(larr[i] & 0xFF);
    int ri = (int)(rarr[i] & 0xFF);
    int d = li - ri;
    if (d != 0)
    return d;
    return larr.Length - rarr.Length;
    private void Serialize(string s, Stream outStream)
    byte[] bytes = Encoding.UTF8.GetBytes(s);
    int len = bytes.Length;
    Serialize((byte)(len >> 8), outStream);
    Serialize((byte)(len), outStream);
    Serialize(bytes, outStream);
    That should do the trick.

  • Integrate Web Service in SQL Server assembly

    Hi,
    I need to create an assembly in SQL Server 2010 who integrate a web service reference. What I did so far:
    1) Create a SQL CLR database project in VS 2010
    2) Add a Web Service reference. Service is added correctly and methods are exposed.
    3) Add a StoredProcedure with code with reference to the web service. 
    4) Build. 
    Then I tried to create the assembly in SQL with 'Create Assembly FROM 'DLL PATH' ' but I get the error:
    Assembly 'MaestroInterface' references assembly 'system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089.',
    which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(failed to retrieve text for this
    error. Reason: 15105)). Please load the referenced assembly into the current database and retry your request.
    Even if I try to add the System.Servicemodel DLL, I get another missing DLL.
    Have I done something wrong? How can I fix this?
    thanks for your time and help

    My assembly registered fine in SQL, but I still struggle with a problem. The method of the Web Service returns XML. As soon as I do a call to one of those method, it crashes:
    Cannot load dynamically generated serialization assembly. In some hosting environments assembly load functionality is restricted, consider using pre-generated serializer. Please see inner exception for more information. ---> System.IO.FileLoadException:
    LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host.
    I looked on internet and find the page:
    http://support.microsoft.com/en-us/kb/913668
    So I created the XMLSerializer with sgen and created the assembly in MSSQL. Still, it gives me the same error.
    I'm using SQL 2008 R2 and CLR assembly is made using VB 2010, framework 2.0. sgen has been executed in VS Command prompt of VS 2005

  • BAM Web Services and SQL Server mixed mode authentication

    Hi,
    I have created and deployed a BAM definition with some BAM views in it but when Ihit the BAM Portal with IE all I see in the "My Views" pane on the left is an error message "Views or Activites may be missing because one or more database(s) could not be contacted.
    Investigating the TraceLog tells me that:  Error    11007    Cannot determine the SID for the user.
    I have changed the DBO accounts for all BAM databases to a Windows accounts as read in Tiho`s blog (http://blogs.msdn.com/tihot/archive/2006/06/13/630313.aspx), but I still get the Error.
    Any ideas?
    Thanks!

    Do this
    1.  Remove the ID on which BAMappPool is running from the BAMPrimaryImport Database's users list
    2. Add that ID as the DB Owner of BAMPrimaryImport database in BAMPrimaryImport DB's properties
    That's it.... restart BAMAppPool and/or SQL services if you want and you should not see that error again!!

  • "Unable to load URL" - SQL Server 2005 DB Web Service Connection

    Hi ,
    I am using XCelsius version 5.0.0.99 to create dashboards connecting to SQL Server 2005.
    Find below the details of the steps -
    1. Created a web service within SQL Server 2005 database.
    2. Copied the WSDL URL.
    3. In XCelsius 2008 -> Data Manager -> Web Service Connection, pasted the URL in the WSDL URL input box and clicked "Import" to import the methods. At this point I am getting "Unable to load URL" .
    Am I missing any step ?
    Any suggestion would be highly appreciated.
    Note : I have tested the web service by using it in a ASP.Net project and works fine.
    Thanks
    Chitra

    Hi,
    Error :unable to Load URL occurs" because Crystal xcelsius only support single schema web service created from Query as a web service and Flynet tool available in xcelsius 2008.
    The reason:
    All the web service create from Sql 2005 ,PHP script produced multiple scehma web service and crystal xcelsius only support single schema web service which can be created from Query as a web service or Flynet.
    Please revert in case of any queries.
    Regards
    Kekti Fadnavis

  • Publish SQL as a WEB Service from Database (10.2) using OC4J (without JDev)

    Hi,
    I have been successfull in Publishing Web Service using SQL (DML) using :
    1. Oracle Express Db 10.2
    2. OC4J 10.1.3
    Any Help Will be appreciated........ :)
    NOTE: Oracle Documentation on Application Server SUCKS (Too Many Errors prints and Wrong Information in the Web Servises area including JAR file paths)
    I can only use One parameter in the QUERY and a Second Parameter gives an Error.
    java -jar ${ORACLE_HOME}/webservices/lib/wsa.jar -sqlAssemble -appName query -dataSource jdbc/OracleCoreDS -sqlstatement "updtProdTyp=update PRODUCT_TYPES SET NAME = :{newname VARCHAR} where NAME = :{oldname VARCHAR}" -dbConnection jdbc:oracle:thin:@localhost:1521:XE -dbUser store/store
    INFO: [WSADBPlugin] endpoint setInterface: oracle.generated.SqlStmts, setImplementation: oracle.generated.SqlStmtsUser
    INFO: java oracle.jpub.Doit -user=store/store -url=jdbc:oracle:thin:@localhost:1521:XE -dir=./src/server -codegen=jdbc -style=oracle/j2ee/ws/tools/wsa/db/webservices-common -style=oracle/j2ee/ws/tools/wsa/db/webservices10 -style=oracle/j2ee/ws/tools/wsa/db/webservices10literal -outarguments=return -datasource=jdbc/OracleCoreDS -sqlstatement.updtProdTyp=update PRODUCT_TYPES SET NAME = :{newname VARCHAR} where NAME = :{oldname VARCHAR} -sqlstatement.class=SqlStmts -package=oracle.generated -plsqlfile=SqlStmts_plsql_wrapper.sql,SqlStmts_plsql_dropper.sql -plsqlpackage=SqlStmts_plsql_wrapper -connscope=method -sqlj -d=./war/WEB-INF/classes -C-g
    INFO: SqlStmtsBase
    /usr/lib/oracle/xe/app/OC4J/D_My_Apps/src/server/oracle/generated/SqlStmtsUser.java:8: oracle.generated.SqlStmtsUser is not abstract and does not override abstract method updtProdTypiSS(java.lang.String[],java.lang.String[]) in oracle.generated.SqlStmts
    public class SqlStmtsUser extends SqlStmtsBase implements SqlStmts, java.rmi.Remote
    ^
    /usr/lib/oracle/xe/app/OC4J/D_My_Apps/src/server/oracle/generated/SqlStmtsUser.java:22: cannot find symbol
    symbol : method _getProdTypBeans(java.lang.String,java.sql.Connection)
    location: class oracle.generated.SqlStmtsBase
    __jRt_0 = super._getProdTypBeans(__jRt_2, __onnScopeMethod);
    /usr/lib/oracle/xe/app/OC4J/D_My_Apps/src/server/oracle/generated/SqlStmtsUser.java:85: cannot find symbol
    symbol : method _getProdTyp(java.lang.String,java.sql.Connection)
    location: class oracle.generated.SqlStmtsBase
    __jRt_0 = super._getProdTyp(__jRt_8, __onnScopeMethod);
    ^
    /usr/lib/oracle/xe/app/OC4J/D_My_Apps/src/server/oracle/generated/SqlStmtsUser.java:128: _updtProdTyp(java.lang.String,java.lang.String,java.sql.Connection) in oracle.generated.SqlStmtsBase cannot be applied to (java.lang.String,java.sql.Connection)
    __jRt_0 = super._updtProdTyp(__jRt_10, __onnScopeMethod);
    ^
    /usr/lib/oracle/xe/app/OC4J/D_My_Apps/src/server/oracle/generated/SqlStmtsUser.java:145: cannot find symbol
    symbol : method _updtProdTypiS(java.lang.String[],java.sql.Connection)
    location: class oracle.generated.SqlStmtsBase
    __jRt_0 = super._updtProdTypiS(__jRt_12, __onnScopeMethod);
    ^
    6 errors
    INFO: NEW DBWS runtimeProperties set databaseJndiName: jdbc/OracleCoreDS
    INFO: User classpath is :/usr/lib/oracle/xe/app/OC4J/D_My_Apps/./war/WEB-INF/classes
    INFO: Checking for JSR-181 Annotations capabilities in current JVM...
    INFO: Found JSR-181 Annotations capabilities. Checking for JSR-181 Annotations Processor...
    INFO: Found JSR-181 Annotations processor. JSR-181 Annotations (if any) will be processed
    INFO: No JSR-181 annotations found in specified class oracle.generated.SqlStmtsUser
    FINE: ValueTypeModeler.log [creating model: query]
    FINE: ValueTypeModeler.log [creating port: oracle.generated.SqlStmts]
    FINE: MethodModeler.log [creating operation: updtProdTyp]
    FINE: MethodModeler.log [creating operation: updtProdTypiSS]
    WARNING: Problem validating implementation class. Access modifier problem detected for the implementation class oracle.generated.SqlStmtsUser: int updtProdTyp( java.lang.String, java.lang.String ) is defined with access modifiers that make it an unsuitable implementation of the interface method: The method cannot be 'abstract'.
    Thu Mar 30 14:17:34
    Thanks
    ====================================

    I don't have the problem with the second arugument, using essentially the same command as yours. Could you make sure you clean up the following subdirectories and retry:
    ear query.ear src war
    My guess is that the leftover subdirectories in your previous run are playing game with you. You can simplify leftover management by specifying -output setting.

  • PL/SQL Web Service

    I need Web Service from PL/SQL package but,I can not see
    All Technologies
    Business Tier
    Web Services -> PL/SQL Web Services.
    in the new Galery wizard of Jdeveloper(Studio Edition Version 11.1.1.0.1)
    Also "Publlish as Web service" menu doesn't appear when i make right click while selecting a PL/SQL package on the db connnection navigator.
    Please help me if you know the reason.

    Oracle removed this option or really good hide it in the final version of jdeveloper 11g
    But there is hope you can do it yourself with eclipselink , they have a great wiki page with all the options plus you have control how you make this ws
    Here an example to make a quickstart
    http://biemond.blogspot.com/2009/01/create-plsql-webservice-in-jdeveloper.html
    thanks Edwin

  • Best Way to Expose our JAVA API as web service

    we have develop an API and now, we want these API available as web services. the API abstracts the developer from database connection and the developer has to only concern himself of the object model. our problem with this API is that if we distribute this to our co-developers, their applications will be connecting directly to our database. but if we have this as a webservice, the connections to the databse will be isolated between the host that's running the webservice and the database.
    what's the best way to move these API/objects to webservices? what are our options?
    thanks,

    You can pretty much put anything you want into a web service. But remember they are designed for network/internet calls so it might make sense to bulk wrap your API calls. Due to the large amount of XML that is required by a web service if your API is large and you will have many webservices you probably want to get a tool that can generate this for you.

  • Java API (web services) for  exportMetadata and importMetadata

    We ususally use WLST command : exportMetadata and importMetadata to export/import MDS. is there any corresponding web services or Java API avalaible for the similar purpose?
    Thanks

    Hi,
    U can expose a EJB or a java class as a webservice in webdynpro and u can use it in webdynpro directly and if u want to use it through Portal u need to create proxies and do it.
    U can go through this weblog which helps u in creating a Bean as a webservice.
    /people/sap.user72/blog/2005/09/15/creating-a-web-service-and-consuming-it-in-web-dynpro
      And u can expose the services created in XI also as webservices.
    Regards,
    Sirisha.

  • Java web services help needed

    i am a student. working on a project. using java web services. using its api jax-rpc. i have compiled, deployed and run an example given in the tutorial of the web services tutorial\examples\jaxrpc\hello. now i want to bring the "hello" folder out of its original directory to e.g c:\project\. i have tried alot. i am not able to set the paths in the xml files provided. if any one of you can help me in this. my address is [email protected] . i am waiting for your reply.

    Where are you stuck up.
    Try the following steps
    create a directory structure
    c:\projects\jaxrpc
    copy your example
    <JWSDP>/docs/tutorial/examples/jaxrpc/hello to
    c:\projects\jaxrpc
    you may need to remove \build and \dist from the
    example if you have already tried the example
    copy your example
    <JWSDP>/docs/tutorial/examples/jaxrpc/common to
    c:\projects\jaxrpc
    Now the example will run correctly but only the war
    file is created in your original tutorial location.
    Now modify tut-root in
    c:\projects\jaxrpc\common\build.properties to
    tut-root=C:\\projects
    and modify the war-path in \hello\build.properties to
    point to
    war-path=${tut-root}/jaxrpc/${example}/dist/${deployabl
    -war}
    If anything fails first check the paths through
    <YOUR_path>\hello>ant debug
    If there is problem post details where it is failing.
    Ri am trying this method. i will tell you when it is done. thank you.

  • How to Trigger CAF web services from java Job schedulers?

    Hi Experts,
    I am in need of calling CAF based web services from custom Job scheduler.
    Could you please provide your idea and input if anyway we can call such web service by java api in custom jobs development?
    Thing is that we have CAF BO which hold around 1 million record (master data) and based on approval scenario (developed in WDJ apps) we will have to move this record to another business object for further manipulation?
    Hence due to huge number of record in BO, I would like to automate this activity by calling Jobs from WDJ apps and then Job will trigger the CAF web service which would create record into the BO object.
    Please share your idea and let me if it can be achievable by java apis to trigger Jobs by WDJ apps & webservice by jobs?
    Thanks & Regards,
    Pankaj

    Hi Experts,
    I am in need of calling CAF based web services from custom Job scheduler.
    Could you please provide your idea and input if anyway we can call such web service by java api in custom jobs development?
    Thing is that we have CAF BO which hold around 1 million record (master data) and based on approval scenario (developed in WDJ apps) we will have to move this record to another business object for further manipulation?
    Hence due to huge number of record in BO, I would like to automate this activity by calling Jobs from WDJ apps and then Job will trigger the CAF web service which would create record into the BO object.
    Please share your idea and let me if it can be achievable by java apis to trigger Jobs by WDJ apps & webservice by jobs?
    Thanks & Regards,
    Pankaj

Maybe you are looking for