jax-ws

Webservice-Client: Use plain-text xml instead of object hierarchy

I am programming a simple proxy in java: Read XML File Send request to Web-Service Read Web-Service response Write response to file My first attempt is using JAXB to read the xml-file and generating Java-Objects. Then I send the objects with JAX-WS (IBM WebSphere). I receive the response as a "ResponseObject" which is then genera...

How to generate meaningful list names in JAX-WS web services.

I have a schema with something along the lines of <xs:element ref="Item" minOccurs="0" maxOccurs="unbounded" /> and it is referenced in my wsdl. When I use wsimport to create java code, the class gets a field called List<Item> item; Is there a way to get it to name the field something more standard like items or itemList? I don't...

cxf jaxws with spring on gwt 2.0

Hi, I'm trying to use an application which uses cxf-jaxws in bean definition: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:util="http://www.springframework.or...

Server-Side XML Validation with CXF Webservice

Hey guys, I'm working on an Apache CXF webservice (using JAX-WS, over SOAP). The service itself is pretty simple: receive a request, insert the request into a database, and return whether the insert was successful. I'd like to rely on XML validation to enforce a number of constraints on the request. So, my question. How do I return ...

How can I make a WebMethod parameter required

We use the "start from Java" approach to creating JAX-WS 2.0 web services using the Metro 1.5 stack. When we point a standard tool like SoapUI at one of our web services it indicates that parameters to WebMethods are optional. The generated xsd shows minOccurs=0. I need a way to make WebMethod parameters required (maybe minOccurs=1 in...

Expose a POJO as a Websevice in Mule via Configuration _Only_?

Technologies Involved Mule Apache CXF Given A simple POJO (controversial acronym, but let's say a smart POJO): public class SmartPojo implements SomeBusinessInterface { public String doSomethingSmart( With something ) { String result; result = Irrelevant.process( something ) return result; ...

Possible to split one JAX-WS service across multiple source files?

Hi everyone, Is it possible to split a web service in to multiple classes and still provide a single path to the web service? I know this isn't possible because of the duplicate url-pattern values. It sort of illustrates where we're wanting to go :) <endpoint name="OneBigService" implementation="SmallImpl1" url-pa...

JAX-WS timeout problem

I've published web service endpoint on Sun light weight http server. The server is running with ThreadPool executors for the connection (Executors.newCachedThreadPool()). I'm also using regular web service client (also JAX-WS). It seems that for every call that exceed 5 minutes the server (or the client) ends the current call thread and...

Writing a REST wrapper over AXIS2

Hi, I have an AXIS2 webservice already in place for my application. However, for an android mobile client, SOAP based webservices are too heavy. Hence, I am planning to wrap this webservice into RESTful webservice. To do this, 1. I ran wsimport on my wsdl to generate jaxb sources, since the ones I had were AXIS2 generated(with ADB). ...

Need to see SOAP messages for client talking to external web service - how to? (Eclipse/Netbeans/IDEA ok)

I have a situation where I have to write a client in Java against a very picky external web service (over https) and I can talk to the web service through the Web Services Explorer in Eclipse JEE. Unfortunately I cannot get the client to ask properly so I'd really like to see the SOAP messages going back and forth. Being new to web ser...

wsgen ant task ignore @webMethod(exclude=true) annotation

I Have a web service implementation class in java and I use wsgen to generate the service end point classes. There is a public method in my SEI that I want to exclude from the web-service interface. It seems that the annotation @WebMethod (exclude=true) is meant to do that but it does not seem to work with the wsgen ant task. ...

Does JAXWS client make difference between an empty collection and a null collection value as returned value ?

Since JAX-WS rely on JAXB, and since I observed the code that unpack the XML bean in JAX-B Reference Implementation, I guess the difference is not made and that a JAXWS client always return an empty collection, even the webservice result was a null element: public T startPacking(BeanT bean, Accessor<BeanT, T> acc) throws AccessorExcepti...

Invoke webservice using jaxws when the wsdl has more than one service

I'm trying to get hold of the FindService on this wsdl using jaxws. I generated the classes just fine using wsimport. But when i do: FindService findService = new FindService(); i get the exception: Exception in thread "main" javax.xml.ws.WebServiceException: {http://s.mappoint.net/mappoint-30/}FindService is not a valid service. Va...

how to view internal jaxws logs in tomcat

I have a web service that is deployed in tomcat, and it is rejecting a soap request over https. However, I can't see any logs as to why it is doing so. I have the following set in my service endpoint implementation file: System.setProperty("javax.net.debug", "all"); System.setProperty("java.security.debug", "all"); And I pass the fol...

get client IP for webservice on java 6 embbeded http server

Hi, I am implementing web service on java 6 weight light (embbeded) HTTP server jax-ws-web-services-without-java-ee-containers - for testing purposes - I want to get the client IP for each request. I tried to declare web service context in my web service class: @Resource WebServiceContext wsContext; then use its message context in ...

How to get the source of request from Web Service?

I want to get <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:prin="http://localhost/example&quot;&gt; <soapenv:Header/> <soapenv:Body> THIS </soapenv:Body> </soapenv:Envelope> from webservice request I send from Java. I use javax.jws ...

How do you marshall a parameterized type with JAX-WS / JAXB?

Consider the following classes (please assume public getter and setter methods for the private fields). // contains a bunch of properties public abstract class Person { private String name; } // adds some properties specific to teachers public class Teacher extends Person { private int salary; } // adds some properties specific to stu...

WCF: (MTOM) is there any way to change the scheme used in xop:Content reference uris generated by WCF?

WCF uses http://tempuri/1/number for Content-ID uri references when handling streamed MTOM requests. Is there any way how to force WCF to use a different Content-ID references for the xop:Include? Bakcground of the problem: I am building a .NET client for MTOM enabled jax ws java web service that handles streamed large data uploads. ...

JAX-WS webservice issue: Prefix not bound to namespace

Hi All, I have a webservice implmented in JAX WS framework. It has one method which takes paramter as object of custom class. when I invoke it from client without specifying any handler it works fine. But when I configure SOAPMessageHandler on client side I get following exception: javax.xml.ws.WebServiceException: java.lang.IllegalArgu...

can a valid xml body have escaped characters for the '<' and '>' around the element names

My web service is receiving xml from a third party that looks like this: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt; <SOAP-ENV:Body> &lt;Foo&gt;bar&lt;/Foo&gt; </SOAP-ENV:Body> </SOAP-ENV:Envelope> My jaxws web service rejects this with a parsing error. Also if I try to validate this xml u...