Q: General : When will you use Web Service as opposed to just Servlet and/or EJB?

Hi,
I don't know if this is an appropriate question to ask for this class as it's not
workshop
specific. I was wondering how will I decide when it is appropriate to use a web
service as opposed to say servlet or an EJB for my application? What is a good
rationale to use?
Thanks,
Sadhana

Hi Adam,
Thanks a lot for giving such a lucid explanation of my vague question!
I understand now the difference between when to use EJBs/Servlets/Web Services.
Thanks again!
Sadhana
"Adam FitzGerald" <[email protected]> wrote:
>
Hi Sadhana,
Web service versus Servlet versus EJB. Which one to use? That is a very
good question.
EJBs should be the core desription and processing of your business rules.
They generally
have good performance, are easy to integrate into your security set up but
they require
access using the RMI-IIOP protocol. This means that generally EJBs are not
accessible
outside of your firewall and their clients have to be written in Java (other
enterprise
objects or applets or GUI applications).
Servlets often form a web-based front end to EJBs. They also have good performance,
integrate into security and only require HTTP access. This means they are
accessible
outside your firewall and any client with a HTTP or web API can call on
them, however,
there is no standard contract or rules for this type of interaction so you
will need
provide direct input into development of the client.
Web services are also accessible via HTTP and so can be accessed from outside
your
firewall. In fact, Web services internally within Workshop and WebLogic
actually
operate by using servlets and EJBs but the main advantage is that the mechanism/contract
for interacting with the web service is a well defined standard (WSDL) and
can actually
be registered or retreived dynamically (UDDI). Since web service standards
are open,
most popular programming languages already provide client APIs to interact
with them
thus freeing the web service developer from direct interaction with the
client developer
and letting the client be developed on any platform. The penalty for this
openness
is a small performance hit (XML translation) and a slowly maturing security
model.
So in summary, use EJBs for business operations that have Java clients within
your
enterprise, use servlets to provide web style access to your business operations
(like web pages) and use web services to enable automated clients that can
be written
on any platform either inside or outside your enterprise (firewall). In
fact, it
is common to write the EJB first and then to expose some parts of it outside
of your
enterprise by writing a web service wrapper (maybe using the EJB controls
that we
saw in class).
I hope this helps.
Adam
"Sadhana Jain" <[email protected]> wrote:
Hi,
I don't know if this is an appropriate question to ask for this class as
it's not
workshop
specific. I was wondering how will I decide when it is appropriate to use
a web
service as opposed to say servlet or an EJB for my application? What is
a good
rationale to use?
Thanks,
Sadhana

