Mobile First 7.1 SOAP Adapter failed to read response - soap

I have used IBM MobileFirst Studio V7.1 - Service Discovery wizard option and created a SOAP adapter from a application WSDL file. The Service Discovery procedure correctly creates the MobileFirst adapter in the MFP Studio.
The sample message payload is as follows.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fet="http://siebel.com/asi/Fetch Account Info">
<soapenv:Body>
<fet:ExecuteFetchAccountInfo_Input>
<fet:Object_spcId>1-6U8KAR</fet:Object_spcId>
</fet:ExecuteFetchAccountInfo_Input>
</soapenv:Body>
</soapenv:Envelope>
Now, using the adapter testing option in the MobileFirst Studio, the following JSON payload are being passed in the dialog window
params:
{"ExecuteFetchAccountInfo_Input":{"Object_spcId":"1-6U8KAR"}}
But I get the following error when I call the adapter
{
"errors": [
"Runtime: Failed to read the HTTP response to: \/eai_enu\/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute \njava.io.EOFException: Unexpected end of ZLIB input stream"
],
"info": [
],
"isSuccessful": false,
"warnings": [
]
}
Also when I tried to check the log files. I was able to capture the request and response.
Request:
[2/16/16 11:27:10:997 IST] 000001ce com.worklight.integration.model.ProcedureInvoker I FWLSE0318I: request:
/eai_enu/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<tns:ExecuteFetchAccountInfo_Input xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://siebel.com/asi/Fetch Account Info" xmlns:xsdLocal1="http://www.siebel.com/xml/Account%20IO" >
<tns:Object_spcId>1-6U8KAR</tns:Object_spcId>
</tns:ExecuteFetchAccountInfo_Input>
</soap:Body>
</soap:Envelope>
Response:
response:
OK
Date=Tue, 16 Feb 2016 05:34:35 GMT
Server=Microsoft-IIS/6.0
X-Powered-By=ASP.NET
_charset=UTF-8
cache-control=no-cache, must-revalidate, max-age=0
pragma=no-cache
transfer-encoding=Chunked
content-type=text/xml;charset=UTF-8
[project IBMBankProject]
[2/16/16 11:27:11:000 IST] 000001ce om.worklight.integration.services.impl.DataAccessServiceImpl E FWLSE0099E: An error occurred while invoking procedure [project IBMBankProject]SoapAdapter1/HttpRequestFWLSE0100E: parameters: [project IBMBankProject]
Failed to read the HTTP response to: /eai_enu/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute
java.io.EOFException: Unexpected end of ZLIB input stream
FWLSE0101E: Caused by: [project IBMBankProject]java.lang.RuntimeException: java.io.EOFException: Unexpected end of ZLIB input streamjava.lang.RuntimeException: Failed to read the HTTP response to: /eai_enu/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute
java.io.EOFException: Unexpected end of ZLIB input stream
By looking at the response it says the response if Ok but it is unable to read it. Please help if I need to set-up something extra to read the response.

It turns out that there was a defect here that needed to be fixed. The APAR number is PI67417 and it can be downloaded from Fix Central.
Once you've applied the iFix, you'll also need to add "Accept-Encoding: identity" to your adapter call. That should resolve your issue. If it doesn't please let me know.

Since this is working in SOAP UI but fails in the adapter, it may indicate a product defect. Please open an IBM PMR and provide your files for reproduction by the development team.

Related

SoapUI: Message does not conform to configured policy

We're using SoapUI. We've imported a WSDL and created a test request
However we are met with the error:
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header/>
<env:Body>
<env:Fault>
<env:Code>
<env:Value>env:Sender</env:Value>
</env:Code>
<env:Reason>
<env:Text xml:lang="en">com.sun.xml.wss.XWSSecurityException: Message does not conform to configured policy [ AuthenticationTokenPolicy(S) ]: No Security Header found</env:Text>
</env:Reason>
</env:Fault>
</env:Body>
</env:Envelope>
However we are not provided with that information in the documentation
Any suggestions as to what is needed to get this over the line? Stumped!
This is what SoapUI has
I try and follow getting an WS-security error while trying to send SOAP request toweb service but I get
Receiver Requirement for Digested Password has not been met

Apache CXF (Mule) Invalid QName in mapping: SOAP-ENV:Client

