jax-ws

JAX-WS - Adding SOAP Headers

Hello, I am trying to create a standalone client to consume some web services. I must add my username and password to the SOAP Header. I tried adding the credentials as follows: OTSWebSvcsService service = new OTSWebSvcsService(); OTSWebSvcs port = service.getOTSWebSvcs(); BindingProvider prov = (BindingProvider)port; prov.getRequest...

Interop problem calling jax-ws service with complex typed parameter from .net - fields received as null by server

I have create a web service in glassfish v3. The method I am try to call from .net using generated client in visual studio 2008 takes a single parameter which is basically a java bean - simple types (Double, String, Date) as fields with getters and setters (Actually it is an EJB entity class). I find that when I call the method from my ...

Calling a .NET web service (WSE 3.0, WS-Security) from JAXWS-RI

I'm writing a JAXWS-RI client that must call a .NET Web Service that is using WS-Security. The service's WSDL does not contain any WS-Security info, but I have an example soap message from the service's authors and know that I must include wsse:Security headers, including X:509 tokens. I've been researching, and I've seen example of fo...

jax-ws change Content-type to Content-Type because server is hyper sensitive

I have to connect to a poorly implemented server that only understands Content-Type(capital-T) and not Content-type. How can I ask my JAX-WS client to send Content-Type? I've tried: Map<String, List<String>> headers = (Map<String, List<String>>) ((BindingProvider)port).getRequestContext().get(MessageContext.HTTP_REQUEST_HEADERS); Bu...

Configuration of the Endpoint address for the access to the Wsdl in jax-ws

Hi all, I'm a newbie in web services with jax-ws and I'm a little mixed up with the different files. I'm doing a simple hello test and I'm trying to explain something. I successfully installed my web service on Glassfish. I also tested it with a standalone javaoutside the server) My example comes from the helloservice in the javaee5 tu...

NoClassDefFoundError for com/sun/istack/logging/Logger in Glassfish v3

I have an application client which calls a SOAP service. I've used wsimport from the glassfish distribution to generate the ws classes, and everything works fine in Glassfish v2. When I run it (webstart) from v3, the app runs fine, but when I initiate a SOAP call, I get Exception in thread "Thread-146" java.lang.NoClassDefFoundError: c...

What does the xendorsed attribute do for wsgen and wsimport?

I'm working simultaneously on projects using Metro 1.5 and Metro 2.0. I have not upgraded my JDK to Metro 2.0. When I run the Metro 2.0 version of wsgen or wsimport (from Ant) I get an Exception saying that I either need to upgrade my SDK or add xendorsed="true" to the Ant wsgen / wsimport targets. I can't upgrade the SDK to use Metro ...

how to read image from project folder in java ?

I am developing web method for webservice in java. In this web method I have to read image from my images folder which resides in my webservice project folder. I am using the code as follows. @WebMethod(operationName = "getAddvertisementImage") public Vector getAddvertisementImage() { Image image = null; Vector imageList = new V...

accessing wsdl on Tomcat

Hi, I have a web service and I was deploying it on GlassFish. I accessed its wsdl through http://localhost:10697/APIService/APIServiceService?wsdl. Now I ported the WAR file to a Tomcat 6.0.24 and it is deployed. However I am trying to access its wsdl using http://localhost:8080/APIService/APIServiceService?wsdl but I'm getting a 404 ...

Ignoring container elements through JAXB customization.

Hi all I am struggling with a simple JAXB customization issue. I have an schema like this. (its actually a snippet of Bing Maps Web Services schema) <xs:complexType name="GeocodeOptions"> <xs:sequence> <xs:element minOccurs="0" name="Count" nillable="true" type="xs:int" /> <xs:element minOccurs="0" name="Filters" nillable="tr...

Multiple @WebService annotations in JAX-WS / CXF

I am trying to implement minor versions in JAX-WS as follows: @WebService(targetNamespace="http://mycompany.com/api/Service/v1_0") public interface ServiceRev0 { public void initialMethod(); } @WebService(targetNamespace="http://mycompany.com/api/Service/v1_1") public interface ServiceRev1 { public void newMethod(); } public c...

Can't get JAX-WS binding customization to work

Hi! I'm trying to resolve a name clash in a wsdl2java mapping with CXF 2.2.6 The relevant wsdl snippets are: <types>... <xs:schema... <xs:element name="GetBPK"> <xs:complexType> <xs:sequence> <xs:element name="PersonInfo" type="szr:PersonInfoType" /> <xs:element na...

Is it safe to reuse javax.xml.ws.Service objects?

I have JAX-WS style web service client that was auto-generated with the NetBeans IDE. The generated proxy factory (extends javax.xml.ws.Service) delegates proxy creation to the various Service.getPort methods. The application that I am maintaining instantiates the factory and obtains a proxy each time it calls the targetted service. Cr...

How to change webservice url endpoint ?

I generated a web-service client using JBoss utils (JAX-WS compatible) using Eclipse 'web service client from a wsdl'. So, the only thing I provided was a url to a web-service WSDL. Now, the web service provider tells me to change the "url of client endpoint application access" of the web-service. What is it and how to change it? ...

Is there any JAX-WS implementation that support dynamic namespace in generated client ?

I generated a JAX-WS client (proxy API) using JAXWS-RI wsimport.bat from a WSDL having as namespace "http://a.mydomain". I'd like to reuse the same generated proxy against a service having as namespace "http://b.mydomain" but targetnamespace "http://a.mydomain" is harcoded all over the generated classes. Does anybody know any good solu...

xsd:datetime and XmlGregorianCalendar causes NullPointerException

The following works: public Date getDate() { return date; } and produces something like: <date>2010-03-23T17:43:50.879Z</date> And I can use an XmlGregorianCalendar to return xsd:date or xsd:time types fine: @XmlSchemaType(name="date") public XmlGregorianCalendar getDate() { return date; } which produces something like: ...

WSIT, Maven, and wsimport -- Can They Work Together?

Hi all, I'm working on a small-ish multi-module project in Maven. We've separated the UI from the database layer using Web Services, and thanks to the jaxws-maven-plugin, the creation of the WSDL and WS client are more or less handled for us. (The plugin is essentially a wrapper around wsgen and wsimport.) So far so good. The problem ...

Dynamic WebService implementation

I have a set of different interfaces and I need to give them access via web services. I have implemented this task in .NET as follows: dynamically generated interface implementation on the IL, marked methods with WebMethod annotation, and in *.asmx handler called generated stub. More needs to be able to change the method signatures (...

How to (simply) create new service objects in java jax-ws webservices?

Is it possible in jax-ws to have a webmethod that creates a new object (of a service class) and returns a reference to it to the client caller (for the client, it's a remote reference) so that the client and this new service object maintain a session? (Therefore each client is served by a different instance). Schematically: client ...

How to generate proxy for a child class when my web service return a parent class?

Hi * I have a JAX-WS WebService like this: public class ParentClass{ public String str1; } public class ChildClass : ParentClass{ public String str2; } public class WebService{ public ParentClass WebMethod(){ return GetFirstChildClass(); //Return a child class } } When I generate proxy for this web service...