Jax-WS 2.2 web service instances management on Glassfish 3

Hi all, I'm studying Jax-WS specification in general and its implementation on Glassfish 3.1.2. I built a simple standard example where a jax-ws soap based web service is called from a jsp page by using the artifacts generated through wsimport (the webservice and the jsp page are both deployed on Glassfish in the same EAR but in 2 different wars).
Everything works as expected but I have a question: looking at the application log, it seems that Glassfish creates a new instance of the webservice each time it is called. I would like to know where Java offically defines how a web container should manage webservice instances and if developers can customize this behaviour.
I read jax-ws 2.1 specification here
http://download.oracle.com/otndocs/jcp/jaxws-2.1-mrel2-eval-oth-JSpec/
but I found only a clue when speaking about how to publish a webservice using the Endpoint class by hand (section 5.2.2 "Publishing", page 69):
"An endpoint consists of an object that acts as the Web service implementation (called here implementor) plus some configuration information...
An Endpoint will be typically invoked to serve concurrent requests, so its implementor should be written so as to support multiple threads. The synchronized keyword may be used as usual to control access to critical sections of code. For finer control over the threads used to dispatch incoming requests, an application can directly set the executor to be used..."
This note is present even in Jax-WS 2.2 specification (used by Glassfish 3).
Actually, if I build a webservice using only JavaSE 7 (which includes Jax-WS 2.2), this description is true because there is only one instance of the webservice. Is there any reason why JavaEE doesn't follow this policy?
Thanks a lot for your help,
Nico

Hi, I found the answers on this specification (JSR-109):
http://jcp.org/aboutJava/communityprocess/mrel/jsr109/index3.html
It describes how Jax-WS works on JavaEE:
"4.1 Client Programming model (page 18)
a client must assume that the methods of a Web service have no state that is persistent across multiple Web service method invocations. A client can treat the Web service implementation as stateless.
The client has no control over the life cycle of the Web service implementation on the server. A client does not create or destroy instances of a Web service, which is referred to as a Port. The client only accesses the Port. The life cycle of the Ports, or instances of a Web service implementation, are managed by the run-time that hosts the Web service. A Port has no identity. This means that a client cannot compare a Port to other Ports to see if they are the same or identical, nor can a client access a specific Port instance.
5.3.2.4.2 Web container programming model for JAX-WS (page 42)
A Service Implementation must be a stateless object. A Service Implementation Bean must not save client specific state across method calls either within the bean instance’s data members or external to the instance. A container may use any bean instance to service a request.
5.3.4 Service Implementation Bean Life Cycle (page 43)
Before a request can be serviced, the container must instantiate a Service Implementation Bean and ready it for method requests.
A container may pool method ready instances of a Service Implementation Bean and dispatch a method request on any instance in a method ready state."
Moreover, the specification states that JavaEE must not use the Endpoint class to publish a webservice:
"5.3.3 Publishing Endpoints – javax.xml.ws.Endpoint (page 43)
JAX-WS provides functionality for creating and publishing Web Service endpoints dynamically using javax.xml.ws.Endpoint API. The use of this functionality is considered non-portable in a managed environment. It is required that both the Servlet and the EJB container disallow the publishing of the Endpoint dynamically, by not granting the publishEndpoint security permission."