I'm using Apache CXF 2.5.9 within Mule ESB 3.5.0 CE for a Web Service client. If the soap message validation fails on server I get a soap fault (naturally) that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>https://10.1.104.105:8444/DohvatiIzOIBaF2FAServiceTest: cvc-simple-type 1: element {http://www.apis-it.hr/fin/2008/elements/DohvatIzOIBa}OIB value '716500116650' is not a valid instance of type {http://www.apis-it.hr/fin/2008/types/f63}String11BrojType</faultstring>
<faultactor>OIB CIS pristupni čvor</faultactor>
</soapenv:Fault>
..but when client side tries to unmarshall the fault I get this exception:
2014-12-13 13:52:34,199 [WARN] org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for {http://www.apis-it.hr/fin/2010/services/DohvatiIzOIBaF2FAService}DohvatiIzOIBaF2ServicePortTypeService#{http://www.apis-it.hr/fin/2010/services/DohvatiIzOIBaF2FAService}DohvatiFOPoOIBu has thrown exception, unwinding now
java.lang.RuntimeException: Invalid QName in mapping: SOAP-ENV:Client
at org.apache.cxf.staxutils.StaxUtils.readQName(StaxUtils.java:1399)
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:59)
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46)
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:114)
at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:801)
I want the CXF client to unmarshall the soap fault to exception. How to get around this error?
Try making SOAP-ENV:Client something like this 12345, making the fault code a number solved it for me.
Mule won't catch the exception itself.
You should probably use a cxf fault interceptor. From there you can compose the message you are expecting.
Alternativly you could use the CXF transform feature
You need:
<entry key="faultcode" value="faultcode=soapenv:Client"/>
This will map the original invalid fault from the server into the following valid fault so that it can be accepted by the cxf client
<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>An error occurred</faultstring>
</soapenv:Fault>

wso2 ESB request is truncated

i'm using fresh installation of wso2 esb 4.8.1 with stanalone default configuration.
when i send soap request to my backend (perl service with soap lite), the body of POST request is truncated like this according to tcpdump:
SOAPAction: ""
Content-Type: text/xml
Content-Length: 511
Host: 192.168.11.234:8181
Connection: Keep-Alive
User-Agent: Synapse-PT-HttpComponents-NIO
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="htt
p://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<deleteAccountForHost xmlns="AbcdeHostingPhysicalHostManagerCPanelService">
<host xsi:type="xsd:string">zs000.abcde.net</host>
<user xsi:type="xsd:string">tstauto</user>
</deleteAccountForHost>
</soap:Body>
</soap:Envel
You can see that closing tag '</soap:Envel' is truncated.
But when i enable SOAP-tracer the request body becomes valid.
i use PT transport. I tried to switch transport to the nhttp and this problem seems to be disappeared.
So the question is: how to configure PT transport to avoid such strange behavior?
UPD1:
it seems that the problem occurs only when set the property FORCE_HTTP_1.0 and transport is PT
I got the same problem, but I set DISABLE_CHUNKING.
After many tries I tested that disabling chunking or forcing HTTP 1.0 results in truncated request.
I use WSO2 ESB version 4.8.1, client is SoapUI 5.0.0 or SoapClient from PHP 5.5.11.
When I use "Try this service" in ESB, then request is not truncated.
After switching from HTTP PassThrough Transport to HTTP-NIO Transport service behind endpoint receives complete request, but then I can't download WSDL of tenant.

SoapUI endpoint error randomly

I don't understand something about SoapUI and his mockservice's behaviour.
I'm using the client of SoapUI (testcase) and a Java EE application with JAX-RPC.
My problem is :
when I'm trying to call any webservice, from my Java Client, or the testcase of SoapUI, the mockservice return a well message at first call, and the error below at the second call, with the same call or not.
But if I'm waiting, It works ...
So, I have enabled the option in SOAPui : "close HTTP connection after each SOAP request" and it works all the time...
So my question is :
"Is it a normal behaviour of the mockservice, and how to implement this with my java client ?"
Thank you all.
<soapenv:Fault>
<faultcode>Server</faultcode>
<faultstring>Missing operation for soapAction [] and body element [null] with SOAP Version [SOAP 1.1]</faultstring>
</soapenv:Fault>
OK,
I found a solution on the forum of SoapUI : http://www.soapui.org/forum/viewtopic.php?t=5648
It is when you have the settings flag "HTTP Settings/Logs wire content of all mock requests" set to true.
=> Uncheck the flag and it works fine!
Thanks a lot !
I had the same problem, using SoapUI 5.1.2 Pro.
After receiving first asynchronous response to the MockService, the MockService
stopped and could not receive any more responses for the request I sent.
The error message was:
Thu Jul 02 12:59:44 CEST 2015:ERROR:An error occurred [Missing operation for soapAction [XXXX] and body element [null] with SOAP Version [SOAP 1.1]], see error log for details
In SoapUI Settings:
File->Preferences->Http Settings: "Enable Mock HTTP log", uncheck box:
"Logs wire content of all mock requests".
Now I receive several asynchronous responses in a row, and give response back on them.
The same problem may happen when two mock services run with the same endpoint address (including port and path) on SoapUI.

Invoking external web methods with BPEL + Apache Ode (calling .Net asmx) problems

