jax-ws

jax-ws on glassfish3 init method

Hi all, I've created simple jax-ws (anotated Java 6 class to web service) service and deploied it on glassfish v3. The web.xml <?xml version="1.0" encoding="ISO-8859-1"?> <web-app> <servlet> <servlet-name>MyServiceName</servlet-name> <description>Blablabla</description> <servlet-class>com.foo-bar.somepackage.TheService</servlet-...

HowTo JAX-WS+AXIS(standalone)+Hibernate

Hi, I am searching for a right way to use Hibernate in my web-service. To begin I whant to describe, how it is working now. I have made a simple class with @WebMethod and @WebService annotations and stored it in axis2-"1.5.1/repository/servicejars" folder. This class invokes real service implementation using reflection. And all implemen...

Failed sending bytes array to JAX-WS web service on Axis

Hi I have made a small example to show my problem. Here is my web-service: package service; import javax.jws.WebMethod; import javax.jws.WebService; @WebService public class BytesService { @WebMethod public String redirectString(String string){ return string+" - is what you sended"; } @WebMethod public byte[] redirectBytes(by...

JAX-WS, webservices (Spring) issue

Hi All, I have written web services and configured with spring framework but I am getting exception when invoking services. Exceptions stack trace are given below - com.sun.xml.ws.server.sei.EndpointMethodHandler invoke SEVERE: object is not an instance of declaring class java.lang.IllegalArgumentException: object is not an instance o...

Java Webservice java.lang.ClassCastException: org.apache.cxf.jaxws.ServiceImpl

I am using Maven, CXF 2.2.7, JBoss 4.2.3 and JRE 1.5 Updated I have a Webservice that I can see on the server by using the URL myURL/myService?wsdl I am trying to develop a web app to ping that webservice by calling this in my bean: MyWebService webservice = new MyWebService(); However, it dies and throws the following error, which i...

How to have all webmethod calls of a webservice be handled by the same function? (JAX-WS)

The idea is to have a client calling different webmethods but at the server side having all the calls redirected to one entry point where authentication/permissions are checked and then let the call continue. This is: client side server side ------------ -------------- ...

JAX-WS modifying handler chain programmatically? PortInfo?

I have a JAX-WS client that needs to have a modified handler-chain. I am currently doing it by binding this XML when generated the WSDL stubs: <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"&gt; <jws:handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee"&gt; <jws:handler-chain> <jws:handler> ...

Web service unit testing

I'm using JAX-WS web services (client and exposed services), is there any API to test these web services? ...

JAX-WS and JPA, how to load stub objects using JPA?

I'm trying to develope a soap web service that has to access a mysql db. I have to replicate an existing service, so I created all the stub object from it's wsdl file Netbeans created all the necessary stuff for me (new, web service from wsdl), it works ok... Now I'm trying to use JPA to load all those objects from the database. So f...

Webservice Follow Redirect False - Error 302 (JAXWS)

This is a link to a question I had asked two days back, http://stackoverflow.com/questions/2573858/how-to-make-a-webservice-request-follow-a-redirect I am using jaxws library. The service forms the URL, and then internally creates the HTTPURLConnection. If I can grab hold of the connection I would be able to set the followRedirect to ...

How do I set the jax-ws client request timeout programatically on jboss?

I am trying to set the request (and connection) timeout for a jax-ws-webservice-client generated with the jaxws-maven-plugin. When running my app under tomcat or jetty the timeout works, but when deployed under jboss it doesn't "take". private void setRequestAndConnectionTimeout(Object wsPort) { String REQUEST_TIMEOUT = BindingProvide...

Generating jax-ws client using eclipse plugin

I'm using eclipse (eclipse-jee-galileo-win32). I generated ws clients by using eclipse build in plug-in (right click on wsdl -> web services -> generate client) and they working fine. For a automatic builds I need ant scripts that will generate such client's code automatically. I tried using wsimport (of glassfish and jdk6), but I've got...

Skip maven2 plugin by default

Hello, I am looking for a way to not have a plugin execute on install. More specifically, my scenario is as follows: I am using org.apache.cxf:cxf-codegen-plugin to generate source code. Every time I clean+install the source is generated I only want generation of source code to happen when I explicitly request it. Any and all hel...

XSL-stylesheet URI using JAX-WS and Glassfish v3.

Hi there. I'm trying to use XSL-stylesheets in order to transform some generated XML-data to HTML-output. The architecture that I'm using is as follows: [Client Side] Web-Browser => [Server Side: Glassfish v3] JSP-pages -> Web-Services. My web service generates some XML-data, then I want to format it with XSL-stylesheet, pass the result ...

Different ways of accessing configuration parameters from a JAX-WS service

As far as I know I can access the web.xml <context-param>s by making my class implement ServletContextListener and use the ServletContext.getInitParam(String) to read them, but it´s cumbersome as only one instance of the class will receive the contextInitialized(ServletContextEvent sce) call, so I need to make the ServletContext an stati...

wsgen generates wrong namespace

I wrote a simple web service with one web method that throws an exception. Web service is in package a.b, exception in package a.c. In the WSDL generated by wsgen, the exception is bound to service package name a.b and not to its actual package a.c. What am I doing wrong? JDK 1.5.14 JAX-WS 2.2 ...

JAX-WS MarshalException with custom JAX-B bindings: Unable to marshal type "java.lang.String" as an element because it is missing an @XmlRootElement annotation

I seem to be having an issue with Jax-WS and Jax-b playing nicely together. I need to consume a web-service, which has a predefined WSDL. When executing the generated client I am receiving the following error: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException - with linked exception: [com.sun.istack.SAXException2: u...

Any one can explain JAX-WS with Spring?

Hi All, Can you Explain in brief how JAX-WS works with Spring. I Know JAX-WS is using JAXB for un/marshaling but when it comes in picture in terms of flow. For e.g. lets say there is a service called entityEmployeeService (WebService). 1) UI makes a HTTP request for service entityEmployeeService, then what will happen technically and f...

Correct use of WSDL-generated sources

How can I easily convert between manually written classes and WSDL-generated equivalents? I have a Java SE 6 thick client that calls a web service to get and store data. The client has a DAO that works with my entity classes, calls <Entity>.toDto() to convert them to DTOs, and sends/receives that data with the web service. My issue stem...

Tutorial how to create a CXF web service from existing Java code and embed it in Tomcat

Do you know a tutorial how to create a CXF soap web service from existing Java code and embed it in Tomcat, and also generate a wsdl file so that any .NET system would be able to generate client code easily? I miss that WSDL creation point in, for example this http://www.ibm.com/developerworks/library/ws-pojo-springcxf/ tutorial. No wsd...