Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoapRawClient fails with MTOM #43

Open
jgoldhammer opened this issue May 22, 2019 · 1 comment
Open

SoapRawClient fails with MTOM #43

jgoldhammer opened this issue May 22, 2019 · 1 comment

Comments

@jgoldhammer
Copy link

When the CXF server enables MTOM, the SoapRawClient will fail to parse the xml.

@WebService
@MTOM(threshold = 2 * 1024 * 1024)
public class XXXEndpoint implements XXXServicePortType {

Reason:
CXF always sends multipart http request. That means that the xml parser will fail.

Outbound Message:

--uuid:052ebfc6-8d20-4545-8d26-93fa4573631c
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <[email protected]>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Message part {http://www.codecentric.de/namespace/weatherservice/general}GetCityForecastByZIP was not recognized.  (Does it exist in service WSDL?)</faultstring></soap:Fault></soap:Body></soap:Envelope>
--uuid:052ebfc6-8d20-4545-8d26-93fa4573631c--

Any idea what to do here? We could parse the message, but maybe you have experience how to it?

@jonashackt
Copy link
Member

The SoapRawClient is based on Apache's httpclient from the httpcomponents project: https://hc.apache.org/ It should be able to handle MTOM also, but I don't really have a example scenario for testing - could you provide an example WSDL/Request/Response so we could build a test case for that?

There's already a example WSDL used inside this starter for testing (https://github.com/codecentric/cxf-spring-boot-starter/tree/master/src/test/resources/wsdl) - including multiple XSD-imports like https://www.bipro.net/ is using it too. It would be really great to enhance the test suite - then we could implement a solution for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants