Need to run Seam Webservice on Weblogic - web-services

HI,
I am having a webservice running successfully on JBoss App Server. However, when I try deploying the webservice example on Weblogic 10.0 MP1 after making the necessary changes I get the message that "No business interface, component interface or web service endpoint interface found for Session Bean". In the generated EAR file there is no WSDL file created as well.
Is anyone able to deploy Seam Webservice on Weblogic successfully?
Thanks & Regards,
Hamid

Here are some resources that might be helpful:
From the Seam 2.0.1 GA documentation: Chapter 27. Seam on BEA's Weblogic
From the Seam 2.1.1 documentation: Chapter 39. Seam on BEA's Weblogic
From the SeamFramework knowledge base: Running Seam examples with BEA WebLogic
From the blog In relation to...: Weblogic 10, Seam, and EJB3
From the blog In relation to...: Seam Reference Guide Updated for WebLogic 10.3
Maybe you could provide more details about the steps you followed, the full stacktrace, etc.

I think this is the answer (you need have a explicity interface)

Related

Swagger with Resteasty 3 + Jetty 9.2 + JAX-RS 3

I am trying to configure an existing application to use Swagger. This application uses Resteasy 3 and Jetty 9.2 along with JAX-RS 3.
My changes are based on the explanations given on the Swagger wiki.
I have first added swagger 1.5.0 in my build.gradle before adding annotations #Api and #ApiOperation on a resource named SchedulerStateRest.
The next step was to edit my web.xml in order to hook up Swagger-Core in my Application and Initialize Swagger using Swagger's Servlet.
My issue is that when I launch my application, no resource is found when I browse /swagger.json or /swagger.yaml from http://localhost:8080. However, I get no error while starting Jetty and existing services are running and available.
I have enabled Jetty logs but I found no information relevant to me (the class in charge to launch Jetty embedded is JettyStarter).
By looking for similar problems, I found people who say that swagger content should be available at /v1/api-docs, so I tried different URLs but I always get a 404 error.
Recently, I found a gist from ben-manes for configuring swagger with Resteasy 3 + Guice 4. I tried to mimic its configuration and deduce the configuration for web.xml based on Guice-servlet explanations but I end up with the same problem as for the configuration explained above (no resource available are the expected address).
Since there is no error while starting embedded Jetty, I wonder if the issue is not related to a wrong address. Do you know how to list "resources" that are available on a Jetty instance?
I noticed that explanations on Swagger wiki are for Resteasy 2.X. Does it mean that Swagger is not compatible with Resteasy 3.x?
Ideas, suggestions, etc. to debug, solve the issue are welcome ;)
I actually figured it out yesterday. I'm going to post a sample application on git hub sometime this week since I can't find an example anywhere

jax-ws in Weblogic 10.3.5: IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions

We have a test web application deployed In Weblogic 10.3.5. The web application contains a servlet which uses jax-ws to call a web service deployed in the same weblogic.
Accessing the servlet throws the following exception:
Two classes have the same XML type name "address". Use #XmlType.name and #XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
this problem is related to the following location:
at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.ws.wsaddressing.W3CEndpointReference.address
at javax.xml.ws.wsaddressing.W3CEndpointReference
I copied the logic of the servlet into a common java class, and ran it. The test succeeded. So the problem should lie in the web application.
I have tried many ways, modify weblogic-application.xml to add prefer-application-packages section like below, but still doesn't work.
<prefer-application-packages>
<package-name>javax.xml.ws.*</package-name>
<package-name>javax.xml.bind.*</package-name>
<package-name>javax.jws.*</package-name>
<package-name>javax.namespace.xml.*</package-name>
<package-name>javax.xml.soap.*</package-name>
<package-name>org.apache.xerces.*</package-name>
<package-name>org.apache.commons.*</package-name>
<package-name>com.sun.xml.*</package-name>
</prefer-application-packages>
Anyone can help me on this, spent several days on this bug, no progress at all.
Thanks a million for your reply in advance.
Update 1
In the web application, we don't want to use metro, just use jax-ws downloaded from java.net, and put put jaxws-rt.jar, jaxws-api.jar, jaxb and other related jars in the ear/APP-INF/lib.
WebLogic Classloader Analysis Tool (wls-cat) tells there are some classes conflict, and suggests to add prefer-application-packages in weblogic-application.xml.
So We add prefer-application-packages to tell weblogic load them from from our application, not from weblogic jax-ws/metro implmentation.
But still doesn't work.
The problem might come from the fact that you want to use Metro JaxWs in Weblogic which has it's own implementation called Oracle JaxWS (based on Metro).
Here is a link where is explained how use Metro with Weblogic :
http://metro.java.net/guide/ch02.html#weblogic-10
If you don;t use Metro and rely on Oracle JaxWS you do not have to used preferred libs or any special packaging.