Pre-info:
I'm learning to use orchestration of web methods(WM). I've sucessfully completed lessons with assings, invoking web methods, some parallel processing in BPEL. I'm using Eclipse Indigo 3.7.1 with BPEL plugins, Tomcat7 server with Apache Ode as orchestration base. At other side I need to learn calling secured WMs written on Mono .Net platform.
Having now:
Now I'm having problem calling ANY web methods. I've made:
1) Web Method running by Mono .Net - works, can be tested with browser (http://localhost:8081/hwws.asmx ) and with Eclipse tool "Web Services Explorer", it works fine.
2) my BPEL that only invokes this .Net web method throught SOAP port.
3) at other work stantion I've made .Net service with Visual Studio. Having errors either, if need I'll post it text later.
Problem: I'm getting errors at invoking.
Screens:
1) browser test of .net WS HW(helloWorld) http :// photo -hosting.winsoftmagic .com/ 1/ s4nbwdsqib.jpg
2) Eclipse test of .net WS HW http://photo-hosting.winsoftmagic.com/1/zywnl2wtgu.jpg
3) Error I get http://photo-hosting.winsoftmagic.com/1/ltbexoxcdl.jpg
Error listing:
18:15:25,294 WARN ExternalService Fault response: faultType=(unkown)
soap:ClientCould not deserialize Soap message
18:15:25,376 ERROR INVOKE Failure during invoke:
18:15:25,382 INFO BpelRuntimeContextImpl ActivityRecovery: Registering activity 11, failure reason: on channel 21
And it's give timeout error later. I've spent a week around this problems already, searched with all ways I could think up.
EDIT 12.03.2012:
Now test with mono WS worked for some reason.
I've tryed call WS from the internet and it gave the same error as I had at work spot:
14:25:16,177 ERROR [INVOKE] Failure during invoke: Error sending message (mex={PartnerRoleMex#hqejbhcnphr747jefui9ic [PID {http://wsaspx.tns/}inetWS-24] calling org.apache.ode.bpel.epr.WSAEndpoint#1e3a4c7.checkText(...) Status ASYNC}): The input stream for an incoming message is null.
14:25:16,178 INFO [BpelRuntimeContextImpl] ActivityRecovery: Registering activity 11, failure reason: Error sending message (mex={PartnerRoleMex#hqejbhcnphr747jefui9ic [PID {http://wsaspx.tns/}inetWS-24] calling org.apache.ode.bpel.epr.WSAEndpoint#1e3a4c7.checkText(...) Status ASYNC}): The input stream for an incoming message is null. on channel 21
In same time this service works from all test forms.
Edit: 16.03.2012
My mono method stopped work same as it started without my understanding. TcpMon-1.1.jar shows such message again:
POST /hwws.asmx HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://hwws.tps/HelloWorld"
User-Agent: Axis2
Host: localhost:8092
Transfer-Encoding: chunked <--- EDITED: REASON OF NOT WORKING ----
31c
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<addr:To xmlns:addr="http://www.w3.org/2005/08/addressing">http://localhost:8092/hwws.asmx</addr:To>
<addr:Action xmlns:addr="http://www.w3.org/2005/08/addressing">http://hwws.tps/HelloWorld</addr:Action>
<addr:ReplyTo xmlns:addr="http://www.w3.org/2005/08/addressing"><addr:Address>http://www.w3.org/2005/08/addressing/anonymous</addr:Address></addr:ReplyTo>
<addr:MessageID xmlns:addr="http://www.w3.org/2005/08/addressing">uuid:hqejbhcnphr74k7fapcntd</addr:MessageID>
</soapenv:Header>
<soapenv:Body><HelloWorld xmlns="http://hwws.tps/">
<s0:st xmlns:s0="http://hwws.tps/">My test message</s0:st>
</HelloWorld></soapenv:Body></soapenv:Envelope>
0
HTTP/1.0 500 Internal Server Error
Date: Fri, 16 Mar 2012 08:01:50 GMT
Server: Mono.WebServer2/0.4.0.0 Unix
Connection: close
X-AspNet-Version: 4.0.30319
Content-Length: 366
Cache-Control: private
Content-Type: text/xml; charset=utf-8
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body><soap:Fault><faultcode>soap:Client</faultcode>
<faultstring>Could not deserialize Soap message</faultstring>
</soap:Fault></soap:Body></soap:Envelope>
Actually I get one of 3 errors: couldn't deserialise, The input stream for an incoming message is null or even error 411 yesterday:) P.s. had 4th error with no socket connecting also, but all them vanished.
My main goal is ssl+authorisation .net services - would be gratefull if you have examples.
Thanks a lot to everyone! It's real pleasure to see your help:)
Thanks to all, testing soap-body shown that it was good and problem was in headers part which had some strange "Chunked" and numbers before xml (length of xml text) and 0 after xml end. I just set http.request.chunk=false and now it work at all my tests yet. For that purpose download sample.endpoint from http://ode.apache.org/endpoint-configuration.html , renamed it as bpel name (MonoCaller.bpel => MonoCaller.endpoint). It has string for chunked already commented. And also added something like http.default-headers.authorization=Basic <64b code of "login:password" made in any coder> for authorization purpose and it also works now! :-]
The same error has occured with me, the problem was with the web service itself, I had an empty constructor plus the methodes wich causes a problem, the solution is to delete the constructor.