Similar Messages

  • Application Web Service Control Manager detected AWEBSVC is not responding to HTTP requests. The http status code and text is 400, Bad Request.

    Hi All,
    I am seeing the following error for SMS_AWEBSVC_CONTROL_MANAGER component with Message ID: 8100
    Application Web Service Control Manager detected AWEBSVC is not responding to HTTP requests.  The http status code and text is 400, Bad Request.
    awebsctl.log file has below errors:
    Call to HttpSendRequestSync failed for port 80 with status code 400, text: Bad Request
    SMS_AWEBSVC_CONTROL_MANAGER 12/22/2014 3:37:55 PM
    13920 (0x3660)
    AWEBSVCs http check returned hr=0, bFailed=1
    SMS_AWEBSVC_CONTROL_MANAGER 12/22/2014 3:37:55 PM
    13920 (0x3660)
    AWEBSVC's previous status was 1 (0 = Online, 1 = Failed, 4 = Undefined)
    SMS_AWEBSVC_CONTROL_MANAGER 12/22/2014 3:37:55 PM
    13920 (0x3660)
    Health check request failed, status code is 400, 'Bad Request'.
    SMS_AWEBSVC_CONTROL_MANAGER 12/22/2014 3:37:55 PM
    13920 (0x3660)
    Management point and Application Catalog Website Point are installed on the same Server where I am seeing the error for Application Catalog Web Service Point role. Management Point and Application Catalog Website Point are functioning properly. Application
    Catalog Website is working.
    Thanks & Regards, Kedar

    Hi Jason,
    Application Catalog Web Service Point and Application Catalog Website Point; both are installed as per below configuration on same Server:
    IIS Website: Default Web Site
    Port Number: 80
    with default value for Web Application Name configured.
    For SMS_AWEBSVC_CONTROL_MANAGER component, I am getting below error in Component Status:
    Application Web Service Control Manager detected AWEBSVC is not responding to HTTP requests.  The http status code and text is 400, Bad Request.
    Possible cause: Internet Information Services (IIS) isn't configured to listen on the ports over which AWEBSVC is configured to communicate. 
    Solution: Verify that the designated Web Site is configured to use the same ports which AWEBSVC is configured to use.
    Possible cause: The designated Web Site is disabled in IIS. 
    Solution: Verify that the designated Web Site is enabled, and functioning properly.
    For more information, refer to Microsoft Knowledge Base.
    And awebsctl.log has the below error lines:
    Call to HttpSendRequestSync failed for port 80 with status code 400, text: Bad Request
    SMS_AWEBSVC_CONTROL_MANAGER
    12/23/2014 11:04:36 AM 16388 (0x4004)
    AWEBSVCs http check returned hr=0, bFailed=1
    SMS_AWEBSVC_CONTROL_MANAGER
    12/23/2014 11:04:36 AM 16388 (0x4004)
    AWEBSVC's previous status was 1 (0 = Online, 1 = Failed, 4 = Undefined)
    SMS_AWEBSVC_CONTROL_MANAGER
    12/23/2014 11:04:36 AM 16388 (0x4004)
    Health check request failed, status code is 400, 'Bad Request'.
    SMS_AWEBSVC_CONTROL_MANAGER
    12/23/2014 11:04:36 AM 16388 (0x4004)
    STATMSG: ID=8100
    What should I check from IIS side?
    Application Catalog Website is functioning properly.
    Thanks & regards,
    Kedar
    Thanks & Regards, Kedar

  • JAX-WS PL/SQL  Web Service with JDeveloper (Weblogic problem)

    Hello,
    does anyone know how to create a JAX-WS webservice based on a pl-sql package using JDeveloper? Maybe it is possible with a newer version of JDeveloper 11.1.2.3, currently I'm using 11.1.1.6 which only offers a JAX-RPC for PlSql Web services.
    I'm facing a problem right now trying to deploy an jax-rpc web service on Weblogic 10.3.4. Actually it seems to be an WebLogic problem because weblogic doesn't support the older standard (JAX-RPC). So I've extended the weblogic domain using Fusion Middleware Configuration Wizard like described for example here . Unfortunately it doesn't help. Deploying my applicaiton on a forms11g (11.1.1.4) domain (which goes hand in hand with the weblogic domain (?)) is successful. But anyway I can't call the WSDL or test the web service using weblogic console. Other services (jax-ws) work without any problem on the same forms domain.
    I would appreciate any hint, how to automatically produce an jax-ws web service from an plsql package or how to run a jax-rpc web service on weblogic 10.3.4. It's Weblogic Basic Server actually, but I'm of the opinion it doesn't play a role in my case.
    Thank you in advance for your hints.
    Kind regards,
    Anton
    Edit: I would appreciate any hint how to check if a weblogic domain supports jax-rpc (if extended correctly). Thanks.

    We can generate jaxws from 11.1.2.0 onwards using This is now provided by the TopLink web service provider builder, which can be via the TopLink DBWS provider wizard from JDeveloper since the 11.1.2.0.0 release
    1.4.4 Database Web Services (DBWS)
    http://docs.oracle.com/cd/E23943_01/doc.1111/e26045/general.htm#CHDIEEHG
    Hope that heps
    Regards,
    Sunil P

  • Web Service session manager not found.

    I'm trying to understand how to use the HTTP utilities, and I'm having trouble just creating a session.  I get a Web Service session manager not found error.  I've read where the client has to support cookies.  My eventual client will be a labview VI that talks to a web server.  I llooked at the Toolsptions, but don't see anything related to cookies.  Not sure if that's what's causing this anyway, but I'm just digging.  Also, I want to eventually send http messages across TCP/IP.  Do I need to use the TCP/IP VIs (i.e. open connection, etc) or do I use the http utilities alone.  If both are needed, how does the httpRequestID and the TCP/IP connection ID correlate.
    Attachments:
    htttGetSession.vi ‏9 KB
    WebServerError.PNG ‏13 KB

    Hi can you please let me know how you resolved this issue?

  • Application Web Service Control Manager detected AWEBSVC is not responding to HTTP requests

    Hi,
    We are using SCCM 2012 sp1 cu5 with one primary in the datacenter and a number of local DP's which are presently servicing 200 users, but will rise to 12,000. The Application Catalogue is installed on the primary server.
    Once a day we get the above error and the message id is 8101, and sometimes a user will have to click on install twice, with the first one failing (the ones that fail are normally with dependencies which are quite large in size around 250MB)
    I'm just wondering if this is something I should be concerned about, especially since we will be ramping up user numbers in the next few weeks, and if it could be down to volume of traffic, although the apps are downloaded to the users local DP.
    Also, does this design look suitable to service this amount of users, or should I have local application catalogues? The WAN bandwith between the datacenter and the user sites has recently been upgraded and is pretty fast.
    Thanks
    Jaz

    Hi Torsten,
    Message ID is in the SMS_AWEBSVC_CONTROL_MANAGER status log and equates to "Application Web Service Manager detected AWEBSVC is not responding to HTTP requests. The http error is 12002.
    Then, about 1 hr later in the same monitoring log I get Message ID 8102 "Application Web Service Control Manger detected AWEBSVC is responding to HTTP requests.
    At the moment it isn't doing this very often, just once a day at different times normally, but it has also logged this a couple of times as well. I guess it may correspond to multiple users accessing the web portal at multiple times, but wondered if
    anyone else has seen this behaviour and how it was fixed.
    Thanks
    Jaz

  • Operations Manager 2012 Management Pack Catalog Web Service - Missing Management Packs

    I am using SCOM 2012 R2 with UR5 and I see things like Exchange 2013 and Lync 2013 in the catalog when doing an MP import, but some other items like: SQL Server 2012/2014 and SharePoint 2013 are missing. I can download them from the MS download site,
    but is this catalog web service being maintained? 

    Hi Darren, I know what you mean. It would be nice to be able to pull the latest management packs as well as management packs available from the download site from the catalog via the Operations Console, however, the packs in the catalog are not comprehensive. 
    I highly recommend the SCOM management pack wiki which is kept up to date by the community. I use this myself :) An added benefit to using this wiki over the catalog is that this links to the download page for the management pack of interest from where you
    can obtain the management pack and its documentation which often contains useful detail on what the management pack entails. The wiki link is below:
    http://social.technet.microsoft.com/wiki/contents/articles/16174.microsoft-management-packs.aspx
    If you've found this post helpful,  please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    MrChiyo | My blog: Technical | Twitter: MrChiyo

  • Stateless Web Services - Field Management

    Hi,
    We have a program for querying Field Management data.
    Initially, we used the same approach for this, as we use for any other WS query, i.e., by specifying a JSESSIONID.
    However, then we realized that Field Management Web Services is a stateless web services.
    We tried different approaches (NOTE: we are using C#), like specifiying the credentials using a ICredentials object, etc.; but everytime, we would get a "Missing <wsse:Security> in SOAP Header", error.
    Could some one, please help us out, on how to specify the credentials.
    A sample code, would be much appreciated.
    Regards.

    jessionid -> stateful
    if you want to use stateless SOAP request, you have to set usernane and password in the SOAP HEADER.
    Download OnDemWebSvcs.pdf from your CRM and you can get sample code about how to use stateless web service call.

  • Is it a web service instance?

    Now let's take following scenario into consideration:
    Some customers want to get information(product list, price,inventory etc) from their supplier thru. their own information system. Their system may be developed by different language.
    How to implement it? Is it an instance of web service? If so, how to develop the system?
    Please give me some instruction....
    Thanks in advance

    Yes there is use web services. Web services is to intergrated all the application which writen in diffrent to comunicated each other. They are 2 way to do the web services. One, is use .NET to write it and the second one is use Java language to write to web services.

  • Partner Web Service Session Management in BPEL with JDeveloper 11g

    JDeveloper 11g 11.1.1.1.0 and SOA Suite 11g
    Trying to create an synchronous Web Service which has an external reference to a Web Service partner (AXIS 1.4 implementation) using BPEL. I have a sequence which has 2 invokes, one for user login and another invoke for a different call. However the session from the login has to be maintained for the second call to work. I am unable to do this. I get a NoSession error thrown from the partner Web Service. I did verify that my login piece is working.
    On the composite, in the external reference piece I added binding property oracle.webservices.session.maintain and set to true and also added oracle.webservices.httpConnTimeout and set the value to 10000. This did not help. I would appreciate any help. Thanks.
    Ratnam

    Hi,
    Did you configure the Axis2 in Jdeveloper?
    Best Regards
    Sunny

  • Web Service application - migrating to Glassfish

    Hello!
    I've a WebService app. which now runs on Tomcat 5.5.23 and was written using JAX-WS. I've install Sun Java System App. Server 9.0 and I intend to migrate our app. here.
    The application is delivered as a war file which I've already deployed in glassfish using admin GUI of asadmin. I can see our app. at WebApplications section but I can't see it under WebServices section, although it seems at a first view that the application works and respond to client's request.
    I'd like to ask you if I need to use a special tool for migrating our aplication or what I did is enough and there is no need for other changes.
    Thank you very much
    With best regards,
    Sorin

    I found how to do this in an excellent TechEd Europe document presented by some guy from SAP AG (I think) from a few years back.
    Unfortunately, I didn't save the link. I had only a paper printout and I can't find the document again.  It was buried in some article I read on some SAP web page.
    Thomas Jung also has a presentation on this that can be found with search, but I was not able to follow that completely.  The TechEd Europe piece could be followed line by line and had the necessary code examples (function modules)  to demonstrate that the the Web Service was consumed.  If I remember correctly, anything that is remote enabled in 6.20 can consume the service.
    WebService in WebAS 6.20 is absolutely unique; implementing a web service in WebAS/Basis versions before and after are entirely different from WebAS 6.20.

  • Web service control manager

    Hi,
    I have created a Gateway in WebService Control manager. I have registered a service with the gateway. Now when I am testing with test page..it is throwing error "Failed to read WSDL from http://192.168.44.85:8888/TestGateway/services/SID0003002?wsdl:WSDL not found"
    Could someone please help me out.its urgent.
    thanks in advance

    <xsl:for-each select="/tns:BSNLOMITUpdates/BSNLOMITUpdateValue/OrderEntry-Orders/ListOfOrderItemAttributes/OrderItemAttributes">
    <xsl:choose>
    <xsl:when test='xp20:matches(Name,"TT_FAULT_CLEARANCE_CODE")'>
    <ns0:ClearanceCode>
    <xsl:value-of select="Value"/>
    </ns0:ClearanceCode>
    </xsl:when>
    </xsl:choose>
    </xsl:for-each>
    i will be getting different clearance codes from the name .Each time i have to check the value and send to the appropriate target.So i have to use number of for loops.
    Is there any solution fo this.
    Thanks in advance.

  • Secure the JAX-RPC United Loan Web Service with WS-Security source file not

    A download link 'http://www.oracle.com/technology/obe/obe1013jdev/secureunitedloan/SecureUnitedLoanSource.zip' referenced by 'http://www.oracle.com/technology/obe/obe1013jdev/secureunitedloan/SecureUnitedLoan.html' cannot be found.

    After some research I found that:
    1. on geronimo 2.1 you can only use basic authentication for webservices
    2. advanced security requires the use of axis2

  • [ANN]  Online Seminars on Web Services Development Management and Security

    This week and the next, join us online here:
    http://www.oracle.com/technology/tech/java/newsletter/seminars.html
    Or catch the recordings.

    join us now here:
    http://conference.oracle.com/imtapp/app/cmn_jm.uix?mID=21194005&src=app/wel_public_mtgs

  • Session management and java Web Service

    Hi ,
    Can I have two web services one based on Session bean and other on Simple java class, packaged into single ear file? Does NetWeaver supports web service session management/tracking? How can I get an handle to HttpRequest in my Web Service?
    Any help will be appreciated.
    Thanks in advance
    regards,
    rajinder

    Container Managed Authentication. Does everything you need.

  • Web Service JAX-RPC/SOAP with JAXB

    Hello,
    During my research on JAX-RPC/SOAP as web service technology. I found only simple "helloworld" sample type what using simple String as aurgment. For my task, I required a more complex aurgment such as a complete contact info. I then did some sample code for JAXB and found it to be very useful as a XML/JAVA binding tool. It seems logical to use JAXB to parse and bind the complex aurgment. Though I have not seen any reference to this using it with JAX-RPC. Does JAX-RPC have the tool set to accomplish the same thing? JAX-RPC may have such thing, but using this JAXB seem logical, thus would I still "conform" to the JAX-RPC if I go this route. Any info would be much appreciative.
    Thanks in Advance,
    Mike

    The two JAX-RPC tools that I have used, the reference implementation and Apache Axis both have tools for mappiing XML to classes and vice-versa. Having used JAXB also, I have to say that both of these tools are much easier to use than JAXB.
    As far as whether it will conform, you can make a valid SOAP message using any tool you like.

Maybe you are looking for

  • IOS 6 on iPad 2 does not have the Passbook app or Siri

    I updated to the iOS 6 on my iPad2 but I can't find Siri nor Passbook. Did something went wrong with my update or is this global

  • Need help exporting in cs4

           I am looking into a film major, or a television and brodcast major. i biught a sony XR150 to film some stuff for portfolio (short films. I work at a TV station near me, so i can use the stuff i produced also.) for some reason, i am having a MA

  • Value does not stay in screen in screen painter after clicking enter

    Hi abapers, I have created a table control in screen painter .My problem is that after entering 1 row of values and press enter the value gets vanished.it doesn stay in screen .What may be the problem?? Have any of abapers gone through this scenario.

  • CS4 - How to list files in order in 'Files view'

    Hi, I have numerous websites but some of them do not list the folders/pages order in the file view. Normally I have the folders at the top followed by the pages as per screen shot 1. I have tried refreshing the folder but no joy and I have gone to th

  • Red border around checkboxes

    I can't get rid of the red border when I add checkboxes to my form. I have tried showing properties and selecting no line, but there's still a red border...? Also, how can I look at the document as it will appear when finished -- i.e., without the bl