Transport level information does not match with SOAP Message namespace URI
Asked Answered
S

2

12

I'm getting the error "Transport level information does not match with SOAP Message namespace URI". Request you provide the details to fix the issue.

I have set the below in the client side.

HttpTransportProperties.ProxyProperties proxyProperties = new HttpTransportProperties.ProxyProperties();
proxyProperties.setProxyName(proxyAddress);
proxyProperties.setProxyPort(proxyPort);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED,Boolean.FALSE);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.PROXY, proxyProperties);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.HEADER_CONTENT_TYPE,"application/soap+xml");
stub._getServiceClient().getOptions().setProperty("type","application/soap+xml");
stub._getServiceClient().getOptions().setProperty(HTTPConstants.HEADER_SOAP_ACTION, Action_URL);
stub._getServiceClient().getOptions().setProperty ( HTTPConstants.HTTP_PROTOCOL_VERSION, HTTPConstants.HEADER_PROTOCOL_11 ) ;
stub._getServiceClient().getOptions().setProperty ( "Transfer-Encoding", "chunked" ) ;
stub._getServiceClient().getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, "true");

Can you please help to solve the issue?

Swedish answered 31/5, 2013 at 15:46 Comment(0)
D
21

That error occurs if there is a mismatch between the content type and the SOAP version (as determined by the namespace URI of the SOAP envelope) of the received message. E.g. if Axis2 receives a SOAP 1.2 message with content type text/xml, it will trigger that error.

Disforest answered 2/6, 2013 at 14:0 Comment(1)
What should the Content-Type contain? Should that header be removed from the request entirely? Ah, here's the answer: #26465849Rosenstein
S
0

Joe - If you are getting this error, then I am assuming that you are trying to access a service that is really old and you might be using Axis that is version 2.0 . You will not be able to call the service by creating client using Axis or CXF. I have spent days trying to figure this out. Eventually I ended up using SAAJ API to create the request WSDL and post it to the service.

It is very easy and keeps you away from trying to figure out RPC/Literal/Document style etc.

See this post - Post

Selfimportant answered 11/12, 2014 at 3:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.