Web Service best practice question

Hi ! I'm designing a web service solution and I'm trying to figure out the best way to solve a simple situation. I haver some products at my company which need query by consumers, I need some way to let them provide some sort of unique identifier for the product in order for me to return the product complete description. Unfortunately the products are specific to my company and there is no industry standard to do the search (like an ISBN for books). So I'm considering make an adicional service to just return the products database ID in order to enable the consumer make the actual query using this ID. Is there a better way to handle this situation ??
Thanks everyone !

services should be idempotent and stateless.
that means that transitions and workflow should be the responsibility of the client.
%

Similar Messages

  • UDDI and deployed Web Services Best Practice

    Which would be considered a best practice?
    1. To run the UDDI Registry in it's own OC4J container with Web Services deployed in another container
    2. To run the UDDI Registry in the same OC4J container as the deployed Web Services

    The reason you don't see your services in the drop-down is because, CE does lazy initialization of EJB components (gives you a faster startup time of the server itself). But your services are still available to you. You do not need to redeply each time you start the server. One thing you could do is create a logical destinal (in NWA) for each service and use the "search by logical destination" button. You should always see your logical names in that drop-down that you can use to invoke your services. Hope it helps.
    Rao

  • Web services - Best practices

    Hello all,
    I have been working my way through 'Core J2EE Patterns: Best Practices and Design Strategies' in preparation for a web services based project I am responsible for delivering.
    Theres just one thing I cannot get my head round. The book identifies a web service broker responsible for dealing with WS requests. However it states its at the integration level. If I have a WS enabled client wanting to communicate with my services, wouldn't the web service broker have to be the first point of contact, almost acting as a Controller?
    Much of this is new to me, so perhaps I am barking up the wrong tree. But any help would be greatly appreaciated
    Kind regards
    Kevin

    Michal
    Can you send me your article or anything you have on web services? I am trying to connect to a .NET server and I'm getting the following error:
    System.Web.Services.Protocols.SoapHeaderException: WSE012: The input was not a valid SOAP message because the following information is missing: action. at Microsoft.Web.Services3.Utilities.AspNetHelper.SetDefaultAddressingProperties(SoapContext context, HttpContext httpContext) at Microsoft.Web.Services3.WseProtocol.CreateRequestSoapContext(SoapEnvelope requestEnvelope) at Microsoft.Web.Services3.WseProtocol.FilterRequest(SoapEnvelope requestEnvelope) at Microsoft.Web.Services3.WseProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
    I know it has something to do with Axis but I just don't know enough. Is there a way around it? Do you know if WSE 3.0 requires Axis2?
    Thanks for any info you can send my way.
    Steve

  • Web service, best practice

    Hi,
    I would need some oppionions on best practices for a WS interface.
    Lets say I have a system with 5 different states on an entity, lets say states are A, B, C, D and E. It is not possible to shange from any state to any other state, there are certain rules.
    Shall the knowledge on these transition rules be on the service consumer or in the service itself. What I'm looking for is what kind of operations I shall expose:
    setState(State aState)
    or
    changeToStateA()
    changeToStateC()
    And so on... In the first case all knowlege of state transitions must be on the service consumer. In the second case this is not needed as the operation will take care of that.
    Is there any guidelines on this?
    Thanks,
    Mattias

    services should be idempotent and stateless.
    that means that transitions and workflow should be the responsibility of the client.
    %

  • Best Practices Question: How to send error message to SSHR web page.

    Best Practices Question: How to send error message to SSHR web page from custom PL\SQL procedure called by SSHR workflow.
    For the Manager Self-Service application we’ve copied various workflows which were modified to meet business needs. Part of this exercise was creating custom PL\SQL Package Procedures that would gather details on the WF using them on custom notification sent by the WF.
    What I’m looking for is if/when the PL\SQL procedure errors, how does one send an failure message back and display it on the SS Page?
    Writing information into a log or table at the database level works for trouble-shooting, but we’re looking for something that will provide the end-user with an intelligent message that the workflow has failed.
    Thanks ahead of time for your responses.
    Rich

    We have implemented the same kind of requirement long back.
    We have defined our PL/SQL procedures with two OUT parameters
    1) Result Type (S:Success, E:Error)
    2) Result Message
    In the PL/SQL procedure we always use below construct when we want to raise any message
    hr_utility.set_message(APPL_NO, 'FND_MESSAGE_NAME');
    hr_utility.raise_error;
    In Exception block we write below( in successful case we just set the p_result_flag := 'S';)
    EXCEPTION
    WHEN APP_EXCEPTION.APPLICATION_EXCEPTION THEN
    p_result_flag := 'E';
    p_result_message := hr_utility.get_message;
    WHEN OTHERS THEN
    p_result_flag := 'E';
    p_result_message := hr_utility.get_message;
    fnd_message.set_name('PER','FFU10_GENERAL_ORACLE_ERROR');
    fnd_message.set_token('2',substr(sqlerrm,1,200));
    fnd_msg_pub.add;
    p_result_message := fnd_msg_pub.get_detail;
    After executing the PL/SQL in java
    We have written some thing similar to
    orclStmt.execute();
    OAExceptionUtils.checkErrors (txn);
    String resultFlag = orclStmt.getString(provide the resultflag bind no);
    if ("E".equalsIgnoreCase(resultFlag)){
    String resultMessage = orclStmt.getString(provide the resultMessage bind no);
    orclStmt.close();
    throw new OAException(resultMessage, OAException.ERROR);
    It safely shows the message to the user with all the data in the page.
    We have been using this construct for a long time for all our projects. They are all working as expected.
    Regards,
    Peddi.

  • Best practice question -- copy container, assemble it, build execution plan

    So, this is a design / best practice question:
    I usually copy containers as instructed by docs
    I then set the source system parameters
    I then generate needed parameters / assemble the copied container for ALL subject areas present in the container
    I then build an execution plan JUST FOR THE 4 SUBJECT AREAS and build the execution plan and set whatever is needed before running it.
    QUESTION - When i copy the container, should i delete all not needed subject areas out of it or is it best to do this when building the execution plan? I am basically trying to simplify the container for my own sake and have the container just have few subject areas rather than wait till i build the execution plan and then focus on few subject areas.
    Your thoughts / clarifications are appreciated.
    Regards,

    Hi,
    I would suggest that you leave the subject areas and then just don't include them in the execution plan. Otherwise you have the possibility of running into the situation where you need to include another subject area in the future and you will have to go through the hassle of recreating it in your SSC.
    Regards,
    Matt

  • SAP Adapter Best Practice Question for Deployment to Clustered Environment

    I have a best practices question on the iway Adapters around deployment into a clustered environment.
    According to the documentation, you are supposed to run the installer on both nodes in the cluster but configure on just the first node. See below:
    Install Oracle Application Adapters 11g Release 1 (11.1.1.3.0) on both machines.
    Configure a J2CA configuration as a database repository on the first machine.
    Perform the required changes to the ra.xml and weblogic-ra.xml files before deployment.
    This makes sense to me because once you deploy the adapter rar in the next step it the appropriate rar will get staged and deployed on both nodes in the cluster.
    What is the best practice for the 3rdParty adapter directory on the second node? The installer lays it down with the adapter rar and all. Since we only configure the adapter on node 1, the directory on node 2 will remain with the default installation files/values not the configured ones. Is it best practice to copy node 1's 3rdParty directory to node 2 once configured? If we leave node 2 with the default files/values, I suspect this will lead to confusion to someone later on who is troubleshooting because it will appear it was never configured correctly.
    What do folks typically do in this situation? Obviously everything works to leave it as is, but it seems strange to have the two nodes differ.

    What is the version of operating system. If you are any OS version lower than Windows 2012 then you need to add one more voter for quorum.
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • SAP Adapter Best Practice Question for Migration of Channels

    I have a best practice question on the SAP adapter when migrating an OSB project from one environment (DEV) to another (QA).
    If my project includes an adapter channel that (e.g., Inbound SAP Proxy listening on a channel), how do I migrate that project to another environment if the channel in the target environment is different.
    I tried using the search and replace mechanism in the sbconsole, but it doesn't find the channel name in the jca and wsdl files.
    What is the recommended way to migrate from one environment to the other when the channel name changes?

    I have a best practice question on the SAP adapter when migrating an OSB project from one environment (DEV) to another (QA).
    If my project includes an adapter channel that (e.g., Inbound SAP Proxy listening on a channel), how do I migrate that project to another environment if the channel in the target environment is different.
    I tried using the search and replace mechanism in the sbconsole, but it doesn't find the channel name in the jca and wsdl files.
    What is the recommended way to migrate from one environment to the other when the channel name changes?

  • Network Services Best Practices

    Hello
    I've been using the Network Services Best Practices document  (27 Sep 2006) for some years now and I wonder if there has been actually an update to it. If not would you guys have any new Network Best Practices document you would suggest? Something that talks about Virutalization, etc.... would be great

    Hi Scott,
    Thank you for posting your issue in the forum.
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.
    Best Regards,
    Justin Gu

  • Web Service Best and Worst Practices within Oracle SOA Suite

    Hi All,
    Has anybody got a single document that concisely details the best and worst practices around the design of web services for oracle SOA and BPEL.
    I'm interested the following aspects
    1. Level of Granularity
    2. Level of Reuse
    3. BPEL orchestration. numbers of BPEL process vs services
    4. Transport choices...SOAP vs REST vs Big Services etc
    5. Activity Monitoring with BAM
    6. Future proofing of signatures and ongoing maintenance and process change
    I'm constructing a document myself to share on this forum, but i'd be very interested to use the wisdom of others if somebody has done this before...
    Thanks in advance :)

    This is a question best answered by your Oracle reseller or Oracle account manager to give you all the details but I hope this brief answer helps:
    - The Unified Business Process Management Suite (BPM Suite 11g) includes: BPM Studio, BPM Composer, BPMN Service Engine and Workflow Extensions, BPM Process Spaces, and BPM Process Analytics.
    - BPM Suite 11g requires the licensing of SOA Suite 11g for Oracle Middleware which requires a license for WebLogic Suite.
    - You can license SOA Suite 11g now and license BPM Suite 11g later.
    Since the products are layered, I don't see this cutting into SOA sales at all. My personal view is that BPM on top of SOA is brilliant since it provides easy integration between human and automated tasks, builds on many of the SOA concepts that are key for a successful BPM implementation (functional, not the Oracle product), and uses the same IDE. The synergies extend past easy use of services; the same business rules and human workflow components are used between both products.

  • Webi: BW Query design best practice question

    The scenario is as follows:
    SAP NetWeaver BW 7.01 SPS3
    Business Objects Enterprise XI 3.1 Fix Pack 1.2
    SAP Integration Kit XI 3.1
    Webi report built off of a BW Query. Based on the versions listed above, the MDX statement generated should only pick up only the fields listed in the query panel in Webi, not necessarily every field in the underlying BW query.  Having said that, does it matter what fields are in the Free CHAR or in the rows in the underlying BW Query??  I heard a suggestion that all fields should be put in the Free CHAR panel of the BW Query Designer but I don't see the value add of that approach.  Any thoughts?
    -Brad

    Hi,
    it does not matter if the items are Free Characteristics or rows or columns.
    for best practices here some material:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/008d15dc-f76c-2b10-968a-fafe5a121129
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0320722-741c-2c10-afab-93b5c0fc7e96
    Ingo

  • Office Web Apps - Best Practice for App Pool Security Account?

    Guys,
    I am finalising my testing of Office Web Apps, and ready to move onto deploying it to my live farm.
    Generally speaking, I put service applications in their own application pool.
    Obviously by doing so this has an overhead on memory and processing, however generally speaking it is best practice from a security perspective when using separate accounts.
    I have to create 3 new service applications in order to deploy Office Web Apps, in my test environment these are using the Default SharePoint app pool. 
    Should I create one application pool for all my office web apps with a fresh service account, or does it make no odds from a security perspective to run them in the default app pool?
    Cheers,
    Conrad
    Conrad Goodman MCITP SA / MCTS: WSS3.0 + MOSS2007

    i run my OWA under it's own service account (spOWA) and use only one app pool.  Just remember that if you go this route, "When
    you create a new application pool, you can specify a security account used by the application pool to be either a predefined Network Service account or a managed account. The account must have db_datareader, db_datawriter, and execute permissions for the content
    databases and the SharePoint configuration database, and be assigned to the db_owner role for the content databases." (http://technet.microsoft.com/en-us/library/ff431687.aspx)

  • Web application best practice...

    I'm creating a web site with heaps of Flash stuff on it. I'd
    like it to load plenty of information from a database server and
    save plenty of information back again. It's not a vast amount of
    information by the way - i don't need to load video clips and
    things, but there will be loads of different flash resources on the
    site and so plenty of different occasions when there'll need to be
    some loading and saving going on.
    So to the question - what's best to use?
    1) LoadVars? (or XML Object) - I'm pegging this option
    together as I can see that loading some of the info in XML format
    from say an ASP page could be a good idea
    2) Web services? I don't know much about webservices, but
    plenty of big companies seem to be offering them out - google,
    yahoo and flickr for example (- but dya reckon they use them
    themselves?) I realise i'd have to learn something a bit different
    like .net (so maybe VB.net or c# or something any opinions about
    which to go for there too??) or maybe perl or python or
    something...
    3) Flash Remoting? I have bad feelings about this one - i
    don't want to pay for extra stuff if it doesn't do much for me -
    and i understand that with this one i'll still need my server side
    application anyway - so it makes me wonder what the point is? And
    I've also heard that the latest flash version doesn't really
    support it very welll.....
    So does anyone have any thoughts? I'd love to hear some
    opinions... I DO care about performance and I DO care about how
    fussy and complicated the programming will be. My gut reaction is
    that web services are the way to go, because to my naive mind they
    seem like they'll be simpler to code and potentially have less bugs
    and therefore be more reliable. But then I'm not trusting my naive
    mind, I'm asking you clever forum types instead!
    Best Wishes,
    Neil

    I don't think I can offer any definitive advice. Partly
    because it should be based on what your requirements are longer
    term I guess, and (probably mostly) because I don't know that much
    about it myself. I'll share what little I know.
    For flash, in terms of my understanding remoting is the
    fastest/most efficient means of communicating with a service you
    expose on your server , and I'd assume its more scalable as an
    approach longer term. There's the Adobe versions with Coldfusion
    and, I think .net, but there are open source options e.g. AMFPHP as
    well. I think that CS3/as3 will ultimately have no problems with
    remoting - I read somewhere that although the remoting components
    are not there now, flash cs3 can use flex non-visual components and
    also somewhere else that the remoting components are not necessary
    for remoting to be possible (but I guess they make it easier). I
    have no idea whether either is true, but I'd be surprised if long
    term flash cs3 can't do remoting as well as previous versions. The
    amf encoding method that is used for remoting is more readily
    accessible in as3 I think, so I can't see it being a problem.
    There's another framework for a type of remoting based on
    what I assume is some form of XML serialisation called XMLPC , but
    I don't know much about it.
    Both flash remoting and XMLRPC give you the ability to not
    worry about how the data is translated and transferred between
    flash client and server. You just deal with it in the native data
    structures in a similar way to making function/method calls
    locally. LoadVars is great if you just want to transfer name value
    pairs...eg sets of variables, XML is great for transferring
    structured representation of data. I've become more accustomed to
    working with XML as it is and using it as a the basis for my data
    in flash when I need to use it, which saves having customer
    encoding/decoding functions to change the way its dealt with
    locally. This is not always possible or convenient... but with
    XPathAPI in as2 it is a little easier, and I'm looking forward to
    using the new CS3 xml representation.
    LoadVars and XML are also great and if you're starting out,
    and are probably essential in terms of having them as an option
    anyhow so may not be a bad option to begin with just so you're
    familiar with them. I would suggest that you always know how to
    work with these approaches and maybe they'll be enough for you for
    now anyway .
    I know nothing about SOAP or any other type of webservice.
    Don't know if that helps.

  • Bean best practice question

    Simple questions (hopefully), I know how to code this but just want some advice on the best way to do the following:
    1. User enters data into HTML form and submits
    2. Some Java at the backend grabs these details and emails them off somewhere
    I am thinking of doing the following, but what’s the best way?
    1. HTML form submits and data is sent directly to a JavaBean (FormBean.java)
    2. FormBean.java contains standard getters/setters but also contains a method called sendMail(), is this bad practice? Do I need a second Bean sendMail.java? Or is this completely the wrong way to do things i.e. should I do this entirely in a servlet with only 1 bean to grab the data (FormBean) and then access from servlet?
    Just a bit confused on what’s best practice for this stuff?
    Thanks!

    2. FormBean.java contains standard getters/setters but also contains a method called sendMail(), is this bad practice? Do I need a second Bean sendMail.java? A better approach is this way
    a) Have all the form data in the form bean
    b) Write sendMail in a all together different class, as action.
    c) Send the form bean as a parameter to sendMail for processing and sending an email
    This way your sendMail() will become a kind of a service. Tomorrow you might have some other data, which you will have to send it in an email. In that case, you just reuse sendMail() method. Otherwise, if you have sendMail() in form bean itself, then if there are many form beans, then you would have to write sendMail() in every form bean, which is a bad practice. One principle of OOAD is to separate the functionality, which is redundant in your classes and make it as a separate module. If there are changes to the sendMail() functionality then, by having it in one module, you only have to change it at one place.
    Or is this completely the wrong way to do things i.e. should I do this entirely in a servlet with only 1 bean to grab the data (FormBean) and then access from servlet?You can have a servlet which acts like a controller, which receives the request parameters, constructs the form bean and invokes appropriate Action (in your case sendMail()). This is same as an MVC framework. Instead of you re-inventing the wheel to create a servlet controller, form bean, action etc. You could use one of the several MVC frameworks available in the market, such as Struts or Spring MVC.

  • Design Pattern / Best Practice Question

    Hi,
    I have been using Flex for a while now, but there is a
    scenario which I still have not found a solution I'm entirely happy
    with. I'm wondering if anyone else out there might have suggestions
    on a design pattern or best practice.
    Suppose I have a view which depends on model data which
    resides in some back end systems. That model data may or may not
    have been loaded (e.g. via a web service or remote object call) at
    the time the view is displayed.
    I don't know if the user will ever visit this part of the
    application so I would prefer to defer retrieval of the data until
    the user actually navigates to this view. Or I want to retrieve the
    data each time the view is displayed because the data is dynamic
    and could change between one presentation of the view and the next.
    Because the data comes from several systems, I cannot simply
    make one service call and display the view when it completes and
    all the data is available. I need to call several services which
    could complete in any order but I only want to display my view
    after I know all of them have completed and all of the model data
    is available. Otherwise, I can present the user an incomplete view
    (e.g. some combo boxes are empty until the corresponding service
    call to get the data completes).
    The solution I like best so far is to dispatch a single event
    (I am using Cairngorm) handled by a single command which acts as
    the caller and responder for all of the services. This command then
    remembers which responses it has received and dispatches another
    event to navigate to the view once all the results have returned.
    If the services being called are used in different
    combinations on different screens, this results in proliferation of
    events and commands. An event and command for each service and
    additional events and commands to bundle the services and the
    handling of their responses in the right combinations for each of
    the views.
    Another approach is to have some helper class listen for all
    of the model changes and only display the view when the model
    enters some state that is acceptable. It is sometimes difficult to
    determine just by looking at the model whether it is in the right
    state (e.g. how can I tell that a collection is the new collection
    that should just have been requested versus an old one lingering
    from a previous call). The logic required can get kind of
    convoluted and brittle.
    Basically, all of the solutions I've come up with so far seem
    less than ideal and a little hackish. I keep thinking there is some
    elegant solution out there that I am just missing ... but so far,
    no luck finding it. Thoughts?
    Thanks.
    Bill

    i think a service class is right - to coordinate your calls.
    i would have 1 event per call (so you could listen to individual
    responses if you wanted to).
    then i would use a flag. if you want to check for staleness,
    you would probably want two objects to map your service flag to
    lastRequested and lastCompleted. when you check, check if it's
    completed, and if it's not stale and that your lastRequested is
    less than lastCompleted (meaning that you're not currently waiting,
    i.e. you've returned since making a request). then make the request
    and update your lastRequested.
    here's a snippet of what i mean.
    ./paul
    public static const SVC1_LOADED:int = 1;
    public static const SVC2_LOADED:int = 2;
    public static const SVC3_LOADED:int = 4;
    public static const SVCALL_LOADED:int = 7;
    private var completedFlag:int = 0;
    then each call would have it's own callback.
    private function onSvc1Complete( evt:Event):void {
    completedFlag |= SVC1_LOADED;
    lastCompleted[ SVC1_LOADED ] = getTimer();
    dispatchEvent( new Event("svc1complete") );
    checkDone();
    private function checkDone():void{
    if( completedFlag == SVCALL_LOADED )
    dispatchEvent(new Event( "allLoaded" ));

Maybe you are looking for