You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Thanador Lx <se...@gmail.com> on 2020/10/04 20:21:32 UTC
Unexpected wrapper element DATA found. Expected {http://example.org}DATA
Hi Huys,
I try to implement a JBOSS WS to consume a defined SOAP Request.
The SOAP request looks like:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Header/>
<SOAP:Body>
<DATA>
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
...
Server generates a wsdl which seems to expect the request to look like:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:i89="http://example.org">
<soapenv:Header/>
<soapenv:Body>
<i89:DATA>
<IDOC BEGIN="1">
...
As I am not able to change the client side... I need to make the endpoint
"understand" the request. I'm running on JBoss 7 with CXF 3.4.
Here is my Interface:
@WebService(targetNamespace = "http://example.org", name =
"SAP_IA_DEF")@XmlSeeAlso({ObjectFactory.class})@SOAPBinding(parameterStyle
= SOAPBinding.ParameterStyle.BARE)@EndpointProperties({@EndpointProperty(key
= "set-jaxb-validation-event-handler", value =
"false"),@EndpointProperty(key = "soap.no.validate.parts", value =
"true")})
public interface DataSAPIA {
@WebMethod(operationName = "SAP_IA_DEF", action =
"http://sap.com/xi/WebService/soap1.1")
@Oneway
public void DataPostSAPIA (
@WebParam(partName = "idoc", name = "DATA", targetNamespace = "")
SAPIADATAIDOC idoc
);
}
The Interface should ignore validation but it seems it not to...
WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (default task-1)
Interceptor for
{http://example.org/}DataSAPIAImplService#{http://example.org/}SAP_IA_DEF
has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault:
Unexpected element DATA found. Expected {http://example.org/}DATA.
at org.apache.cxf.wsdl.interceptors.DocLiteralInInterceptor.validatePart(DocLiteralInInterceptor.java:281)
at org.apache.cxf.wsdl.interceptors.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:191)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:110)
at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:134)
at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:88)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:220)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:523)
at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:136)
at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140)
Any guess whats needs to be changed to make the endpoint understand the
request?
Setting the targetNamespace = " " resulted in:
Unexpected element DATA found. Expected { }DATA.