What does this gSoap fault message mean? - gsoap

I am using gSoap to communicate with the web service. I am using Qt to create application that uses gSoap. I am getting following fault message for some of the calls
SOAP 1.1 fault: "http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher":DeserializationFailed[no subcode]
"The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'GetPendingCommands'. Unexpected end of file. Following elements are not closed: Body, Envelope. Line 2, position 459."
Can someone please explain me what could be wrong with the service?
Thanks
DPatel

If chunking is turned on in your client side code, try turning it off. I seem to recall that you have to do something special with gSoap to get it to support chunking on the server side.

The error message means the client has received a truncated SOAP envelope. This often happens if the web service neglects to flush its output buffer before returning.

Related

Quarkus is hiding resteasy exceptions

I have run into a fairly annoying problem with Quarkus, that I cannot figure out how to solve.
I am using quarkus 2.4.1.Final. I am using the quarkus-resteasy-reactive-jackson module to create a REST service.
But when I send the service a post body with a bad format the client simply gets an empty HTTP 400 response back, and nothing is printed in the log on the server side. In this particular case I forgot to add the offset to an OffsetDateTime, so adding "+01:00" makes the service return correctly. Using micrometer metrics, I can see that the endpoint is being hit correctly both when the request is correct and when it isn't.
Hiding an exception from the developer is very close to heresy for me, as I would like to be able to see what the server fails with. I understand that we don't want the stack trace on the client side, but in this case the exception is missing from the server log.
Can anyone help me to convince Quarkus to not swallow my exceptions?

org.apache.axis2.AxisFault: Translation error

I get the followwing exception when trying to read a SOAP response from a reply queue on IBM WAS 8.5:
Caught an AxisFault while executing the web service call [org.apache.axis2.AxisFault: Translation error]
org.apache.axis2.AxisFault: Translation error
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
I could not find anything related to this error by googling or on IBM's websites.
Looking at that Utils code in open source, "Translation error" is probably the message being sent back in a SOAPFault from the remote web service. Why the remote service is sending back a SOAPFault isn't apparent. If you turn on trace of org.apache.*=all:com.ibm.ws.websvcs.*=all you'll be able to see the incoming message in the trace and that might give you more information.
We were able to resolve this by un-cheking the option at
Queues > "Your Queue" > Advanced properties
[]Append RFH version 2 headers to messages sent to this destination

no SOAPAction header! in Oracle service bus

I am facing below error in respose,
<faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>
<faultstring>no SOAPAction header!</faultstring>
i am trying to fixing in pipeline ,
selected pass all headers through pipeline but didn’t helpedenter image description here
Do you really need a SoapAction?
One of the options available in a proxy is to decide which operation a SOAP message is, by inspecting the message body.
If someone sends a message (perhaps through a biz ref) and doesn't include a SOAP action header, a proxy will still recover if it uses this method.

Exception handling in gRPC

I have a server written in Java and client written in PHP. How can client catch exception from server if anything goes wrong? I can't find anything about exception handling in gRPC documentation.
Thank you!
For handled exceptions, call responseObserver.onError(). If you pass in a StatusRuntimeException or StatusException (generally created via status.asRuntimeException()) the status code and description will be communicated to the client. Unhandled exceptions within a callback will cancel the RPC and will continue propagating the exception (generally leading in an UncaughtExceptionHandler being called for the executor).
In the response at the client side (php)
http://www.grpc.io/grpc/php/source-class-Grpc.UnaryCall.html#82
the status here will have the code and details fields which will determine the response code and the appropriate message if set as mentioned in Eric's response. Based on that appropriate error handling can be done at the client.

Successfully calling a WCF Service from Ruby? Anyone?

I'm trying to integrate a rails application with a WCF service. I've tried soap4r and Savon with no love at all. As far as I can tell, none of the Ruby libraries support the newest version of SOAP.
The error that I was getting was:
Cannot process the message because the
content type 'text/xml;charset=UTF-8'
was not the expected type
'application/soap+xml; charset=utf-8'.'application/soap+xml; charset=utf-8'.
I managed to beat this error by changing the WCF service binding from wsHttpBinding to basicHttpBinding, but then received the new error:
The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). (SOAP::FaultError)
Now, this error leaves me baffled because I don't see any way to configure endpoints in any of the Ruby libraries. Does anyone know?
Has anyone successfully called WCF services from Ruby?'application/soap+xml; charset=utf-8'.
Please note that I got this working...after I changed the web.config for the service to basicHttpBinding, Savon is able to send and receive messages. It is only soap4r that is unable to still and throws the Action '' error.
this may not be what you want t hear but I've recently been interacting with SOAP in Ruby.... It's not fun at all, none of the gems available are complete, stable or well documented and all seem to fall down when you add a tiny bit of complexity (passing an object containing some values instead of just passing a integer or string).
I ended up sniffing the request made by a .net client, then building objects that have a .to_xml method, taking a XML Builder object and adding it's own stuff..
That takes care of the request and then each service request method is custom made to extract the information needed for the result.
Very manual way to do it, and have to add more for every method i need to use but at least it works!
Some other guys I work with had success using JRuby and Axis. I stayed away from this as I wanted a pure Ruby solution.
Sorry I couldn't be of more help.. if you'd like I'll post my code to build the soap request...
I was running into the same issue with Savon with my WCF web service. The content error is because your service is expecting SOAP 1.2, but by default Savon sends the request as SOAP 1.1.
The Content-Type value for 1.1 is 'text/xml;charset=UTF-8', but if the server is configured for 1.2 (which is what wsHttpBinding is), the Content-Type must be 'application/soap+xml; charset=utf-8'.
I found this method on the Savon website:
response = client.request :get_user do
soap.version = 2
end

Resources