Deploying a Web service (WAR) application in Weblogic 11g with WS- Security enabled - Error

I am trying to deploy our proprietary web service application (WAR) into Weblogic 11g server. I have created the WAR using Eclipse Indigo and Java 1.6.
I got the below error,
Messages An error occurred during activation of changes, please see
the log for details. Error encountered during prepare phase of
deploying WebService module 'TWSWebSec.war'. When processing
WebService module 'TWSWebSec.war'. Can't find wsdl
/wsdls/wsc10/wscoor.wsdl When processing WebService module
'TWSWebSec.war'. Can't find wsdl /wsdls/wsc10/wscoor.wsdl
The deployment has been successfully installed.
I tried with a hack of creating wscoor.wsdl into the specified folder and created a new WAR, this time the error was that it is a premature closure of file, which meant the file is identified and there is nothing in the file to read.
After this, i tried to input manually the service, interfaces, operation as per the created Service endpoint interfaces/ Web services, this time i got the error
An error occurred during activation of changes, please see the log
for details. Error encountered during prepare phase of deploying
WebService module 'TWSWebSec.war'. When processing WebService module
'TWSWebSec.war'. Can't find wsdl
/wsdls/wsc11/wstx-wscoor-1.1-wsdl-200702.wsdl When processing
WebService module 'TWSWebSec.war'. Can't find wsdl
/wsdls/wsc11/wstx-wscoor-1.1-wsdl-200702.wsdl The deployment has
been successfully installed.
Am I missing anything here? Is it a configuration problem? Do I need to update any JARs I use?
Please help. Also let me know if more information required?
I post this because there is a chance that you may be in a case that is similar to what I experienced. I had the same error (i.e. "can't find wsdl") yesterday afternoon when trying to make WebLogic deploy a client created with Eclipse's web service generator using CXF. It just never worked. Today I replaced that client with one made one using WebLogic's generator, also in Eclipse, where it is found under Oracle, WebLogic, Web and Service Client. That worked for me. It seems that WebLogic uses Metro and not CXF. There is certainly nothing wrong with CXF but it does not seem to make a good pair with WebLogic.
Best regards Johannes

Webservice, Axis & OSGI (knopflerfish)

I first warn you because I'm a beginner. So, I don't know if I'll be specific on all points. Here is my problem:
I have a wsdl file. Currently, I use Tomcat and Axis to deploy it. So for that, I use the wsdl2java tool of axis that generates me the "skeleton" of the webservice. And then I write on the generated files the code of the various methods of the webservice. Finally, I deploy the webservice on tomcat with Axis. Everything seems to work more or less.
The problem is that I want to deploy this webservice using the bundle axis of osgi (knopflerfish). But I don't know how to do it.
Should we use again the wsdl file and generate a code with a tool like wsdl2java but adapted to knopflerfish? or should I use the "skeleton" that I've created before with Axis and adapte it for osgi? And generally speaking, how can we use the axis bundle of knopflerfish?
To be honest, I do not find many things over internet about it. So that's why I write to the community :(
Thank you in advance for your help.
Found a article on http://www.ibm.com/developerworks/webservices/library/ws-OSGi/ for deploying a Webservice as OSGI bundles. This uses Eclipse Equinox as the OSGi container and Apache CXF as a web services framework and its deployed in Apache Servlet Container.Hope this meets requirement of depolying Webservices as OSGI service .

web application creation with apache axis 2 and apache CXF

what is the different between apache axis 2 and apache CXF?
And what are the web application fomat of those(war,or jar etc...)
And where can I begin to write a we application with apache CXF?
could u plz define some tutorials to learn this??
For the first part, see:
Difference between Apache CXF and Axis
For the second question: CXF is very flexible. You can use a JAR, WAR, OSGi bundle, a "main method" class, Spring context, blueprint, etc.... There are lots of options depending on what works best for you.
There are a lot of tutorials and such at:
http://cxf.apache.org/resources-and-articles.html
to help get you started and there are several example in the CXF download as well.