Similar Messages

  • What is document date? When will you use it?in A/R invoice  in SAP B1

    Hi
    I would like to know the meaning of document date for A/R invoice  in sap b1.
    when will u use? and How will u use it?
    I know Posting Date is date when u add invoice
    Due Date is a last date that customer have to pay you.
    But I don't know document date.
    I know only it use to caculate in payment terms.
    Does document date in A/R invoice use when u closing-Period?
    Please guide it to me.
    Thank U
    Theerawat

    Hi Theerawat,
    You may check these threads first:
    Document Date
    Posting / Due / Document date trouble
    Re: Posting Date
    Re: Difference between posting & system date in Inventory Audit Report
    Thanks,
    Gordon

  • Exception when trying to use web service login method

    Hi all,
    we've installed Discoverer, upgraded OAS to version 10.1.2 and installed the web service patch successfully. I can get the list of web service methods through
    http://app1.localdomain:7778/discoverer/wsi
    We've also created a bipublisher user in oiddas, and got it's guid. When I try to use the login method of the web services I get this exception:
    <?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>oracle.discoverer.applications.ws.util.DiscovererWSException: An error occurred during SSOUsername/GUID lookup.</faultstring>
    <faultactor>/discoverer/wsi</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>Does anyone have a clue what the problem is? I should also mention that after my DBA's advice we didn't upgrade the infrastructure instance, only the middle tier discoverer installation and then installed the repository upgrade.
    A few months back on a test installation I had tried to switch to SSO and then reverted back and managed to connect without SSO enabled.
    Edited by: dvm on Nov 11, 2008 7:22 AM

    Well... this is definitelly not a requirement.
    The code snippet came from the test (junit) for something which is much bigger. And of course the 1-char long table name has nothing to do with desing. At all.
    We have a system where a user defines (named) xml structures, so to say. The structures are then "translated" into DB entities. So the result DB schema is fully auto-generated. The system supports 4 different SQL dialects. Oracle is just one of them.
    Having restrictions like "name of a structure must be at least two characters" is no problem. But I still can`t believe Oracle has such a limitation. It does not sound logical (to me at least). And I had a hope may be someone has an explanation for that thing.
    The code above works just fine if I do not request certain columns back after the statement is executed. (e.g. without the second parameter).
    But anyway... I would post a bug for this, if I knew where to post it to :)
    Thanks.

  • Problem with uploading files to SharePoint 2013 in cloud using web services. Keep getting error message and don't know why.

    Hello everyone. I am having trouble writing a utility that uses SharePoint web services to upload a file and metatag it. It keeps throwing the following error message:
    "The request failed with the error message: -- <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="/_forms/default.aspx?ReturnUrl=%2fsites%2fgk%2f_vti_bin%2fcopy.asmx">here</a>.</h2>
    </body></html> --."
    Not sure why. I pass the file that I am going to upload to the subroutine and it is suppose to upload it to the appropriate library. I have burned several days on this problem and I am not sure what is going on. I would appreciate anyone that can point me in
    the right direction. Below is the subroutine that I have that is causing the problem. Obviously, I have stripped the name from the example.
    Thanks
    Mike
    ******** <Begin snip of code> **********************
    Public Shared Sub CreateNewDocumentWithCopyService(ByVal fileName As String)
    Dim c As New copyservice.Copy
    c.PreAuthenticate = True
    c.Credentials = New System.Net.NetworkCredential("[email protected]", "mypassword")
    c.Url = "https://x.sharepoint.com/sites/gk/_vti_bin/copy.asmx"
    Dim myBinary As Byte() = System.IO.File.ReadAllBytes(fileName)
    Dim destination As String = "https://x.sharepoint.com/sites/gk/Gatekeeper%20Reference/" & System.IO.Path.GetFileName(fileName)
    Dim destinationUrl As String() = {destination}
    Dim info1 As New copyservice.FieldInformation
    info1.DisplayName = "Title"
    info1.InternalName = "Title"
    info1.Type = copyservice.FieldType.Text
    info1.Value = "new title"
    Dim info2 As New copyservice.FieldInformation
    info2.DisplayName = "Modified By"
    info2.InternalName = "Editor"
    info2.Type = copyservice.FieldType.User
    info2.Value = "-1;#servername\\testmoss"
    Dim info As copyservice.FieldInformation() = {info1, info2}
    Dim resultTest As New copyservice.CopyResult
    Dim result As copyservice.CopyResult() = {resultTest}
    Try
    ' When creating new content use the same URL in the SourceURI as in the Destination URL argument
    c.CopyIntoItems(destination, destinationUrl, info, myBinary, result)
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try
    End Sub
    ******** <End snip of code> **********************

    Hi,
    If you want to upload a file to a library in SharePoint 2013 online, I suggest you use Client Object Model or REST API.
    The code snippets in the two threads below will be helpful:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/deac7cb7-c677-47b0-acdc-c56b32dfaac8/uploading-bigger-files-using-csom
    http://stackoverflow.com/questions/17057074/how-to-download-upload-files-from-to-sharepoint-2013-using-csom
    Uploading Files Using the REST API
    http://blogs.msdn.com/b/uksharepoint/archive/2013/04/20/uploading-files-using-the-rest-api-and-client-side-techniques.aspx
    You can handle the authentication with
    SharePointOnlineCredentials object:
    http://www.vrdmn.com/2013/01/authenticating-net-client-object-model.html
    Best regards
    Patrick Liang
    TechNet Community Support

  • When will you make Firefix compatible with Google tool bar?

    Clicked your update in error. Now can't use Google toolbar.
    When will you fix your browser

    You have it backwards. Google (and other 3rd-party vendors) must make their products compatible with the browser.
    '''<u>Some Background Information</u>'''<br />
    Included with every Firefox extension is a file named install.rdf. In that file is a parameter "em:maxVersion" which indicates the maximum Firefox version with which the extension '''<u>has been tested and approved by the developer</u>''' (Google, in this case). Only the developer (Google) is responsible for changing that parameter. Firefox enforces that parameter.
    That said. Google and all other developers know where to find the Firefox release schedule for new versions and where to find the test versions (beta) to use to test their product. The location of the release schedule and the beta versions '''is no secret'''. Firefox 5, and all other versions, underwent several weeks of beta testing, during which third-party developers (Google) had an opportunity to do their testing and make necessary changes to make their product(s) compatible. In addition to the 4 weeks of beta testing for Firefox 5, Google has had an additional 19 days since the release of Firefox 5, to make their product compatible. '''<u>Ask Google what is keeping a compatible release from being introduced.</u>'''
    '''<u>Google MAY be ceasing support for their toolbar in Firefox.</u>''' See the list of supported browsers in the following:
    *http://www.google.com/support/toolbar/bin/answer.py?hl=en&answer=1111588#toolbar_info
    '''<u>An add-on that may help</u>'''<br />
    Many users have found that installing the following add-on will restore some (maybe all) functionality for Google's toolbar.
    *'''''Add-on Compatibility Reporter''''': https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/

  • Why there is not an option to unable to 3G and use 2G on iPhone 4S ? It's awful! When will you fix that ?

    Why there is not an option to unable the 3G and use 2G on iPhone 4S ? It's awful! When will you fix that ? What are we gonna do now? I cant believe Apple can do it, like the battery of iPhone 4S is amazing. Everyday I should charge my phone! It doesnt make sense...

    YOu can't disable the camera - this feature came out with IOS 5.
    You will have to set your passcode lock to immediately.  settings - general - passcode lock.

  • When will you make an IPad YouTube app. There is one for iPhone and when you use it for the iPad the quality is bad since you have to zoom in. Please fix

    When will you make an IPad YouTube app. There is one for iPhone and when you use it for the iPad the quality is bad since you have to zoom in. Please fix

    If you lost sounds for keyboard clicks, games or other apps, email notifications and other notifications, system sounds may have been muted.
    System sounds can be muted and controlled two different ways. The screen lock rotation can be controlled in the same manner as well.
    Settings>General>Use Side Switch to: Mute System sounds. If this option is selected, the switch on the side of the iPad above the volume rocker will mute system sounds.
    If you choose Lock Screen Rotation, then the switch locks the screen. If the screen is locked, you will see a lock icon in the upper right corner next to the battery indicator gauge.
    If you have the side switch set to lock screen rotation then the system sound control is in the control center if you are running iOS 7. Swipe up from the bottom of the screen to get to control center . Tap on the bell icon and system sounds will return.
    If you are running iOS 5 or iOS 6, the system sound control is in the task bar at the bottom. Double tap the home button and swipe all the way to the right in the task bar to get to the speaker icon on the left side. Tap on that and the sounds will return.
    If you have the side switch set to mute system sounds, then the screen lock can be accessed in the same manner as described above.
    This support article from Apple explains how the side switch works.
    http://support.apple.com/kb/HT4085

  • Can you create a Adobe DPS app that use Web Services

    I'm looking to create a DPS app that uses web services to pass data to and from a web server when the user has an internet connection, but when the user is offline stores data locally until an internet connection is established and then passes the locally stored data to the web server. Is this possible with DPS/

    It's challenging but it's possible. Hint: local storage.

  • Performance impact of using Web Services?

    As BEA and other vendors continue to add Web Services support
    to their enterprise software, what is your plan for
    quantifying the performance impact and the functional
    correctness of using web services before going live with the
    final application?
    Empirix is hosting a free one hour web event discussion on
    web services testing and automated web services testing
    solutions on Thursday, January 17, 2-3pm Eastern time.
    To sign-up for this web event or learn about other web
    events being offering by Empirix this month, go to:
    http://webevents.empirix.com
    For your convenience, here is the complete abstract:
    The advent of web services has brought the promises of
    integrating multiple software applications from
    heterogeneous networks and for exchanging information
    from vendor-to-vendor or vendor-to-consumer in a
    standardized way.
    As web service technologies are deployed within and across
    organizations over the next several years, it will be
    critical that web services undergo performance testing.
    As with any enterprise software project, the adoption of
    proper test methodologies and use of testing tools will
    play a key part in the overall success or failure of
    projects utilizing web services. In a compressed
    software project schedule, an organization must
    quickly determine if its web services will operate
    successfully under a variety of load conditions. Like other
    web-based technologies, successful web services will need
    to respond quickly and correctly when implemented.
    During our presentation, we will discuss the testing
    challenges created by this emerging technology, along with
    the variety of testing solutions available. Automated
    web service testing will be discussed and demonstrated
    using FirstACT, the first web services performance testing solution available
    on the market. Using a sample web
    service, automatic test case creation, scalability testing,
    and results analysis will be explored.
    If you wish to download FirstACT prior to the web event, you can do so at:
    http://www.empirix.com/downloads/FirstACT

    As BEA and other vendors continue to add Web Services support
    to their enterprise software, what is your plan for
    quantifying the performance impact and the functional
    correctness of using web services before going live with the
    final application?
    Empirix is hosting a free one hour web event discussion on
    web services testing and automated web services testing
    solutions on Thursday, January 17, 2-3pm Eastern time.
    To sign-up for this web event or learn about other web
    events being offering by Empirix this month, go to:
    http://webevents.empirix.com
    For your convenience, here is the complete abstract:
    The advent of web services has brought the promises of
    integrating multiple software applications from
    heterogeneous networks and for exchanging information
    from vendor-to-vendor or vendor-to-consumer in a
    standardized way.
    As web service technologies are deployed within and across
    organizations over the next several years, it will be
    critical that web services undergo performance testing.
    As with any enterprise software project, the adoption of
    proper test methodologies and use of testing tools will
    play a key part in the overall success or failure of
    projects utilizing web services. In a compressed
    software project schedule, an organization must
    quickly determine if its web services will operate
    successfully under a variety of load conditions. Like other
    web-based technologies, successful web services will need
    to respond quickly and correctly when implemented.
    During our presentation, we will discuss the testing
    challenges created by this emerging technology, along with
    the variety of testing solutions available. Automated
    web service testing will be discussed and demonstrated
    using FirstACT, the first web services performance testing solution available
    on the market. Using a sample web
    service, automatic test case creation, scalability testing,
    and results analysis will be explored.
    If you wish to download FirstACT prior to the web event, you can do so at:
    http://www.empirix.com/downloads/FirstACT

  • Unique rollback in a BPEL process using web services

    We are a cellular communication company using Oracle DB (10g) and Oracle Forms to run our business applications (customer care and the like). We have planned a system migration using the SOA approach with the latest release of Oracle BPEL Suite (business logic), Oracle ADF BC (presentation level), Oracle OAS (application server) and JDeveloper (application development IDE).
    Within our current applications we have processes that perform several tasks (inserts, updates and/or deletes on the same DB) as part of one atomic DB transaction. Using the SOA approach we&rsquo;ve deemed those tasks as being &lsquo;services&rsquo; that we, let&rsquo;s say for the sake of argument, could implement either as web services (so as to be published for reuse) or as stored procedures encapsulated via DB adapters (BPEL lexicon).
    Our biggest challenge, and hence our question to the SOA world, is how to attain that same unique transaction. We understand that there is no one perfect approach, for the &lsquo;solution&rsquo; depends on too many factors and choices; what we&rsquo;d like to know are past experiences people had or, at best, what do people consider what the best practices in the industry are regarding this matter.
    <strong><u>Approach A:</u></strong> all services are implemented as DB adapters (stored procedures and the like).
    <strong><u>PROS</u><u>:</u></strong> one single DB rollback should any service fail to execute properly and so undo all changes made so far.
    <u><strong>CONS:</strong></u> highly coupled, non-visible components (via UDDI); impossibility to manage, control and audit (via WS Manager) components; weak/poor SOA Governance.
    <u><strong>Approach B:</strong></u> all services are implemented as web services.
    <u><strong>PROS:</strong></u> loosely coupled, self-contained, and web accessible visible components (via UDDI) besides the ease to manage, control and audit (via WS Manager); strong SOA Governance.
    <u><strong>CONS:</strong></u> since each web service is a &lsquo;different&rsquo; transaction with its own &lsquo;commit&rsquo;, a unique rollback transaction for the whole process will not be possible should a WS fail, for previous WSs will have already committed their data changes before doing the rollback.
    <u><strong>Approach C:</strong></u> services implemented as a mix of web services and DB Adapters.
    <strong><u>PROS:</u></strong> those of Approach B for web services.
    <strong><u>CONS:</u></strong> those of Approach A (DB adapters) + those of Approach B (web services).
    <hr />
    So, the 64,000 dollar question is how to attain a single transaction when you have web services as part of your process? Do we need to &rsquo;build/create&rsquo; a schema/functionality similar to the &lsquo;DB-undo-segment&rsquo; in order to obtain a single rollback transaction for the whole process or does the BPEL COMPENSATE delivers this functionality somehow?
    Are we not seeing the obvious? Are we not seeing the forest because we&rsquo;re looking at a tree? Please keep in mind that we are using Oracle BPEL.
    Thanks a bunch,
    --Sergio                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Marinus,
    you are absolutely right and not missing anything. OWSM does not free you from taking additional measures to block direct interaction with the unsecure WebService from not "authorized" clients. You must restrict the http response to the OWSM host only (either in the Apache or the OC4J configuration). See the related documentation.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • What is the best way to deploy application that uses web services?

    Hi all,
    I'm having some problems figuring out the best way to deploy our app now that we've switched over to using web services.
    I'm fairly new to Java and web services. From what I understand, JNLP and WebStart are methods to deploy Java clients to users and not for creating war files and the like.
    Here's a little background:
    We have a large PowerBuilder/Oracle application. The db consists of over 500 tables and the client consists of several thousand PB components. A user creates "transactions" which contain a series of "sub-transactions" within. Most of the data is collected and stored locally in the client in a series of datastores. When the "finalize" happens, the records are validated and sent to the database.
    We are in the process of moving each of the subtransactions (currently in the PB client) into subPROCESSES on a java project. We are using the JAX-WS framework to develop the web services in Netbeans. These web services aren't much more than remote xml as the messaging technology. For writing data back to the database, we are using the Java Persistence API to function outside of an EJB container but will shortly be migrating to the Glassfish application server to use several of the EJB container frameworks including the EntityManager.
    We haven't attempted any type of deployment and are unsure of where to start. Any suggestions would be so helpful and appreciated!
    Thanks!
    Edited by: doubleEspresso on Jan 10, 2008 8:06 AM

    >
    I'm fairly new to Java and web services. From what I understand, JNLP and WebStart are methods to deploy Java clients to users and not for creating war files and the like. >Correct, while Java Web Start has 'web' in the name, it has little if anything to do with web applications - certainly not providing much toward their installation. It is for launching rich client GUI based (AWT, Swing, SWT..) applications onto the end-user's desktop.
    There are some parts of JWS that might seem peripherally useful to the installation of a web-app., but it is really not a 'good fit'.
    >
    ..Any suggestions would be so helpful and appreciated!>You might try the forums for the 'web tier' APIs.
    <http://forum.java.sun.com/category.jspa?categoryID=20>
    Or perhaps the forum 'Java Technologies for Web Services' (under 'enterprise technologies')
    <http://forum.java.sun.com/forum.jspa?forumID=331>
    This one in 'BigAdmin' seems particularly relevant, 'Set up and Deploy'
    <http://forum.java.sun.com/forum.jspa?forumID=550>

  • Novice Help with Creating Opportunities Using Web Services 2.0

    Hello,
    I recently took over our CRM integration services and was asked to push some data via our custom portal.
    We use our portal to automate the creation of new opportunities in our Oracle CRM System.
    The code was developed using Web Services 1.0
    I was recently asked to add data to the "Parent Opportunity" field upon creation of a new Opportunity. Now I may be mistaken and if I am I will be very pleased, but it seems to me this field isn't available in 1.0
    If I am mistaken and there IS a way to push data to the "parent opportunity" field using 1.0 Please completely disregard what I have typed below.
    Upon looking at the WSLD for 2.0 I see "ParentoptyID" as an available field.
    I took it upon myself to try and move this process over to 2.0 but I have hit a few major stumbling blocks. Here is the working code for 1.0:
    Public Function CRMAddFinalShipmentOpportunity2(ByVal Session As Session, ByVal Subject As String, ByVal Type As String, ByVal Priority As String, ByVal Account As String, ByVal DueDate As String, ByVal Status As String, ByVal Description As String, ByVal AnnBudget As String, ByVal oppType As String, ByVal partNumber As String, ByVal currency As String, ByVal Territory As String, ByVal Owner As String, ByVal Opp As String) As String
    Dim opportunity As nkkcrm.SiebelOpportunity20.Opportunity = New nkkcrm.SiebelOpportunity20.Opportunity
    Dim input As New nkkcrm.SiebelOpportunity20.OpportunityInsert_Input
    Dim results As New nkkcrm.SiebelOpportunity20.OpportunityInsert_Output
    Dim strPriority As String = "1-High,2-Medium,3-Low"
    Dim strType As String = "Call,Correspondence,Email,Event,Final Shipment - Book,Final Shipment - Special,Lead Follow-Up,Meeting,Opportunity Follow-Up,Other,Presentation,Quote Follow-Up,Sample Follow-Up,Service Request Follow-Up"
    Dim strStatus As String = "Completed,Deferred,Waiting For Someone Else,In Progress,Not Started,Assigned,In Call"
    CRMAddFinalShipmentOpportunity2 = ""
    ' Validate Data (CRM will validate if owner is valid)
    If Owner = "" Then
    AddError("Error: Missing Owner")
    Exit Function
    End If
    If Subject = "" Then
    AddError("Error: Missing Subject")
    Exit Function
    End If
    If strType.IndexOf(Type) < 0 Then
    AddError("Error: Invalid or Missing Type")
    Exit Function
    End If
    If strStatus.IndexOf(Status) < 0 Then
    AddError("Error: Invalid or Missing Status")
    Exit Function
    End If
    If strPriority.IndexOf(Priority) < 0 Then
    AddError("Error: Invalid or Missing Priority")
    Exit Function
    End If
    If Not IsDate(DueDate) Then
    AddError("Error: Invalid or Missing DueDate")
    Exit Function
    End If
    Try
    opportunity.Url = Session.GetURL()
    opportunity.CookieContainer = Session.GetCookieContainer()
    'Create the opportunity
    Dim tmpAry(0) As nkkcrm.SiebelOpportunity20.Opportunity
    input.ListOfOpportunity(0) = tmpAry
    input.ListOfOpportunity.SetValue(New nkkcrm.SiebelOpportunity20.Opportunity, 0)
    'Assign the opportunity Properties
    input.ListOfOpportunity(0).Owner = Owner
    input.ListOfOpportunity(0).OpportunityName = Subject
    input.ListOfOpportunity(0).AccountName = Account
    input.ListOfOpportunity(0).SalesStage = "Rebuy"
    input.ListOfOpportunity(0).CloseDate = Date.Today
    input.ListOfOpportunity(0).Territory = Territory
    input.ListOfOpportunity(0).stProject_Name = "FINAL SHIPMENT REBUY"
    input.ListOfOpportunity(0).SourceCampaign = "Rebuy"
    input.ListOfOpportunity(0).OpportunityType = oppType
    input.ListOfOpportunity(0).Revenue = AnnBudget
    input.ListOfOpportunity(0).Description = Description
    input.ListOfOpportunity(0).bRebuy = "Y"
    input.ListOfOpportunity(0).ProductInterest = partNumber
    input.ListOfOpportunity(0).plCurrency_Type = currency
    'input.ListOfOpportunity(0).ParentoptyId = Opp
    'insert the opportunity
    results = opportunity.OpportunityInsert(input)
    If results.ListOfOpportunity.Length > 0 Then
    CRMAddFinalShipmentOpportunity2 = results.ListOfOpportunity(0).OpportunityId
    End If
    Catch webex As WebException
    AddError(webex.Message)
    Catch ex As Exception
    AddError(ex.Message)
    End Try
    End Function
    What changes might I need to make in order to make this function correctly using Web Services 2.0?
    Currently I get the following errors- For every line of input.ListOfOpportunity(0) I get: '..cannot be indexed because it has no default property.'
    Another example of an issue I'm running into is: 'SetValue' is not a member of 'nkkcrm.SiebelOpportunity20.ListOfOpportunityData'

    We were able to make this work by re-modeling my code after a code sample I found that creates new Activities.
    Here's my code in case it helps someone scanning these forums in the future (Disregard the Opportunity entries that are missing when you compare this to my earlier code- Those weren't relevant to making this work or not work, I simply am not using them now.):
    Public Function CRMAddFinalShipmentOpportunity2(ByVal Session As Session, ByVal Owner As String, ByVal Subject As String, ByVal Type As String, ByVal Priority As String, ByVal DueDate As String, ByVal Status As String, ByVal Description As String, ByVal POValue As String, ByVal oppType As String, ByVal partNumber As String, ByVal currency As String, ByVal servername As String, ByVal pass As String, ByVal usrname As String) As String
    'Get SessionID
    Dim sessionId As String
    sessionId = getSessionLogin(usrname, pass, servername)
    Dim Opportunity As nkkcrm.SiebelOpportunity20.Opportunity = New nkkcrm.SiebelOpportunity20.Opportunity
    Dim OppInput As New nkkcrm.SiebelOpportunity20.OpportunityInsert_Input
    Dim OppOutput As New nkkcrm.SiebelOpportunity20.OpportunityInsert_Output
    Dim strPriority As String = "1-High,2-Medium,3-Low"
    Dim strType As String = "Call,Correspondence,Email,Event,Final Shipment - Book,Final Shipment - Special,Lead Follow-Up,Meeting,Opportunity Follow-Up,Other,Presentation,Quote Follow-Up,Sample Follow-Up,Service Request Follow-Up"
    Dim strStatus As String = "Completed,Deferred,Waiting For Someone Else,In Progress,Not Started,Assigned,In Call"
    'Validate Data (CRM will validate if owner is valid)
    If Owner = "" Then
    AddError("Error: Missing Owner")
    Exit Function
    End If
    If Subject = "" Then
    AddError("Error: Missing Subject")
    Exit Function
    End If
    If strType.IndexOf(Type) < 0 Then
    AddError("Error: Invalid or Missing Type")
    Exit Function
    End If
    If strStatus.IndexOf(Status) < 0 Then
    AddError("Error: Invalid or Missing Status")
    Exit Function
    End If
    If strPriority.IndexOf(Priority) < 0 Then
    AddError("Error: Invalid or Missing Priority")
    Exit Function
    End If
    If Not IsDate(DueDate) Then
    AddError("Error: Invalid or Missing DueDate")
    Exit Function
    End If
    'Instantiate OpportunityData
    Dim objListOfOpportunity As nkkcrm.SiebelOpportunity20.ListOfOpportunityData
    Dim objOpportunity As nkkcrm.SiebelOpportunity20.OpportunityData()
    Try
    objOpportunity = New nkkcrm.SiebelOpportunity20.OpportunityData(0) {}
    objListOfOpportunity = New nkkcrm.SiebelOpportunity20.ListOfOpportunityData()
    objOpportunity(0) = New nkkcrm.SiebelOpportunity20.OpportunityData
    'Assign the opportunity Properties
    objOpportunity(0).Owner = Owner
    objOpportunity(0).OpportunityName = Subject
    objOpportunity(0).AccountName = "UNKNOWN"
    objOpportunity(0).SalesStage = "Rebuy"
    objOpportunity(0).CloseDate = Date.Today
    objOpportunity(0).Territory = "North America"
    objOpportunity(0).stProject_Name = "FINAL SHIPMENT REBUY"
    objOpportunity(0).SourceCampaign = "Rebuy"
    objOpportunity(0).OpportunityType = oppType
    objOpportunity(0).Revenue = POValue
    objOpportunity(0).Description = Description
    objOpportunity(0).bRebuy = True
    objOpportunity(0).ProductInterest = partNumber
    objOpportunity(0).plCurrency_Type = currency
    'Connect the Opportunity to ListOfOpportunity
    objListOfOpportunity.Opportunity = objOpportunity
    'Connect ListofOpportunity to Input Parameter
    OppInput.ListOfOpportunity = objListOfOpportunity
    Opportunity.Url = servername & "/Services/Integration;jsessionid=" & sessionId
    'Opportunity.CookieContainer = Session.GetCookieContainer()
    Opportunity.OpportunityInsert(OppInput)
    Return "success"
    Catch webex As WebException
    AddError(webex.Message)
    Catch ex As Exception
    AddError(ex.Message)
    End Try
    End Function
    Public Function getSessionLogin(ByVal usrname As String, ByVal pass As String, ByVal servername As String)
    Dim loginurl As String = servername & "/Services/Integration?command=login"
    'MessageBox.Show(loginurl);
    Dim req As HttpWebRequest = DirectCast(WebRequest.Create(loginurl), HttpWebRequest)
    ' username and password are passed as HTTP headers
    req.Headers.Add("UserName", usrname)
    req.Headers.Add("Password", pass)
    ' cookie container has to be added to request in order to
    ' retrieve the cookie from the response.
    Dim cookie As Cookie
    req.CookieContainer = New CookieContainer()
    ' make the HTTP callby
    Dim resp As HttpWebResponse = DirectCast(req.GetResponse(), HttpWebResponse)
    If resp.StatusCode = System.Net.HttpStatusCode.OK Then
    ' store cookie for later...
    cookie = resp.Cookies("JSESSIONID")
    If cookie Is Nothing Then
    Return "invalid session"
    End If
    Return cookie.Value
    Else
    Return "invalid session"
    End If
    End Function

  • Crystal Reports 2008 fails when called from e Web Service under 64bit OS

    I have discovered that Crystal Reports 2008 doesn't work when called from a Web Service running under 64bit Windows platforms (in my case Windows 2003 Server and Windows XP 64bit); practically no object is instantiated. I've tried several solutions without success.
    Before creating a wrapper component to use under COM+, is there anybody who has a better and cheaper solution than creating another component to wrap CR 2008 ?

    Hi Sergio,
    Before I mark this post as assumed answered I would just like to say and re-iterate that at this time there is no one answer and we fully understand your concerns. As you know in CR 6.0 it came in 16 and 32 bit versions because at the time 32 bit was relatively new but 16 bit was the norm. This is also true for 32 to 64 bit, 32 is the norm and 64 bit is relatively new. We know and are well aware 64 bit is the future and we are working as quickly as we can to move in that direction. Because of the complexity of the Product it's not simply a matter of re-compiling all of our dll's in 64 bit format. The core of our data connectivity with our database drivers which are dependant on third party clients must also need to support 64 bit modes. This as well as Printer drivers also need to be 64 compatable, there are a multitude of dependencies that we rely on that must add 64 bit support. As a programmer you are well aware of the issues around Thunking back and forth between 32 to 64 bits, it can cause delays and potentially loss of data which is a whole other issue. Not to mention also that we would have to ship both versions potentially doubling the size of the distribution packages or doubling the size of the dll's to have the ability to work in both modes. Relatively speaking of course, it would not be double the size but the variables would need to be able to allocate 32 or 64 memory blocks.
    The other option is to produce 2 separate versions, this alone is a massive project. Any issue would need to be fixed in separate code streams.
    So I'm sure you can see it's not simply a matter of saying yes we support 64 bit. It's a massive project that is going to take time to do and we have to wait for the third party drivers to commit also.
    Visual Studio .NET 2005 and 2008 is the only option if you want true 64 bit but you will be limited on what DB's you can support and export formats you can export to. They are the only drivers we did convert to 64 bit.
    Thank you for your understanding
    Don

  • As400 performence issue using web services

    Performance degrade while accessing as400 using web services instead of MQ Connection. Any suggestion what might cause this ?
    Edited by: indubala on Dec 16, 2009 6:26 PM

    It is not just 1 node, you will need to do several things which I have outlined here.
    In the first node set your variables.
    Here the invocation class is defined.
    Set this to the standard Native Invocation Class used in CCA.
    If this was not defined, the Campaign should use a default invocation class but I'd advise you to specify just to be sure.
    The values are:
    $invocationClass
    com.taw.web.invocation.WebServiceInvocation
    Remember that when specifying the string value single quotes (ticks) should surround the value (as with any string in CCA Campaigns).
    Next in the same node set the values for the service name.
    Set this to the default of ‘invoke’ used in CCA.
    If this was not defined, the Campaign should use the default of ‘invoke’ but again I'd advise on setting it to be sure.
    The values are :
    $serviceName
    invoke
    Next you will need to set the values that will be passed as the input objects to the invocation class.
    Recall that the two required objects are WebServiceInvocationId and KeyValue.
    The next area that would need to be defined is the Invocation wait loop.
    This is done for both testing as well as operation reasons.
    For testing this provides simple troubleshooting.
    For production use, the loop is important to handle time outs and errors.
    If the timeout value is ever reached, the return value will be set to Fail.
    First set the loop counter, then in the child nodes define the Loop counter expressions to check for a specific time to wait value.
    The external web service will need to be prepared to receive the exact objects sent by the Invocation class.
    In addition it will also expect to be instructed to process the invoke method.
    That should be enough to get you going.

  • HP 6700 printer will not enable web services.

    My HP 6700 printer will not enable web services. I've already downloaded the firmware update, manually entered the IP and DNS numbers... shutdown the printer and turned it back on.But when i try to enable web services it try's for a while then says web services could not be enabled.. any help would be appreciated.  I have vista. 
    This question was solved.
    View Solution.

    Hi there, two other things you could try (if not already attempted) are:
    Check to ensure that you have the latest firmware for your router – review your router documentation/help (or the router manufacturer’s web site) for information on how to check for and install firmware updates. 
    Restore factory defaults - The factory default option is usually found in the Setup>Tools menu on your printer.   Do the following on your device:
    Remove/Disable Web Services 
    Restore factory defaults/settings (depending on the printer this is found under the Setup>Tools menu, or the Setup>Web Services menus, but varies by printer) 
    If prompted, re-do initial setup of your device and add it to your network
    Re-enable Web Services 
    Once the Web Services information sheet is printed, use the printer claiming code to add your printer to your account on ePrintCenter
    If my reply helped you, feel free to click on the Kudos button (hover over the "thumbs up").
    If my reply solved your problem please click on the Accepted Solution button so other Forum users may benefit from viewing the post.
    I am an HP employee.

Maybe you are looking for