jax-ws

org.apache.cxf.interceptor.Fault: Unmarshalling Error: Illegal character (NULL, unicode 0) encountered: not valid in any content

强颜欢笑 提交于 2021-02-19 06:37:05
问题 I am using a cxf webservice which uses local transport and accessing the webservice from java application. Webservice is reading a file and sending through webservice call. I am using the byte size as 512. Suppose the file size is 1200. First two attempt of retrieving the file is success and for the last chunk i am getting org.apache.cxf.interceptor.Fault: Unmarshalling Error: Illegal character (NULL, unicode 0) encountered: not valid in any content. Here chunk represents 512 bytes. I am

manipulate marshaller in jax-ws

送分小仙女□ 提交于 2021-02-18 15:31:53
问题 is there a way to manipulate the marshaller used in jaxws. I like to send a cdata filed in a webservice request and for this i want to try something like describet here: http://odedpeer.blogspot.de/2010/07/jaxb-sun-and-how-to-marshal-cdata.html in short they does this: Marshaller m = JAXBContext.newInstance( Item.class ).createMarshaller(); m.setProperty( "com.sun.xml.internal.bind.characterEscapeHandler", new CharacterEscapeHandler() { @Override public void escape( char[] ac, int i, int j,

WebServiceContext injecting issue via @Resource annotation

送分小仙女□ 提交于 2021-02-18 11:45:09
问题 I am having issues with injecting WebServiceContext via @Resource annotation. I am using JAXWS + Spring combination. This is a piece of code I use. @WebService public class AdminWSImpl { @Resource private WebServiceContext context; ... } Part of my web.xml: ... <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <listener> <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class> </listener>

Does using MTOM on client load entire binary data in client memory before sending the soap message to server?

主宰稳场 提交于 2021-02-11 16:42:44
问题 I am struggling to understand if streaming and mtom are related or separated. Does enabling mtom on the client mean the binary data (assuming referenced via DataHandler) will be entirely loaded into memory alongwith the soap message and then the message will be sent or would the soap message be sent first to the server and the server would then pull the binary data (if server does pull the data how does it know where to pull from since content id would be local to the soap message)? 来源: https

Disable chunked transfer-encoding for JAX-WS Client in Wildfly 8

纵饮孤独 提交于 2021-01-29 05:58:24
问题 I'm writing a SOAP client using JAX-WS on Wildfly 8 . When sending small messages to my server, the client works properly. When the message gets too large, a header "Transfer-Encoding: chunked" gets added and the server stops accepting the messages. Since I have no control over the server-part, I'm looking for a way to tell Wildfly to stop chunking large messages. I've found a solution for WebSphere here: Disable chunked transfer-encoding for JAX-WS Client in WebSphere Application Server 8.5

Jax-ws java.net.ConnectException: Connection refused

大憨熊 提交于 2021-01-28 22:27:03
问题 I'm experiencing an odd networking problem connecting to a web service running on glassfish from a java client running on tomcat using JAX-WS (Metro). Here's the scenario... Both servers are running on my local machine. If I configure the client to connect to the WS endpoint using 127.0.0.1, the request works fine. If I configure the client to connect to the WS endpoint using my IP address, I immediately get java.net.ConnectException: Connection refused. The same thing happens if I use my

How to add response header in JAX-WS?

╄→尐↘猪︶ㄣ 提交于 2021-01-28 19:20:10
问题 I have a similar method to this: @WebMethod public BeanResponse generar(@WebParam(header=true, mode=Mode.INOUT, name="auditoria", partName="auditoria") Holder<Param> auditoria, @WebParam(name="request") BeanRequest request) throws Exception { //code } This web-service show this result: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:generarResponse xmlns:ns2="http://url/"> <return> <codRpta>0</codRpta> <msgRpta>RESULT</msgRpta> <version>v01</version> <!

Weblogic Jaxws deployment - class does not support JDK1.5

耗尽温柔 提交于 2021-01-28 11:06:56
问题 WebLogic Server Version: 10.3.6.0 Spring version: 3.2.1.RELEASE Java JDK 1.6 I am trying to deploy a Spring application as WAR that uses jaxws into a Weblogic server. The application works well with Jetty. However when deploying(I mean starting deployed app) Weblogic following exception occurs: Caused By: java.lang.UnsupportedOperationException: This class does not support JDK1.5 at weblogic.xml.jaxp.RegistryTransformerFactory.setFeature(RegistryTransformerFactory.java:317) at com.sun.xml.ws

JAXB marshal namespace prefix

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-28 06:01:52
问题 I'm developing a client to consume a web service, but for some reason my requests are not properly processed unless all namespaces are correct and without any prefix. All my classes were created using the provide XSD's and WSDL's by the service provider. NfeDadosMsg.class package br.inf.portalfiscal.nfe.wsdl.nfestatusservico4; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml

Where is WSIMPORT after JDK11

寵の児 提交于 2020-12-09 09:58:47
问题 I've used wsimport and other Metro tools for many years but since the removal of Java EE modules from the JDK 11 I cant find the tools. Where can I find the wsimport executable? 回答1: The executables for WSIMPORT can be found at the main site https://javaee.github.io/metro-jax-ws/. They're no longer part of JDK. 来源: https://stackoverflow.com/questions/53192401/where-is-wsimport-after-jdk11