Polymorphism in a JAX-WS 2.1

I will try and describe this problem by using simple examples - I would like to leverage the power of polymorphism in web services. Suppose I have a simple web service class with a set and get operation as below:
package wsserv;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService
public class OptionService{
    private OptionBean option = new OptionBean(1, "Default Value");
    @WebMethod(operationName = "setOption")
    @Oneway
    public void setOption(@WebParam(name = "option") OptionBean option){
        this.option = option;
    @WebMethod(operationName = "getOption")
    public OptionBean getOption(){
        return option;
}And a simple bean to be accessible on the client and server, as below:
package wsserv;
import java.io.Serializable
public class OptionBean implements Serializable{
    private int id;
    private String label;
    public OptionBean(){
    public int getId()}{
        return id;
    public void setId(int id){
        this.id = id;
    public String getLabel(){
        return label;
    public void setLabel(String label){
        this.label = label;
}Deploying this as a web services allows the client to use instances of the OptionBean class - no problems there. Now suppose I do the following
package wsserv;
public class DescribedBean extends OptionBean{
    private String description;
    public String getDescription(){
        return description;
    public void setDescription(String description){
        this.description = description;
}OK, so this is my question: Is there any annotation I can place on this class to make it available to web service clients? If I define a method in the webservice:
    @WebMethod(operationName = "setDescribed")
    @Oneway
    public void setDescribed(@WebParam(name = "described") DescribedBean described){
        this.option = described;
    }then I can use instances of DescribedBean in the setOption and getOption methods. Ideally though, I do not want to have to add methods to the web service for every subclass of OptionBean that arises.
If there is no such annotation, then is there a way to manually update the XML schema produced, so that I can add in required subclasses there?
Thank you in advance for any help you can provide.

Try to use XmlSeeAlso annotation this way:
@XmlSeeAlso( value=DescribedBean.class )
public class OptionBean implements Serializable{
    private int id;
    private String label;
    public OptionBean(){
    public int getId()}{
        return id;
    public void setId(int id){
        this.id = id;
    public String getLabel(){
        return label;
    public void setLabel(String label){
        this.label = label;
}I hope your version of JAXB supports it. If I remember correctly this annotation is available since JAXB 2.1.x
Regards,
Slawomir Wojtasiak

Similar Messages

  • JAX-RPC deserialization error: unexpected XML reader state

    Guys,
    Trying to write a Jax-Rpc client that consumes a web service hosted on WebLogic 7.1 talking soap 1.1. I can bind to that service using Apache SOAP - so I don't think that service is returning invalid XML.
    Is there something in my client's classpath that's old or not compatible ?
    Getting the following exception
    java.rmi.RemoteException: Runtime exception; nested exception is:
    deserialization error: unexpected XML reader state. expected: END but found: START: stockSymb
    ol
    deserialization error: unexpected XML reader state. expected: END but found: START: stockSymbol
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:209)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerIm
    pl.java:115)
    at trader.TraderServicePort_buy_ResponseStruct_SOAPSerializer.doDeserialize(TraderServicePort
    buyResponseStruct_SOAPSerializer.java:37)
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:165)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerIm
    pl.java:115)
    at trader.TraderServicePort_Stub._deserialize_buy(TraderServicePort_Stub.java:180)
    at trader.TraderServicePort_Stub._readFirstBodyElement(TraderServicePort_Stub.java:153)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:168)
    at trader.TraderServicePort_Stub.buy(TraderServicePort_Stub.java:115)
    at portal.jsp._portal._test.__TestJaxrpc._jspService(__TestJaxrpc.java:83)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:945)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:909)
    at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:2
    69)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:130)
    CAUSE:
    unexpected XML reader state. expected: END but found: START: stockSymbol
    at com.sun.xml.rpc.streaming.XMLReaderUtil.verifyReaderState(XMLReaderUtil.java:49)
    at trader.TradeResult_SOAPSerializer.doDeserialize(TradeResult_SOAPSerializer.java:66)
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:165)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerIm
    pl.java:115)
    at trader.TraderServicePort_buy_ResponseStruct_SOAPSerializer.doDeserialize(TraderServicePort
    buyResponseStruct_SOAPSerializer.java:37)
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:165)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerIm
    pl.java:115)
    at trader.TraderServicePort_Stub._deserialize_buy(TraderServicePort_Stub.java:180)
    at trader.TraderServicePort_Stub._readFirstBodyElement(TraderServicePort_Stub.java:153)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:168)
    at trader.TraderServicePort_Stub.buy(TraderServicePort_Stub.java:115)
    at portal.jsp._portal._test.__TestJaxrpc._jspService(__TestJaxrpc.java:83)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:945)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:909)
    at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:2
    69)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:130)
    Thanks
    Atish

    Using WSDP 1.1 this can be fixed IF you're using a static stub to access the service by running wscompile with the -f:searchschema option when generating the client stubs. It will then search the schema aggressively for subtypes when generating the stubs and your client will function correctly. The downside is that this ties your client down to using implementation specific functionality that is not part of the standard, which IMHO is very bad but if you're happy to live with this then it will work.
    Therefore I want to use a dynamic proxy client. For this you don't need to use the wscompile tool to generate client stubs and therefore the above fix doesn't work. I have searched the API documentation for some method that would have the same effect but thus far to no avail. Does anybody have any ideas?
    On a side note I have to say I'm fairly unhappy that in the entire 900 page web services tutorial no mention is made of how to utilise inheritance for parameter and return types without running into problems, neither is any mention made of support for / lack of support for polymorphism which also seems to cause problems. Forgive my sarcasm and lack of grace but, "What, is it 1975 already?" In this day and age I DO expect to be able to use these things without having to specify obscure compiler options, or indeed worry about them in any way whatsoever.

  • What is the difference between RMI and JAX-RPC?

    Dear All
    First of all my understanding of RMI and JAX-RPC:
    RMI is JAVA only version of RPC. It can't talk to any other language.
    JAX-RPC is a part of JWSDP and if you implement your client and server with JAX-RPC, client written in any language can talk with JAX-RPC implementation.
    What else makes them different and am I right with my understanding?
    Finally, I would like to develop clients which will have a java class, say httpserver.java, which will act like a http server, listens to a http port. Now, Two such client will run in two different PC and I want to call a module from one client to another which should be accessible via my httpserver.java. For that which should be my choice RMI or JAX-RPC? Can I achive it with http get-post method, as I am expecting to read some value of variables from one client to the another.
    Say class A has variable a, aa, aaa and clas B has variable b, bb, bbb. Now I want to read the value of b, bb, bbb from class A. How do I do that when class B is listening to a http port with my httpserver.java class.
    Lastly, say B is listening to a http port and I want to send a file to B from A. How can I do that? Remember, B didn�t ask for that. How can A send a file to B when B is listening to a http port with my httpserver.java.
    With regards
    Mohammed Jubaer Arif
    Mobile: +61-0411215302
    Personal Web: http://www.geocities.com/jubairarifctg/
    Org. Web.: http://www.geocities.com/halimschamber/

    simply put, RMI allows you to (semi) transparently treat remote objects as if they were local, and your distributed application can be written (more or less) like a "normal" java app. Sockets just give you a "raw" connection to work with, and you get to build up your application from that.
    I hope that helped
    Lee

  • Application based on JAX-WS running slow on AIX 3.5 of 64 bits

    Hi all,
    I’m running a java web service based on JAX-WS the release included in java6, this application load the information from tables to data structures in memory such as hash map, and has it available for a client application that consume it.
    My problem is that when I run my application on windows the time of processing is acceptable but when I try to run the same application on AIX 3.5 of 64 bits the communication between client and the web service is up 10 times slower.
    I tried the following test.
    Run the WS and client in the same windows server its success (fast)
    Run the WS in a windows server the client in my windows 7 laptop the result is success (fast)
    Run the Web Service on windows server and the client in AIX server this is slow
    Run the Web Service on the same AIX server that the client it is slow
    When I run the applications, I compile it whit the java6_64 version and run whit –d64 option on AIX
    Regards

    Try to isolate the problem by finding out where the delay is e.g
    1.) Is the delay in loading data from the database into memory?
    2.) Is the delay in getting a request from the client side to the server side components?
    3.) Is the delay in processing a request on the server side with the in memory data?
    Also verify that jvm settings and hardware (e.g) processors between the two environments are comparable.

  • Question about JAX-WS together with EJB 3.0 on WLS 10.3

    Hi all,
    I am developing a application that it is running on WebLogic 10.3. The application expose EJB 3.0 methods as web services by @WebService & @WebMethod annotation. And my question is,
    1. Is there any way to specify the context path/root for those exposed EJB? Currently the contextpath is same as the EJB's name
    2. And is there a method to disable the "scanning" of JAX-WS annotation on startup/deployment? The reason behind is that, some of the EJB jar files are coming from other team. I need to deploy it as EJB but not as a web service.
    Thanks
    Regards,
    Rock

    Hi guys,
    Here is what Eduardo is talking about:
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=407022.1
    (Doc ID: Note:407022.1)
    Rgds,
    Fábio.

  • JAX-WS Client throws NULL Pointer Exception in NW 7.1 SP3 and higher

    All,
    My JAX-WS client is throwing an exception when attempting to create a client to connect to the calculation service. The exception is coming out of the core JAX-WS classes that are part of NetWeaver. (see exception below)
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContextExistingPort(SAPServiceDelegate.java:440)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContext(SAPServiceDelegate.java:475)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:492)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:484)
         at javax.xml.ws.Service.createDispatch(Service.java:166)
    I have done some research and it appears that as of NetWeaver 7.1 SP3 SAP stopped using the SUN JAX-WS runtime and implemented their own SAP JAX-WS runtime. I also took the time to decompile the jar file that contained the SAPServiceDelegate class which is throwing the null pointer exception. (see method from SAPServiceDelegate below)
        private ClientConfigurationContext createDispatchContextExistingPort(QName portName, JAXBContext jaxbContext)
            BindingData bindingData;
            InterfaceMapping interfaceMap;
            InterfaceData interfaceData;
            bindingData = clientServiceCtx.getServiceData().getBindingData(portName);
            if(bindingData == null)
                throw new WebServiceException((new StringBuilder()).append("Binding data '").append(portName.toString()).append("' is missing!").toString());
            QName bindingQName = new QName(bindingData.getBindingNamespace(), bindingData.getBindingName());
            interfaceMap = getInterfaceMapping(bindingQName, clientServiceCtx);
            interfaceData = getInterfaceData(interfaceMap.getPortType());
            ClientConfigurationContext result = DynamicServiceImpl.createClientConfiguration(bindingData, interfaceData, interfaceMap, null, jaxbContext, getClass().getClassLoader(), clientServiceCtx, new SOAPTransportBinding(), false, 1);
            return result;
            WebserviceClientException x;
            x;
            throw new WebServiceException(x);
    The exception is being throw on the line where the interfaceMap.getPortType() is being passed into the getInterfaceData method. I checked the getInterfaceMapping method which returns the interfaceMap (line above the line throwing the exception). This method returns NULL if an interface cannot be found. (see getInterfaceMapping method  below)
       public static InterfaceMapping getInterfaceMapping(QName bindingQName, ClientServiceContext context)
            InterfaceMapping interfaces[] = context.getMappingRules().getInterface();
            for(int i = 0; i < interfaces.length; i++)
                if(bindingQName.equals(interfaces<i>.getBindingQName()))
                    return interfaces<i>;
            return null;
    What appears to be happening is that the getInterfaceMapping method returns NULL then the next line in the createDispatchContextExistingPort method attempts to call the getPortType() method on a NULL and throws the Null Pointer Exception.
    I have included the code we use to create a client below. It works fine on all the platforms we support with the exception of NetWeaver 7.1 SP3 and higher (I already checked SP5 as well)
          //Create URL for service WSDL
          URL serviceURL = new URL(null, wsEndpointWSDL);
          //create service qname
          QName serviceQName = new QName(targetNamespace, "WSService");
          //create port qname
          QName portQName = new QName(targetNamespace, "WSPortName");
          //create service
          Service service = Service.create(serviceURL, serviceQName);
          //create dispatch on port
          serviceDispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
    What do I need to change in order to create a JAX-WS dispatch client on top of the SAP JAX-WS runtime?

    Hi Guys,
    I am getting the same error. Any resolution or updates on this.
    Were you able to fix this error.
    Thanks,
    Yomesh

  • FileUpload using JAX-WS webservice on weblogic 10.3.5 is taking long time for files greater than 10MB

    I am trying to upload a file using JAX-WS webservice which is deployed on the weblogic 10.3.5 server.Even before the code reaches the Service Endpoint lot of time is being spent at the weblogic layer. for files less than 10MB the performance is good but for files greater than 10 MB it takes around 3 mins to complete the request. I did take thread dumps  and I see the thread servicing the requests is taking lot of time when executing SAX2DOMEx.characters  it consumes around 80 -85 % of time here. Is there anything that I can do to improve the performance here ?
    "[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'" id=37 idx=0x90 tid=16848 prio=5 alive, suspended, native_blocked, daemon
                    at jrockit/vm/Allocator.allocLargeObjectOrArray(JIZ)Ljava/lang/Object;(Native Method)
                    at jrockit/vm/Allocator.allocObjectOrArray(Allocator.java:349)[optimized]
                    at jrockit/vm/StringMaker.toString(StringMaker.java:188)[inlined]
                    at com/sun/org/apache/xerces/internal/dom/CharacterDataImpl.appendData(CharacterDataImpl.java:191)[optimized]
                    at com/sun/xml/bind/marshaller/SAX2DOMEx.characters(SAX2DOMEx.java:218)[inlined]
                    at com/sun/xml/bind/marshaller/SAX2DOMEx.characters(SAX2DOMEx.java:209)[optimized]
                    at com/sun/xml/ws/message/SAX2DOMWriterEx.writeCharacters( .java:108)
                    at com/sun/xml/ws/util/xml/XMLStreamReaderToXMLStreamWriter.handleCharacters(XMLStreamReaderToXMLStreamWriter.java:153)
                    at com/sun/xml/ws/util/xml/XMLStreamReaderToXMLStreamWriter.bridge(XMLStreamReaderToXMLStreamWriter.java:114)
                    at com/sun/xml/ws/message/stream/StreamMessage.writePayloadTo(StreamMessage.java:313)
                    at com/sun/xml/ws/message/stream/StreamMessage.writeEnvelope(StreamMessage.java:343)
                    at com/sun/xml/ws/message/stream/StreamMessage.writeTo(StreamMessage.java:321)
                    at com/sun/xml/ws/message/AbstractMessageImpl.readAsSOAPMessage(AbstractMessageImpl.java:226)
                    at com/sun/xml/ws/handler/SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:87)
                    at weblogic/wsee/jaxws/framework/jaxrpc/SOAPMessageContext.getMessage(SOAPMessageContext.java:252)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.getSecurityContext(WssHandler.java:318)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.preValidate(WssHandler.java:420)
                    at weblogic/wsee/security/wssp/handlers/PreWssServerPolicyHandler.processRequest(PreWssServerPolicyHandler.java:25)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.handleRequest(WssHandler.java:112)
                    at weblogic/wsee/jaxws/framework/jaxrpc/TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:222)
                    at com/sun/xml/ws/api/pipe/Fiber.__doRun(Fiber.java:866)
                    at com/sun/xml/ws/api/pipe/Fiber._doRun(Fiber.java:815)
                    at com/sun/xml/ws/api/pipe/Fiber.doRun(Fiber.java:778)
                    at com/sun/xml/ws/api/pipe/Fiber.runSync(Fiber.java:680)
                    ^-- Holding lock: com/sun/xml/ws/api/pipe/Fiber@0x83736a70[biased lock]
                    at com/sun/xml/ws/server/WSEndpointImpl$2.process(WSEndpointImpl.java:403)
                    at com/sun/xml/ws/transport/http/HttpAdapter$HttpToolkit.handle(HttpAdapter.java:532)
                    at com/sun/xml/ws/transport/http/HttpAdapter.handle(HttpAdapter.java:253)
                    at com/sun/xml/ws/transport/http/servlet/ServletAdapter.handle(ServletAdapter.java:140)
                    at weblogic/wsee/jaxws/WLSServletAdapter.handle(WLSServletAdapter.java:171)
                    at weblogic/wsee/jaxws/HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:708)
                    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
                    at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:146)
                    at weblogic/wsee/util/ServerSecurityHelper.authenticatedInvoke(ServerSecurityHelper.java:103)
                    at weblogic/wsee/jaxws/HttpServletAdapter$3.run(HttpServletAdapter.java:311)
                    at weblogic/wsee/jaxws/HttpServletAdapter.post(HttpServletAdapter.java:336)
                    at weblogic/wsee/jaxws/VerboseHttpProcessor.post(VerboseHttpProcessor.java:39)
                    at weblogic/wsee/jaxws/JAXWSServlet.doRequest(JAXWSServlet.java:98)
                    at weblogic/servlet/http/AbstractAsyncServlet.service(AbstractAsyncServlet.java:99)
                    at javax/servlet/http/HttpServlet.service(HttpServlet.java:820)
                    at weblogic/servlet/internal/StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                    at weblogic/servlet/internal/StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                    at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:300)
                    at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:183)
                    at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.wrapRun(Lweblogic/servlet/internal/ServletStubImpl;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Ljava/lang/Object;(Unknown Source)
                    at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(Unknown Source)
                    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                    at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:120)
                    at weblogic/servlet/internal/WebAppServletContext.securedExecute(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Z)V(Unknown Source)
                    at weblogic/servlet/internal/WebAppServletContext.execute(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(Unknown Source)
                    at weblogic/servlet/internal/ServletRequestImpl.run()V(Unknown Source)
                    at weblogic/work/ExecuteThread.execute(ExecuteThread.java:209)
                    at weblogic/work/ExecuteThread.run(ExecuteThread.java:178)
                    at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)

    I am trying to upload a file using JAX-WS webservice which is deployed on the weblogic 10.3.5 server.Even before the code reaches the Service Endpoint lot of time is being spent at the weblogic layer. for files less than 10MB the performance is good but for files greater than 10 MB it takes around 3 mins to complete the request. I did take thread dumps  and I see the thread servicing the requests is taking lot of time when executing SAX2DOMEx.characters  it consumes around 80 -85 % of time here. Is there anything that I can do to improve the performance here ?
    "[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'" id=37 idx=0x90 tid=16848 prio=5 alive, suspended, native_blocked, daemon
                    at jrockit/vm/Allocator.allocLargeObjectOrArray(JIZ)Ljava/lang/Object;(Native Method)
                    at jrockit/vm/Allocator.allocObjectOrArray(Allocator.java:349)[optimized]
                    at jrockit/vm/StringMaker.toString(StringMaker.java:188)[inlined]
                    at com/sun/org/apache/xerces/internal/dom/CharacterDataImpl.appendData(CharacterDataImpl.java:191)[optimized]
                    at com/sun/xml/bind/marshaller/SAX2DOMEx.characters(SAX2DOMEx.java:218)[inlined]
                    at com/sun/xml/bind/marshaller/SAX2DOMEx.characters(SAX2DOMEx.java:209)[optimized]
                    at com/sun/xml/ws/message/SAX2DOMWriterEx.writeCharacters( .java:108)
                    at com/sun/xml/ws/util/xml/XMLStreamReaderToXMLStreamWriter.handleCharacters(XMLStreamReaderToXMLStreamWriter.java:153)
                    at com/sun/xml/ws/util/xml/XMLStreamReaderToXMLStreamWriter.bridge(XMLStreamReaderToXMLStreamWriter.java:114)
                    at com/sun/xml/ws/message/stream/StreamMessage.writePayloadTo(StreamMessage.java:313)
                    at com/sun/xml/ws/message/stream/StreamMessage.writeEnvelope(StreamMessage.java:343)
                    at com/sun/xml/ws/message/stream/StreamMessage.writeTo(StreamMessage.java:321)
                    at com/sun/xml/ws/message/AbstractMessageImpl.readAsSOAPMessage(AbstractMessageImpl.java:226)
                    at com/sun/xml/ws/handler/SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:87)
                    at weblogic/wsee/jaxws/framework/jaxrpc/SOAPMessageContext.getMessage(SOAPMessageContext.java:252)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.getSecurityContext(WssHandler.java:318)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.preValidate(WssHandler.java:420)
                    at weblogic/wsee/security/wssp/handlers/PreWssServerPolicyHandler.processRequest(PreWssServerPolicyHandler.java:25)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.handleRequest(WssHandler.java:112)
                    at weblogic/wsee/jaxws/framework/jaxrpc/TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:222)
                    at com/sun/xml/ws/api/pipe/Fiber.__doRun(Fiber.java:866)
                    at com/sun/xml/ws/api/pipe/Fiber._doRun(Fiber.java:815)
                    at com/sun/xml/ws/api/pipe/Fiber.doRun(Fiber.java:778)
                    at com/sun/xml/ws/api/pipe/Fiber.runSync(Fiber.java:680)
                    ^-- Holding lock: com/sun/xml/ws/api/pipe/Fiber@0x83736a70[biased lock]
                    at com/sun/xml/ws/server/WSEndpointImpl$2.process(WSEndpointImpl.java:403)
                    at com/sun/xml/ws/transport/http/HttpAdapter$HttpToolkit.handle(HttpAdapter.java:532)
                    at com/sun/xml/ws/transport/http/HttpAdapter.handle(HttpAdapter.java:253)
                    at com/sun/xml/ws/transport/http/servlet/ServletAdapter.handle(ServletAdapter.java:140)
                    at weblogic/wsee/jaxws/WLSServletAdapter.handle(WLSServletAdapter.java:171)
                    at weblogic/wsee/jaxws/HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:708)
                    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
                    at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:146)
                    at weblogic/wsee/util/ServerSecurityHelper.authenticatedInvoke(ServerSecurityHelper.java:103)
                    at weblogic/wsee/jaxws/HttpServletAdapter$3.run(HttpServletAdapter.java:311)
                    at weblogic/wsee/jaxws/HttpServletAdapter.post(HttpServletAdapter.java:336)
                    at weblogic/wsee/jaxws/VerboseHttpProcessor.post(VerboseHttpProcessor.java:39)
                    at weblogic/wsee/jaxws/JAXWSServlet.doRequest(JAXWSServlet.java:98)
                    at weblogic/servlet/http/AbstractAsyncServlet.service(AbstractAsyncServlet.java:99)
                    at javax/servlet/http/HttpServlet.service(HttpServlet.java:820)
                    at weblogic/servlet/internal/StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                    at weblogic/servlet/internal/StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                    at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:300)
                    at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:183)
                    at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.wrapRun(Lweblogic/servlet/internal/ServletStubImpl;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Ljava/lang/Object;(Unknown Source)
                    at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(Unknown Source)
                    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                    at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:120)
                    at weblogic/servlet/internal/WebAppServletContext.securedExecute(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Z)V(Unknown Source)
                    at weblogic/servlet/internal/WebAppServletContext.execute(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(Unknown Source)
                    at weblogic/servlet/internal/ServletRequestImpl.run()V(Unknown Source)
                    at weblogic/work/ExecuteThread.execute(ExecuteThread.java:209)
                    at weblogic/work/ExecuteThread.run(ExecuteThread.java:178)
                    at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)

  • The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the

    Hi,
    Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
    I have created a dynamic web project and added javax RS jars:
    When im trying to run this, i'm getting the below mentioned error:
    FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
    RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
    Please help as im stuck with this from long.
    Thanks in advance.
    Below is the code for my service class:
    package com.rest.assignment;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.util.Enumeration;
    import java.util.HashSet;
    import java.util.Properties;
    import java.util.Set;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.Application;
    import javax.ws.rs.core.MediaType;
    import javax.ws.rs.core.Response;
    @Path("/restService")
    public class RestService extends Application {   
        @GET
        @Path("/getEmpDetails")
        @Produces(MediaType.APPLICATION_JSON)
        public Response getStringResponse()
            EmpBean empBean = new EmpBean();
            String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
            Properties properties = new Properties();
            try {
                properties.load(new FileInputStream(filePath));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
             Enumeration e = properties.propertyNames();
             String result="";
            String[] empDetailsArr;
            while (e.hasMoreElements()) {
              String key = (String) e.nextElement();
              String empDetails = properties.getProperty(key);
              empDetailsArr=empDetails.split(",");    
              empBean.setFirstName(empDetailsArr[0]);
              empBean.setLastName(empDetailsArr[1]);
              empBean.setEmpId(empDetailsArr[2]);
              empBean.setDesignation(empDetailsArr[3]);
              empBean.setSkillSet(empDetailsArr[4]);
              result = empDetailsArr[1];
            //return empBean;
            return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
        @Override
        public Set<Class<?>> getClasses() {
            Set<Class<?>> classes = new HashSet<Class<?>>();
            classes.add(RestService.class);
            classes.add(EmpBean.class);
            return classes;
    and my empBean goes like this:
    package com.rest.assignment;
    public class EmpBean {
        private String firstName;
        private String lastName;
        private String empId;
        private String designation;
        private String skillSet;
        public String getFirstName() {
            return firstName;
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        public String getLastName() {
            return lastName;
        public void setLastName(String lastName) {
            this.lastName = lastName;
        public String getEmpId() {
            return empId;
        public void setEmpId(String empId) {
            this.empId = empId;
        public String getDesignation() {
            return designation;
        public void setDesignation(String designation) {
            this.designation = designation;
        public String getSkillSet() {
            return skillSet;
        public void setSkillSet(String skillSet) {
            this.skillSet = skillSet;
    Web.xml goes like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <display-name>restWS</display-name>
    <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
      <servlet-name>REST</servlet-name>
      <servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
      <init-param>
       <param-name>javax.ws.rs.Application</param-name>
       <param-value>com.rest.assignment.RestService</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
      <servlet-name>REST</servlet-name>
      <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
    </web-app>
    When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response.

    Hi,
    Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
    I have created a dynamic web project and added javax RS jars:
    When im trying to run this, i'm getting the below mentioned error:
    FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
    RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
    Please help as im stuck with this from long.
    Thanks in advance.
    Below is the code for my service class:
    package com.rest.assignment;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.util.Enumeration;
    import java.util.HashSet;
    import java.util.Properties;
    import java.util.Set;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.Application;
    import javax.ws.rs.core.MediaType;
    import javax.ws.rs.core.Response;
    @Path("/restService")
    public class RestService extends Application {   
        @GET
        @Path("/getEmpDetails")
        @Produces(MediaType.APPLICATION_JSON)
        public Response getStringResponse()
            EmpBean empBean = new EmpBean();
            String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
            Properties properties = new Properties();
            try {
                properties.load(new FileInputStream(filePath));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
             Enumeration e = properties.propertyNames();
             String result="";
            String[] empDetailsArr;
            while (e.hasMoreElements()) {
              String key = (String) e.nextElement();
              String empDetails = properties.getProperty(key);
              empDetailsArr=empDetails.split(",");    
              empBean.setFirstName(empDetailsArr[0]);
              empBean.setLastName(empDetailsArr[1]);
              empBean.setEmpId(empDetailsArr[2]);
              empBean.setDesignation(empDetailsArr[3]);
              empBean.setSkillSet(empDetailsArr[4]);
              result = empDetailsArr[1];
            //return empBean;
            return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
        @Override
        public Set<Class<?>> getClasses() {
            Set<Class<?>> classes = new HashSet<Class<?>>();
            classes.add(RestService.class);
            classes.add(EmpBean.class);
            return classes;
    and my empBean goes like this:
    package com.rest.assignment;
    public class EmpBean {
        private String firstName;
        private String lastName;
        private String empId;
        private String designation;
        private String skillSet;
        public String getFirstName() {
            return firstName;
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        public String getLastName() {
            return lastName;
        public void setLastName(String lastName) {
            this.lastName = lastName;
        public String getEmpId() {
            return empId;
        public void setEmpId(String empId) {
            this.empId = empId;
        public String getDesignation() {
            return designation;
        public void setDesignation(String designation) {
            this.designation = designation;
        public String getSkillSet() {
            return skillSet;
        public void setSkillSet(String skillSet) {
            this.skillSet = skillSet;
    Web.xml goes like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <display-name>restWS</display-name>
    <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
      <servlet-name>REST</servlet-name>
      <servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
      <init-param>
       <param-name>javax.ws.rs.Application</param-name>
       <param-value>com.rest.assignment.RestService</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
      <servlet-name>REST</servlet-name>
      <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
    </web-app>
    When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response.

  • JAX-RPC vs OC4J J2Ee web service

    Hi,
    Currently we use Oracle10G 10.0.3 developer preview edition. we deployed same web service on both JAX-RPC platfrom and OC4J J2EE web service platfrom (RPC encoding style). We found that old platform seems to perform better than JAx-RPC platfrom with regard to serialization and de-serialzation. We also did the test on Doc/literal style in JAX-RPC platfrom and its performance is not as good as the one deployed on old platform. We understand JAX-RPC is new implementation and Oracle10.0.3 is under developer preview edition and so it may not be optimized. We have following questions
    1. Is this a known issue in JAX-RPC platform?
    2. Is there anyway to optimize JAX-RPC web service? Like using different XMl parser (instead of Oracle XML parser)
    3. When is the final release of 10.0.3 expected?
    4. Will Oracle be supporting old web service platfrom (OC4J J2EE web service platform)? If so how long?
    Thanks and regards
    __Hari

    Hi,
    Currently we use Oracle10G 10.0.3 developer preview edition. we deployed same web service on both JAX-RPC platfrom and OC4J J2EE web service platfrom (RPC encoding style). We found that old platform seems to perform better than JAx-RPC platfrom with regard to serialization and de-serialzation. We also did the test on Doc/literal style in JAX-RPC platfrom and its performance is not as good as the one deployed on old platform. We understand JAX-RPC is new implementation and Oracle10.0.3 is under developer preview edition and so it may not be optimized. We have following questions
    1. Is this a known issue in JAX-RPC platform?
    2. Is there anyway to optimize JAX-RPC web service? Like using different XMl parser (instead of Oracle XML parser)
    3. When is the final release of 10.0.3 expected?
    4. Will Oracle be supporting old web service platfrom (OC4J J2EE web service platform)? If so how long?
    Thanks and regards
    __Hari

  • Error with ALBPM 10g / JAX-WS and WebLogic 10g

    Folks/People/Community:
    I have an application client running over weblogic 10g. This application needs to be integrated with an external WebServices running under ALBPM 10g and implemented using jax-ws.
    So far our application client running in standalone mode outside the weblogic server works without problems. But, running inside WebLogic 10g the application cannot establish connection with this external webservice and the exception is attached here. Also I'm sending our client source code.
    Please, do you know if WebLogic 10g requires special configurations in order to enable this type of communication?. We have other applications already integrated with other WebService providers without problems so far today. Only this interface is failing and honestly I don't know what is the problem.
    Thanks a lot in advance for your help!.
    Gabriel.
    log startup:
    starting weblogic with Java version:
    java version "1.6.0_05"
    <Dec 29, 2009 9:57:33 AM EST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3 Fri Jul 25 16:30:05 EDT 2008 1137967 >
    ---------------[BEGIN CUT HERE CODE]-----------
    private String SECURITY_NAMESPACE =
    "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
    private String PAPI_ENDPOINT =
    "http://internal_hostname.domain.net:8780/papiws/PapiWebServiceEndpoint";
    private PapiWebService webService;
    private void initialize() throws MalformedURLException, SOAPException, OperationException_Exception {
         QName qName = new QName("http://bea.com/albpm/PapiWebService", "PapiWebService");
         Service service = PapiWebService_Service.create(new URL(PAPI_ENDPOINT), qName);
    // ERROR HERE ERROR HERE ERROR HERE
         webService = service.getPort(PapiWebService.class);
         // Authentication (OBPM)
         String sUsername = "mUser";
         String sPassword = "myPassword";
         addUsernameTokenProfile(webService, sUsername, sPassword);
         // Authentication (weblogic realm)
    sUsername = "weblogic";
    sPassword = "weblogic";
    addHttpBasicAuthentication(webService, sUsername, sPassword);
    ---------------[END CODE]-----------
    ---------------[BEGIN CUT HERE STACKTRACE]-----------
    org.quartz.SchedulerException: Job threw an unhandled exception. [See nested
    exception: com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.pipe.TubelineAssemblerFactory: Provider weblogic.wsee.jaxws.WLSTubelineAssemblerFactory is specified in jar:file:/C:/Proyectos/Software/bea/wlserver_10.3/server/lib/weblogic.jar!/META-INF/services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactorybut could not be instantiated: java.lang.ClassCastException]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529
    Caused by: com.sun.xml.ws.util.ServiceConfigurationError:
    com.sun.xml.ws.api.pipe.TubelineAssemblerFactory: Provider weblogic.wsee .jaxws.WLSTubelineAssemblerFactory is specified in jar:file:/C:/Proyectos/Software/bea/wlserver_10.3/server/lib/weblogic.jar!/M
    ETA
    -INF/services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactorybut could not be instantiated: java.lang.ClassCastException
    at com.sun.xml.ws.util.ServiceFinder.fail(ServiceFinder.java:233)
    at
    com.sun.xml.ws.util.ServiceFinder.access$300(ServiceFinder.java:141)
    at
    com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:379)
    at
    com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFac
    tory.java:104)
    at
    com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFac
    tory.java:78)
    at
    com.sun.xml.ws.client.WSServiceDelegate.createPipeline(WSServiceDelegate.jav
    a:442)
    at
    com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceD
    elegate.java:639)
    at
    com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:342)
    at
    com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:324)
    at
    com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:306)
    at javax.xml.ws.Service.getPort(Service.java:92)
    at
    com.bea.albpm.papiwebservice.PapiWebService_Service.getPapiWebServicePort(Pa
    piWebService_Service.java:56)
    at
    com.company.latam.bpm.connector.albpm10g.BPMClient10g.initialize(BPMClient10g.j
    ava:159)
    at
    com.company.latam.bpm.connector.albpm10g.BPMClient10g.<init>(BPMClient10g.java:
    63)
    at
    com.company.latam.bpm.connector.ConnectorFactory.getInstance(ConnectorFactory.j
    ava:22)
    at
    com.company.latam.bpm.connector.impl.BPMConnectorImpl.bpmAddAbstractRole(BPMCon
    nectorImpl.java:39)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(
    MethodInvocationProceedingJoinPoint.java:77
    at
    com.company.latam.common.aop.LoggingAspect.logMethodsInvocations(LoggingAspect.
    java:73)
    at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWith
    GivenArgs(AbstractAspectJAdvice.java:627)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(Abs
    tractAspectJAdvice.java:616)
    at
    org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvi
    ce.java:64)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(Expos
    eInvocationInterceptor.java:89)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy57.bpmAddAbstractRole(Unknown Source)
    at
    com.company.latam.bpm.business.impl.BPMBusinessImpl.sendBPMNotificationAddFunct
    ion(BPMBusinessImpl.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(
    MethodInvocationProceedingJoinPoint.java:77
    at
    com.company.latam.common.aop.LoggingAspect.logMethodsInvocations(LoggingAspect.
    java:73)
    at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWith
    GivenArgs(AbstractAspectJAdvice.java:627)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(Abs
    tractAspectJAdvice.java:616)
    at
    org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvi
    ce.java:64)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(Expos
    eInvocationInterceptor.java:89)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy58.sendBPMNotificationAddFunction(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Tr
    ansactionInterceptor.java:106)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy59.sendBPMNotificationAddFunction(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(
    MethodInvocationProceedingJoinPoint.java:77
    at
    com.company.latam.common.aop.LoggingAspect.logMethodsInvocations(LoggingAspect.
    java:73)
    at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWith
    GivenArgs(AbstractAspectJAdvice.java:627)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(Abs
    tractAspectJAdvice.java:616)
    at
    org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvi
    ce.java:64)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(Expos
    eInvocationInterceptor.java:89)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy59.sendBPMNotificationAddFunction(Unknown Source)
    at
    com.company.latam.sg.external.communicator.business.impl.ExternalCommunicatorBu
    sinessImpl.forwardNotificationAddFunctionAn
    dGroup(ExternalCommunicatorBusinessImpl.java:659)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(
    MethodInvocationProceedingJoinPoint.java:77
    at
    com.company.latam.common.aop.LoggingAspect.logMethodsInvocations(LoggingAspect.
    java:73)
    at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWith
    GivenArgs(AbstractAspectJAdvice.java:627)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(Abs
    tractAspectJAdvice.java:616)
    at
    org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvi
    ce.java:64)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(Expos
    eInvocationInterceptor.java:89)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy60.forwardNotificationAddFunctionAndGroup(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Tr
    ansactionInterceptor.java:106)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy61.forwardNotificationAddFunctionAndGroup(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
    tils.java:310)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
    (ReflectiveMethodInvocation.java:182)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:149)
    at
    org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(
    MethodInvocationProceedingJoinPoint.java:77
    at
    com.company.latam.common.aop.LoggingAspect.logMethodsInvocations(LoggingAspect.
    java:73)
    at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWith
    GivenArgs(AbstractAspectJAdvice.java:627)
    at
    org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(Abs
    tractAspectJAdvice.java:616)
    at
    org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvi
    ce.java:64)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(Expos
    eInvocationInterceptor.java:89)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:171)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:204)
    at $Proxy61.forwardNotificationAddFunctionAndGroup(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxy
    Factory.java:416)
    at
    org.apache.wicket.proxy.$Proxy82.forwardNotificationAddFunctionAndGroup(Unkn
    own Source)
    at
    com.citi.company.sg.external.communicator.jobs.AddEnttlementsJob.execute(AddEn
    ttlementsJob.java:16)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    ... 1 more
    Caused by: java.lang.ClassCastException
    at java.lang.Class.cast(Class.java:2990)
    at
    com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:374)
    ... 146 more
    ---------------[END STACKTRACE]-----------------------------

    Hi,
    This happens when the Classes gets Loaded from Different classLoaders and Create Conflicts...If you are using any EAR file then Please First of all...Place all the JAR files inside the "*<EAR_NAME>/APP-INF/lib*" directory and then Provide the "*weblogic-application.xml*" file inside the "*<EAR_NAME>/META-INF*"
    And Please add the Following Tags inside your "*weblogic-application.xml*" ...
    *<prefer-application-packages>*
    <package-name>com.ctc.*</package-name>
    <package-name>com.sun.xml.*</package-name>
    <package-name>com.sun.istack.*</package-name>
    <package-name>com.sun.msv.datatype.*</package-name>
    <package-name>com.sun.msv.driver.*</package-name>
    <package-name>com.sun.msv.grammar.*</package-name>
    <package-name>com.sun.msv.reader.*</package-name>
    <package-name>com.sun.msv.relaxns.*</package-name>
    <package-name>com.sun.msv.scanner.*</package-name>
    <package-name>com.sun.msv.util.*</package-name>
    <package-name>com.sun.msv.verifier.*</package-name>
    <package-name>com.sun.msv.writer.*</package-name>
    <package-name>com.sun.org.apache.xml.internal.*</package-name>
    <package-name>com.sun.wsit.*</package-name>
    <package-name>javax.jws.*</package-name>     
    <package-name>javax.xml.bind.*</package-name>
    <package-name>javax.xml.soap.*</package-name>
    <package-name>javax.xml.stream.*</package-name>
    <package-name>javax.xml.ws.*</package-name>
    <package-name>javax.xml.activation.*</package-name>
    <package-name>javax.xml.annotation.*</package-name>
    <package-name>javax.xml.mail.*</package-name>
    <package-name>javax.xml.security.*</package-name>
    <package-name>javax.xml.registry.*</package-name>
    <package-name>javax.xml.rpc.*</package-name>
    <package-name>javax.xml.crypto.*</package-name>
    <package-name>javanet.staxutils.*</package-name>
    <package-name>jp.gr.xml.*</package-name>
    <package-name>org.codehaus.stax2.*</package-name>
    <package-name>org.glassfish.gmbal.*</package-name>
    <package-name>org.iso_relax.*</package-name>
    <package-name>org.jcp.xml.dsig.*</package-name>
    <package-name>org.jvnet.*</package-name>
    <package-name>org.relaxng.*</package-name>
    *</prefer-application-packages>*
    All the Above Packages are related to WebServices .... And needs to be loaded from one ClassLoader only....to avoid conflicts.
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • Error in JAX-WS while report generation

    Hi all,
    I am using JAX-WS as a webservice client to generate the report. I tried generating the same through BI console directly and it got successfully generated.
    But when i try to generate it through the webservice client call in my code it gives following error :
    javax.xml.ws.soap.SOAPFaultException: oracle.apps.xdo.webservice.exception.OperationFailedException: PublicReportService::generateReport failed: due to oracle.apps.xdo.XDOIOException
         at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(Unknown Source)
         at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
         at $Proxy512.runReportInSession(Unknown Source)
    Kindly help..
    Thanks...

    The error was in the execution of OC4J embebbed. OC4J uses its own libraries for web services and xml.
    You can deploy an application with JAX-WS 2.0 if you add this java option:
    -Xbootclasspath/p:<dir_libs>\xml-apis.jar;<dir_libs>\xercesImpl.jar;<dir_libs>\xalan.jar;<dir_libs>\saaj.api.jar
    And the jars of JAX-WS are added as libraries to the application.
    With this solution you solve the problem: OC4J uses this libraries, not their owns, include the xml libraries.

  • How to create ADF UI based on polymorphic view objects

    Hi,
    I'm using JDeveloper build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. I created a simple application based on Steve's example #10 [url http://blogs.oracle.com/smuenchadf/examples/]ViewRow and EntityObject Polymorphism.
    I added a men-only attribute "Age" to the "Men" VO and filled it with an arbitrary value in MenRowImpl.java:
    public String getAge() {
         return (String) "45";//getAttributeInternal(AGE);
    }Running the TestModule works perfectly - a row of type "Men" displays the "Age" attribute whereas a row of type "Women" doesn't.
    Afterwards, I setup an ADF ViewController Project and created a JSPX with a read-only form based on the "People" datacontrol with navigation buttons. Running that page always shows the same set of attributes independent of the row type. That's expected behaviour because the binding is defined at design time.
    So my question is: can I somehow achieve the same behaviour for polymorphic VOs as the business component tester shows?
    Kind regards,
    Markus

    Andrejus' example shows how to calculate different values for the same attribute based on overridden view objects. That's not exactly what I'm looking for. I need to display a (at least partly) different set of attributes that changes while the user scrolls through the records of the result set.

  • Jax-RPC Client side: How to use multiple X509 client certs ?

    hi, (excuse me for my english)
    i'm looking for an answer to this question:
    I'm using the JAX-RPC libraries (JWSDP 2.0) for a web services client application in my app server (tomcat 4 under 1.4 Sun JVM) with HTTPS connection. All works fine when i'm using system.Setproperties for keystore and trustore.
    Buk now, I want to use different client SSL keys for the same app to consume the web service (one SSL client key for a group of users).
    Is it possible ?
    i've tried using custom SSLSocketFactory and custom KeyManager but it won't works: when the SSL connection is well established once, i can connect to the app with an invalide client cert ! (it seems SSL connection is in cache and i dont't know how to disable this cache).
    I have read some threads on this problem without answers ! (http://forum.java.sun.com/thread.jspa?forumID=331&threadID=333010 and http://forum.java.sun.com/thread.jspa?forumID=331&threadID=600372)
    Thanks
    Edited by: Buck007 on May 26, 2008 9:14 AM

    I have the same problem. If you find the solution please post it here :)
    thanks

  • How to create a JAX-WS dispatch client on top of the SAP JAX-WS runtime?

    Hello,
    We have created an ear file that calls a web service using the Metro toolkit.  This code is throwing an exception when attempting to create a client to connect to the calculation service. The exception is coming out of the core JAX-WS classes that are part of NetWeaver. (see exception below)
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContextExistingPort(SAPServiceDelegate.java:440)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContext(SAPServiceDelegate.java:475)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:492)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:484)
         at javax.xml.ws.Service.createDispatch(Service.java:166)
    We have done some research and it appears that as of NetWeaver 7.1 SP3 SAP stopped using the SUN JAX-WS runtime and implemented their own SAP JAX-WS runtime.
    Included below is the code we use to create a client below. It works fine on all the platforms we support with the exception of NetWeaver 7.1 SP3 and higher (already checked SP5 as well)
          //Create URL for service WSDL
          URL serviceURL = new URL(null, tpsWSEndpointWSDL);
          //create service qname
          QName serviceQName = new QName(targetNamespace, "CalculateTaxWSService");
          //create port qname
          QName portQName = new QName(targetNamespace, "CalculateTax");
          //create service
          Service service = Service.create(serviceURL, serviceQName);
          //create dispatch on port
          serviceDispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
          //invoke dispatch with Source based request
          Source result = serviceDispatch.invoke(new StreamSource(documentToInputStream(request)));
    Does anyone know what we need to change in order to create a JAX-WS dispatch client on top of the SAP JAX-WS runtime? 
    Thanksu2026
    -Chris

    Not that I have a definitive answer, but why should it matter? The web service should be developed independent of TLS. If you are trying to use SSL with then the web service is oblivious to it. If you are trying to use WS security thats a whole other ballgame.

  • XML Parser Error while creating Web service Client using JAX RPC

    hello evryone,
    Im facing XML Parser Error while creating web service client using JAX RPC. Im using Net Beans IDE for development purpose. I have wrote configuration file for client. Now i want to create Client stub. However i dont know how to do this in Net Beans. So i tried to do it from Command promt using command :
    wscompile -gen:client -d build -classpath build config-wsdl.xml
    here im getting Error:
    error parsing configuration file: XML parsing error: com.sun.xml.rpc.sp.ParseException:10: XML declaration may only begin entities
    Please help me out.
    Many thanks in advance,
    Kacee

    Can i use the client generated using jdeveloper 11g to import into the oracle forms 10g, i.e., form builder 10g. Currently this is the version we have in our office.

Maybe you are looking for

  • Drag File From Safari Download Window to Other Volume - Moves not Copies File - Bug or Feature ?

    Hi, Appreciate comment on what I thought was unusual Mac OS behavior.  Running Safari 5.1.5, OS 10.6.8. Mac OSs in my experience copy a file when it is dragged and dropped to another volume/drive. (Let's leave classic desktop out of this.) It may be

  • Best way for multiple files in vim?

    I've been trying out vim for a couple of weeks now, and I must say that I like it. I use it mostly for programming at work (a couple of hours per day). One thing I haven't settled on is how to use a single vim instance to edit multiple files. I've tr

  • Error while registering Oracle JDBC Diagnosability MBean

    Hi All, I get the following error (pasted at the end)when trying to use the OracleDriver class to create connections. I am using JDeveloper11g-11.1.1.2.0, and JDeveloper11g-11.1.1.2.0/wlserver_10.3/server/ext/jdbc/oracle/11g/ojdbc6.jar. I read other

  • The problem with iTunes

    Hi, help to deal with this problem. When you purchase the games says you can contact support iTunes to complete this transaction. After 3 payments in the game, four payment does not work, then the issue that I described above. No debt on the card the

  • Drag and drop image files fom SD-card?

    after upgrading to Lion (10.7.2) in 5 out of 10 times if I select image files from an inserted SD-card and drag them over to a folder on my internal harddisk (using a mouse not the trackpad of my MacBook Pro). I can drag the image files but if I rele