Does WSO2 ESB works on soap 1.1 by default? - wso2

I just want to know that does WSO2 ESB by default support on soap 1.1? How to make it work on soap 1.2? Is there any global property by which I can change all the deployed services to make it work on soap 1.2?
Thanks in Advance
Regards,
Shri
Hi Thanks for your response. but I get below error when try 1.2 Soap request from the SOAP UI.
[2016-08-10 10:53:41,744] ERROR - NativeWorkerPool [msg_id=urn:uuid:4abc1b45-c6a8-4f92-9559-169d3dab403f] Uncaught exception
org.apache.axiom.om.impl.exception.OMBuilderException: detail unsupported element in SOAPFault element
at org.apache.axiom.soap.impl.builder.SOAP12BuilderHelper.handleEvent(SOAP12BuilderHelper.java:175)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:428)

WSO2 ESB supports both by default. For example, when you create a proxy service in ESB, it exposes both SOAP 1.1 and SOAP 1.2 endpoints.

It seems that this error happens when using SOAP 1.2 while communicating between .Net applications and Axis2. So far the only solution I have seen is to force the use of SOAP 1.1.
See also:
Mention of error
Apparently the definition of the SOAPfault changed slightly between versions, most importantly the capitalisation of certain elements, including the detail element. The error suggests that the received message includes the element, which is in accordance with SOAP 1.1, while in SOAP 1.2 it should be a element. For more detail, check this site

Related

Adding soap headers in apache camel

I am calling a soap web service from Apache Camel, which is having header (for authentication) and the body. My Dataformat is POJO (tried with PAYLOAD too) Nothing got succeeded.
echange.getIn().setHeader() is not working (Checking the request using tcpmon)
Any suggestion or coding will be helpful.
Please refer http://camel.apache.org/cxf.html
Hope this is helpful.

How to turn off Envelope and Body in SOAP request

This is critical to my current project. I have written a client in C++ using Windows web services. This client talks to the Clickatell SMS SOAP web service. I have tested the request using the SOAPUI tool and get correct response. I also receive the SMS message. Now, when I do this programmatically it fails because the WsCall() [in the code generated from WSDL via wsutil.exe) inserts even though the SOAP request I have already includes Envelope and Body. I cannot take out my Envelope since I have namespace specified in it like this:
http://schemas.xmlsoap.org/soap/encoding/\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:tns=\"soap.clickatell.com\">
I know that the additional Envelope and Body are inserted since I see it in the Fiddler tool.
Any help I can get is highly appreciated!
Looks like you are using the older type rpc/encoded soap api.
Have you tried using the document/literal service?
(http://api.clickatell.com/soap/document_literal/webservice.php?wsdl)

WSO2 - ESB server 4.7 Hangs- when an invalid json format is given as input for rest API

A REST API has been defined ESB. What we have observed is if the json format (invalid json),
the request is hanging and the server doesn't give any response. Ideally it should throw some
error at least and it should not hang.
I had the same situation in WSO2 4.8.1. Try to change JsonStreamBuilder in your axis2.xml to JsonBuilder from (org.apache.synapse.commons.json) or use your own implementation.

WSO2 ESB how to identify the request soap version

I need to return the soapfault accoding to the request soap version (1.1 or 1.2). I use ESB 4.8. Is there a simple way to identify the soap version? Can be automated the proper custom response fault according to the request?
Regards
you can filter the messages based on the namespace used for the versions.
SOAP 1.1 : http://schemas.xmlsoap.org/soap/envelope/
SOAP 1.2 : http://www.w3.org/2003/05/soap-envelope
i.e:
<filter xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xpath="/soapenv:Envelope ">
With that configuration, you can filter and get SOAP 1.1 requests. More information can be find here

Support both SOAP 1.1 and 1.2 by same JAX-WS service

I have a JAX-WS #WebServiceProvider and would like to support both SOAP 1.1 and 1.2 protocols. I handle creation of response SOAPMessage of proper version manually. I have WSDL describing bindings for both, 1.1 and 1.2 protocol.
But the service endpoint is only able to support either version at a time.
I would appreciate either a solution or a pointer to a piece of doc where it's stated that it's impossible.
P.S. i'm using WebSphere 7 app server, which is bundled with JAX-WS 2.0 (which is Axis2 based)
I experienced the same problem. The main issue for me is that it is not possible to compile the class with both #BindingType(value = SOAPBinding.SOAP12HTTP_BINDING) and #BindingType(value = SOAPBinding.SOAP11HTTP_BINDING). Have a look to this http://www-01.ibm.com/support/docview.wss?uid=swg1PK96819, and this http://www-01.ibm.com/support/docview.wss?uid=swg1PK83482, it should be possible to set #BindingType(SOAPBinding.SOAP_HTTP_BINDING) to have the both SOAP version to be delivered. Unfortunaltely, i did not compile also with the Websphere runtime environment, what i don't understand.
I recently dealt with a service deployment issue related to trying to simultaneously enable both SOAP 1.1 and 1.2 for a service (on WebSphere v7.0). Unfortunately, I don't think that your question gives enough information to provide a specific solution.
It IS possible to support both bindings at the same time, but there are some considerations. I think the main thing is that the server has to be able to listen on separate endpoints (URLs) for each binding. As near as I can tell, this requires appropriate entries in your web.xml and/or your webservices.xml configuraiton files.
For an annotation based service, these configuration entries are theoretically optional; but when you try to enable multiple bindings for a given service without the "optional" configuration entries, the WAS Axis2 extension fails with various possible exceptions.
If you could provide more detail about your wsdl, and the relevant portions of web.xml and webservices.xml (if any), as well as any error messages reported in the WAS log(s) during deployment and application startup, then I could probably give a better answer.