jax-ws

Where to find wsgen tool ?

Where to find the wsgen tool? ...

Getting started with JAX-WS...

Can someone suggest some good tutorials for getting started with JAX-WS? Using various tools like wsgen etc... ...

Urgent. Red5 with Web Service can't access from outside

Hi, all. First of all, thanks for this wonderful place to ask :) http : //stackoverflow.com/questions/1017706/how-to-expose-red5s-sharedobjects-through-soap recently, I have read this page and start to follow the example exactly to produce 2 class file and using the wsgen to produce a folder with 2 file which match to my function name ...

How to specify a parameter as part of every web service call?

Currently, each web service for our application has a user parameter that is added for every method. For example: @WebService public interface FooWebService { @WebMethod public Foo getFoo(@WebParam(name="alwaysHere",header=true,partName="alwaysHere") String user, @WebParam(name="fooId") Long fooId); @WebMethod public Result d...

What do I need to do to accept an array parameter in webservice?

Hi I am use JAX-WS to make a web service. As parameters I am taking in two strings and an array of a objects whose type are a class in my project. I have the webservice interface and implementation created and it is similar to this: @WebMethod(operationName = "getStuff") @WebResult(name = "result") Mix getStuff( @WebParam(name =...

WSContext.getUserPrincipal() returns null for password digest authentication

In my WebService I need to log the caller's id, but wsContext.getUserPrincipal() returns null even though the user was authenticated using WS-Security with password authentication. According to the JavaDocs for JAX-WS 2.1 WSContext.getUserPrincipal() should only return null if the user has not been authenticated. Do I have to do someth...

Error using jaxb external bindings customization

I use the wsdlc tool (weblogic 10.3.1) to generate classes from wsdl. I have the following external jaxb bindings customization file: <jaxb:bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-...

JAX-WS and BASIC authentication, when user names and passwords are in a database.

Hi, I'm new to JAX-WS and there's a thing which I don't understand. There's a ton of tutorials available on how to set up JAX-WS security, but in pretty much all cases BindingProvider.USERNAME_PROPERTY and BindingProvider.PASSWORD_PROPERTY are stored in some .xml file(depending on the container I believe) - they are "hardcoded" that is....

Reuse JAXB generated class as JAX-WS web service parameter

I have some XML type in Java classes which are defined in XSD and generated by XJC. Then I write some java methods with JAX-WS Annotation, and let those generated Java classes of XML type as parameter types of the web services. The code is deployed on Geronimo. And Geronimo should run some WsGen tasks to generate WSDL and service runti...

Publish JAX-WS endpoint with embedded Jetty 7

Can anybody help with this? I want to use an embedded Jetty 7 as Endpoint. This is what I tried: public class MiniTestJetty { @WebService(targetNamespace = "http") public static class Calculator { @Resource WebServiceContext context; public int add(int a, int b) { return a + b; } } public static void main(S...

Microsoft SSRS consuming JAX-WS Web Service problem

I have developed a Web Service using JAX-WS (v2.1.3 - Sun JDK 1.6.0_05) that works just fine when I use a Java client or SoapUI or other Web Services testing tools. I need to consume this service using 2005 Microsoft SQL Server Reporting Services and I get the following error <?xml version='1.0' encoding='UTF-8'?> <S:Envelope xmlns:S="...

How to do Interceptors / Handlers in JAX-WS RI without using annotations?

We are using the Sun RI for JAX-WS (2.1.4) and we have a need for orthogonal web service endpoint interceptors (authentication, extracting SOAP headers for context, etc). Apparently the "normal" JAX-WS way to do this is using the HandlerChain annotation. This however forces us to modify the WSDL (even if we use the separate binding XML...

jaxb unmarshal abusable by crafted xml when using default sax parser?

So in my current project I use the JAXB RI with the default Java parser from Sun's JRE (which I believe is Xerces) to unmarshal arbitrary XML. First I use XJC to compile an XSD of the following form: <?xml version="1.0" encoding="utf-8" ?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://...

JAX-WS errors when SOAP body contains UTF-8 BOM

I have developed a Web Service using JAX-WS (v2.1.3 - Sun JDK 1.6.0_05) deployed on WebLogic 10.3 that works just fine when I use a Java client or SoapUI or other Web Services testing tools. I need to consume this service using 2005 Microsoft SQL Server Reporting Services and I get the following error Couldn't create SOAP message due...

Geting the IP Address Of A client For a webservice

I am using JAX-WS and I am having trouble retrieving the client information that is consuming a webservice. I've found out how to do it with JAX-RPC, and Apache Tomcat Axis, but not with JAX-WS. Does anyone have an idea about this? ...

JAXWS code generation and implementation along side Spring for JDK1.5

We're trying to generate source code stubs from a series of WSDLs (each with their own XSDs). We can do this fine and works perfectly under JDK1.6, however we need it to work under JDK1.5. We're using jaxws-maven-plugin to generate the source code, however it depends on the wsimport binary being available (this is not available in JDK1...

How to make generated classes contain Javadoc from XML Schema documentation

I'm currently working with an XML Schema that has <xsd:annotation>/<xsd:documentation> on most types and elements. When I generate Java Beans from this XML Schema, then the Javadoc of those Beans only contains some generic generated information about the allowed content of the type/element. I'd like to see the content of the <xsd:docume...

Can Groovy be a client to JAX-RPC-style web service?

Apparently, Groovy easily consumes web services. Can it consume a web service that needs JAX-RPC instead of JAX-WS? Should I use an older version of Groovy or its libraries to do so? ...

How to marshal a DataHandler annotated as @XmlAttachmentRef with JAXB?

I'm trying to marshal an object which has a DataHandler field with JAXB (2.1.12). For streaming support, the DataHandler is annotated with @XmlAttachmentRef. Serialization and streaming over web services (Metro on JBoss) work fine, but plain marshalling with JAXB doesn't. Here is a stripped down example: public class DataHandlerAttachm...

"Portable" JAX-WS client

I deployed a JAX-WS Service and use wsimport to generate client code. Because I run wsimport on localhost, I got the client code with binind on "localhost" address. But I want to reuse those client code on other computers which access my deployed service with a public IP y.y.y.y. How can dynamically use those (once) generated client cod...