jax-ws

EntityManager.flush() commits the transaction in a Java web service

只愿长相守 提交于 2020-01-02 02:48:11
问题 EDIT : Thanks everybody for your answers, but the problem was with my data source configuration, which was actually in auto-commit mode. See my answer below for details. Both the Javadoc of the EntityManager.flush() method and searching for it in Google seem to suggest that the flush method only sends the pending statements to the database and does not commit the transaction. But a simple test web service I created (in Java 7, Oracle 11gR2, JBoss 7.1 and the Web service is packaged as a jar

Using JAX-WS 2.2.5 client with JDK/JRE 1.5

允我心安 提交于 2020-01-02 02:01:07
问题 Java 6 shipped with JAX-WS 2.0. Java 5 didn't ship with JAX-WS as far as I know. I was able to use JAX-WS 2.2.5 with Java 1.6 for creating Webservice client stubs by using the Java Endorsed Override Mechansim which lists JAX-WS as one of the components which can be replaced in Java 6. All I had to do was create a lib\endorsed directory in my JDK & JRE 6 paths & then copy jaxb-api.jar & jaxws-api.jar from JAX-WS 2.2.5 into the directory named endorsed. And both JDK & JRE 6 picked up the 2.2.5

JAX-WS Soap Faults not appearing in WSDL

我们两清 提交于 2020-01-02 01:25:14
问题 I am creating a web service using JAX-WS (I am creating this using the Java to WSDL approach). Im having trouble getting my exception to work as I require. I have created the following exception class: @WebFault public class MyWebServiceException extends SOAPFaultException { private static final long serialVersionUID = 8234753208722614057L; protected MyWebServiceException(SOAPFault fault) { super(fault); } protected MyWebServiceException(SOAPFault fault, Throwable throwable) { this(fault);

Spring: How to inject wsdlLocation in @WebServiceRef

青春壹個敷衍的年華 提交于 2020-01-01 19:38:10
问题 I'm using spring and in my client, a web app, I need to interact with a Jax-WS webservice. I currently have it working via annotating the service interface with the @WebServiceRef annotation. However, I need the wsdlLocation property to be injected because, obviously Sun Microsystems or Oracle, the web service wsdl location in production will be different to what's being used during development. How can I inject the wsdlLocation? Here's an extremely simplified version of the code: //This

jax-ws webservice's endpoint is always localhost

假装没事ソ 提交于 2020-01-01 17:11:25
问题 I really need your help. I read that the wsdl for a jax-ws webservice will be generated on the fly for every request. By this, the addresses like the soap endpoint will be adjusted to the request url. In my case it, no matter wheather internal or external request, the addresses are always refered to localhost:8080. Does sb have a clue how can I handle this issue? Thanks in advance Maybe I haven't described my problem very well. I have a ws created with jax-ws Its deployed on a tomcat server 5

Glassfish web.xml servlet mapping to @WebService gets ClassCastException

柔情痞子 提交于 2020-01-01 15:56:49
问题 Am trying to gain control over the URL endpoints of my web services when deployed to Glassfish (and preferably to TomEE too). I have a class: @Stateless @WebService( targetNamespace = "http://foo.net/doc/2012-08-01", name = "FooService", portName = "FooPort", serviceName = "FooService") public class FooSoapService extends SoapBase { ... } And a web.xml: <servlet> <description>SOAP Endpoint for Foo operations.</description> <servlet-name>Foo</servlet-name> <servlet-class>com.foo.FooSoapService

change the soap:address location in generated wsdl

主宰稳场 提交于 2020-01-01 10:58:27
问题 I am using JAX-WS annotation to create soap services running on JBOss 5.1.0 G.A, the generates WSDL has got the following bit at the end - <service name="DataServiceService"> <port binding="tns:DataServiceBinding" name="DataServicePort"> <soap:address location="http://mymachine:8080/myapp/webservice" /> </port> </service> I have made the service https enabled on port 8443, I am able to connect to the service using the right protocol and port number but is there is a way to change the soap

change the soap:address location in generated wsdl

浪子不回头ぞ 提交于 2020-01-01 10:57:07
问题 I am using JAX-WS annotation to create soap services running on JBOss 5.1.0 G.A, the generates WSDL has got the following bit at the end - <service name="DataServiceService"> <port binding="tns:DataServiceBinding" name="DataServicePort"> <soap:address location="http://mymachine:8080/myapp/webservice" /> </port> </service> I have made the service https enabled on port 8443, I am able to connect to the service using the right protocol and port number but is there is a way to change the soap

IllegalArgumentException: com.sun.xml.internal.messaging.saaj.soap.LocalStrings != com.sun.xml.messaging.saaj.soap.LocalStrings

夙愿已清 提交于 2020-01-01 09:58:10
问题 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:500) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:242) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210) at com

How to get control over JAXBContext in JAX-WS?

微笑、不失礼 提交于 2020-01-01 09:42:16
问题 I need to deploy the same web service for each customer. This @javax.jws.WebService uses Object as method arguments and return types (resulting in <xs:anyType/> in wsdl). Each instance of web service is deployed along with customer's jar on the classpath. This jar has known structure and contains JAXB-annotated classes which client wants to handle via my service. The problem is that when customer passes an instance of his class as method agrument, server-side JAXB context unmarshals it into