In some tutorials (e.g. here, here and here) it is suggested to close the JAX-WS port by casting it to com.sun.xml.ws.Closeable e.g.
MyPortType port = MyService.getMyPort();
... do some operations on WS proxy ...
((com.sun.xml.ws.Closeable) port).close();
This approach will not work for proxies, returned by JaxWsPortProxyFactoryBean, ...
Hello,
I'm trying to develop webservice authentication by checking hash_ID given in wsdl URL.
I use servlet webservice (JAXWS, without ejb). I've extended WSServlet class. In doGet method I check if the given hashId is valid and if so, I do the programmatic login. The problem is that after login, principal is not propagated from servlet...
Hi,
I need to implemented something like a filter or listener, that intercepts HTTP requests and retrieves the HTTP headers for various purposes.
I use Java, Jboss application server and web services. I want this filtering system to be performed prior to the Web Services call - was thinking about aspects but they do not hold the HTTP r...
Hello,
I created WebService using JAXWS. Glassfish generated wsdl, and whole webservice is published under http://localhost:8081/mycompanyApi/api?wsdl
How can I add some additional parameter to this url like http://localhost:8081/mycompanyApi/api?wsdl&hash=asdfa.
I'd like to do the authorization by 'hash' parameter.
...
I have a Web Service developed with JAX-WS. I have secured the web service with BASIC authentication configured in Tomcat.
When I try to access the web service using a Java client, I first need to create the port, and then specify the credentials, as follows:
CustomerServiceClient customerServiceClient = new CustomerServiceBottomUpSer...
I've been working on creating a SAAJ based client. Everything seemed to be working fine, until I implemented the logic to send attachments as part of a web-service request.
The web-service operation is simple - it expects a string element for file-location, and a base64binary element for the file content.
I've tested the ws operation u...
Hi, I am using JAXWS to generate a WebService client for a Java Application we're building.
When JAXWS build its XMLs to use in SOAP protocol, it generates the following namespace prefix:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body ...>
<!-- body goes here -->
</env:Body>
</env:Envelop...
We have created a web service using JAX-WS and ProSyst OSGi.
Accessing the service with the following code works fine in a standalone Java application
as well as in the ProSyst framework.
this.service = new MyServicePortService(
new URL("http://" + host + ":" + port + "/MyService?wsdl"),
new QName("http://myser...
Hi,
I have got a function with prototype Bean1 fn(Bean2 ) in java. I am trying to expose it as a web service so that same can be called by a .net client or any other. I am using JAX-WS. Both Bean1 and Bean2 have got Hashmap, String and Int type of class variables. Please suggest me as on how to deal with the Bean classes. Isn't hashmap ...
I am trying to get schema validation working for a JAX-WS Web Service deployed on Weblogic 10.3.3.
According to the documentation, this should be as simple as adding the annotation
"@SchemaValidation" to the endpoint class. However when I try this the following exception is thrown when the application is deployed:
Caused by: javax.xm...
What is difference, philosophical or otherwise, between calling a web service from Java code using Service and Dispatch classes, vs a SOAPConnection class?
For example, something like this:
SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();
SOAPConnection soapConnection = scf.createConnection();
SOAPMessage reply = soapCo...
Hello,
In my web-application, I am contacting a Web-Service (using JAX-WS) but I get the following error:
java.lang.ExceptionInInitializerError
at com.sun.xml.ws.message.AttachmentUnmarshallerImpl.<clinit>(AttachmentUnmarshallerImpl.java:55)
at com.sun.xml.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBuilder.java:5...
Hello there.
I'm using Enunciate to generate a SOAP endpoint for a Wicket web application I am working on and I have a couple of questions that I haven't figured out the solution to yet.
1 How do I change the name of the xsd files? I've looked through the FAQ and it tells me to do something similar to this:
<xml>
<schema namespac...
I am Using CXF to host web services in a Spring context, which makes JAX-WS the default binding. And I'm using Java-First, which means annotated endpoint interfaces and classes.
Since default binding for JAX-WS uses XMLGregorianCalendar class for dates, when I call my web service passing a java.util.Date it is converted to XMLGregorianC...
Asking and answering my own question here, because I had a dickens of a time finding this online:
Caused by: java.lang.NullPointerException
at com.sun.xml.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:367)
Trying to call a web service from inside Glassfish v3. Works fine from JDK1.6.0_21
...
Is it possible to make two jax-ws web services that are deployed within the same container exchange large objects in more efficient manner than serializing them into soap?
...
I have two applications: a Java server and a .net client. The Java server hosts a web service (JAX-WS / Metro) and the client application calls the web service (WCF). The first web service call that returns a value is always slow. It takes about 30 seconds. Calls that don't return a value or subsequent calls on the same operation are lig...
I am using JAX-WS 2.1 and I have built a web service using JAX-WS via the development tools in Netbeans 6.0. It seems that everything builds correctly and starts correctly, however on the first web service request after restarting Tomcat, I get the following exception:
SEVERE: Couldn't create SOAP message due to exception: Unable to cr...
Hi,
I am using Glassfish 3.0 with Spring Security 3.0 and exposed one of my EJBs as webservice using JAX-WS 2.0 annotation. I have generated WSDL and other portable artifacts and can access the webservice using a WS-client.
Using JAAS I can make the webservice secured with "HTTP Basic Authentication" (using jdbc realm).
But using Spring...
I am trying to deploy a Web Service in JBoss 5 AS, without using the JBossWS which is the Red Hat's implementation of jsr-224. Thus, I am deploying my services in a .war file that already contains the JAX-WS Reference Implementation.
When I try to deploy the service without shipping the JAX-WS RI in my .war, it just deploys without issu...