SOAPAction header value must be enclosed in double-quotes through WSO2 ESB - wso2

I'm sending a request to a server with "SOAPAction urn:abcd", when I send it directly to the server through SOAP UI I'm able to get the output. but when I send using WSO2 ESB I'm getting
<SOAP:Envelope SOAP:encodingStyle="urn:asdf" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Client</faultcode>
<faultstring>Client Error</faultstring>
<detail xmlns="asdf">
<message>SOAPAction header value must be enclosed in double-quotes</message>
<errortype>HTTPHeaderError</errortype>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
What is the problem?

Just give SOAPAction header with two double quotes
e.g.: ""urn:getQuote""

Related

Oracle Service Bus - Decoding of MIME attachments from MIME Content-Transfer-Encoding='7bit' not supported

I've developed a proxy service in OSB 12c with MTOM enabled
I can send binary files successfully as pdf, doc, ppt or xls, but as soon as I send a text file the following error arises:
REQUEST:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:upl="http://UploadFileService.acme/">
<soap:Header/>
<soap:Body>
<upl:scanDocRequest>
<requestMsg>
<doc>cid:719461305114</doc>
</requestMsg>
</upl:scanDocRequest>
</soap:Body>
</soap:Envelope>
RESPONSE:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>OSB-382118</con:errorCode>
<con:reason>Decoding of MIME attachments from MIME Content-Transfer-Encoding='7bit' not supported</con:reason>
<con:location>
<con:node>AntivirusPipelinePairNode</con:node>
<con:pipeline>request-a00020f.N696e5fe3.0.15143454755.N8000</con:pipeline>
<con:stage>ReportingIn</con:stage>
<con:path>request-pipeline</con:path>
</con:location>
</con:fault>
</soap:Body>
</soap:Envelope>
Response fails with
Decoding of MIME attachments from MIME Content-Transfer-Encoding='7bit' not supported
Content-type = application/octet-stream instead of plain/text solved my problem

WSO2 IS - Do a Single Logout using the IdentitySAMLSSOService

I want to use the IdentitySAMLSSOService.wsdl to end a session using the doSingleLogout method but I can't find any documentation around. The method asks for a sessionId, the problem is that I don't know where to find that value, I've looking in the SAML Response, headers, etc.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://org.apache.axis2/xsd">
<soap:Header/>
<soap:Body>
<xsd:doSingleLogout>
<!--Optional:-->
<xsd:sessionId></xsd:sessionId>
</xsd:doSingleLogout>
</soap:Body>
</soap:Envelope>
The ouput seems to be the same always with all the values I've tried.
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:doSingleLogoutResponse xmlns:ns="http://org.apache.axis2/xsd">
<ns:return xsi:type="ax2362:SAMLSSOReqValidationResponseDTO" xmlns:ax2360="http://base.identity.carbon.wso2.org/xsd" xmlns:ax2362="http://dto.saml.sso.identity.carbon.wso2.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ax2364="http://util.java/xsd">
<ax2362:assertionConsumerURL xsi:nil="true"/>
<ax2362:destination xsi:nil="true"/>
<ax2362:doSingleLogout>false</ax2362:doSingleLogout>
<ax2362:forceAuthn>false</ax2362:forceAuthn>
<ax2362:id xsi:nil="true"/>
<ax2362:idPInitSSO>false</ax2362:idPInitSSO>
<ax2362:issuer xsi:nil="true"/>
<ax2362:logOutReq>true</ax2362:logOutReq>
<ax2362:loginPageURL xsi:nil="true"/>
<ax2362:logoutRespDTO xsi:nil="true"/>
<ax2362:logoutResponse xsi:nil="true"/>
<ax2362:passive>false</ax2362:passive>
<ax2362:queryString xsi:nil="true"/>
<ax2362:requestMessageString xsi:nil="true"/>
<ax2362:response xsi:nil="true"/>
<ax2362:rpSessionId xsi:nil="true"/>
<ax2362:subject xsi:nil="true"/>
<ax2362:valid>false</ax2362:valid>
</ns:return>
</ns:doSingleLogoutResponse>
</soapenv:Body>
</soapenv:Envelope>
I'm using Identity Server 5.0.0 without SP1. The WebService is built into org.wso2.carbon.identity.sso.saml (4.2.3) and it's exposed in identityserverurl:9443/services/IdentitySAMLSSOService?wsdl.
Thanks in advance.
According to the execution flow, it can be any value. As doSingleLogout method does not consider an actual SAML2 logout request, there is no any validate is happened according to the sessionid value. However, in real SSO signal logout flow, sessionid would be the value of the 'samlssoTokenId' cookie which is set in to the browser. Please note, doSingleLogout method can not be used to send SAML logout request to other session participants. As i know, it can be used to destroy the SSO session in WSO2IS.
Also, you can destroy the WSO2IS SSO session using following way by calling commonauth end point as mentioned in last selection in this
https://localhost:9443/commonauth?commonAuthLogout=true&type=oidc2&sessionDataKey=7fa50562-2d0f-4234-8e39-8a7271b9b273&commonAuthCallerPath=http://localhost:8080/SSOWebApp/&relyingParty=SSOWebAPP

How to pass an object as a BlackBerry SOAP request parameter

I am New to BlackBerry development using Momentics. Now I want to send one object to SOAP request.
Here is my web service:
<?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>
<Login xmlns="http://shidhints.com/">
<MyLoginCredentials>
<Email>string</Email>
<Password>string</Password>
</MyLoginCredentials>
</Login>
</soap:Body>
</soap:Envelope>
Here is my C++ code:
m_soap.setAction("http://shidhints.com/Login");
m_soap.setHost("mobile.shidhints.com");
QtSoapMessage request;
request.setMethod(QtSoapQName("Login", "http://shidhints.com/"));
request.addMethodArgument("Email", "http://shidhints.com/", email);
request.addMethodArgument("Password", "http://shidhints.com/", password);
// Submit the method request to the web service.
m_soap.submitRequest(request, "http://shidhints.com/Service.asmx");
Now I am getting an error like:
Query failed: XML parse error
I have Resolved it Using the code,
QtSoapStruct *myStruct=new QtSoapStruct(QtSoapQName("MyLoginCredentials"));
myStruct->insert( new QtSoapSimpleType(QtSoapQName("Email"), email));
myStruct->insert( new QtSoapSimpleType(QtSoapQName("Password"),password));
request.addMethodArgument(myStruct);

NIST HL7 Webservice and SoapUI

Looking for some help using SoapUI with the NIST web service located at http://xreg2.nist.gov:8080/HL7WS/. Loading the site's WSDL from SoapUI produces the following sample service request:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:mes="http://messagevalidation.hl7ws.healthcare.nist.gov/">
<soap:Header/>
<soap:Body>
<mes:validate>
<!--Optional:-->
<arg0>?</arg0>
<!--Optional:-->
<arg1>?</arg1>
<!--Optional:-->
<arg2>?</arg2>
<!--Optional:-->
<arg3>?</arg3>
</mes:validate>
</soap:Body>
</soap:Envelope>
Here's a sample HL7 message:
MSH|^~\&|MY LAB|MYLAB-3|GHH OE|BLDG4|200202150930||VXU^V04^VXU_V04|CNTRL-3456|P|2.5.1
PID|||555-44-4444||EVERYWOMAN^EVE^E^^^^L|JONES|19620320|F||
|3501 ROLLING HILLS CIRCLE^^DAVIE^FL^33328||(206)1234567
Running this message through http://hl7v2-iz-testing.nist.gov/mu-immunization/ produces the following Error:
The line '|3501 ROLLING HILLS CIRCLE^^DAVIE^FL^33328||(206)1234567' is not a valid segment
Here's my SoapUI sample request using the above message wrapped in CDATA:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:mes="http://messagevalidation.hl7ws.healthcare.nist.gov/">
<soap:Header/>
<soap:Body>
<mes:validate><![CDATA[
MSH|^~\&|MY LAB|MYLAB-3|GHH OE|BLDG4|200202150930||VXU^V04^VXU_V04|CNTRL-3456|P|2.5.1
PID|||555-44-4444||EVERYWOMAN^EVE^E^^^^L|JONES|19620320|F||
|3501 ROLLING HILLS CIRCLE^^DAVIE^FL^33328||(206)1234567
]]></mes:validate>
</soap:Body>
</soap:Envelope>
And here's the result from the web service call:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<ns2:validateResponse xmlns:ns2="http://messagevalidation.hl7ws.healthcare.nist.gov/">
<return><![CDATA[<HL7V2MessageValidationReport xmlns="http://www.nist.gov/healthcare/validation/message/hl7/v2/report" xmlns:mes="http://www.nist.gov/healthcare/validation/message">
<HeaderReport>
<mes:ValidationStatus>Incomplete</mes:ValidationStatus>
<mes:ValidationStatusInfo>Message is required.</mes:ValidationStatusInfo>
<mes:ServiceName>NIST HL7V2 Message Validation</mes:ServiceName>
<mes:ServiceProvider>NIST</mes:ServiceProvider>
<mes:ServiceVersion>1.0</mes:ServiceVersion>
<mes:StandardType>HL7 V2</mes:StandardType>
<mes:ValidationType>Automated</mes:ValidationType>
<mes:TestIdentifier/>
<mes:ResultOfTest>Failed</mes:ResultOfTest>
<mes:AffirmCount>0</mes:AffirmCount>
<mes:ErrorCount>1</mes:ErrorCount>
<mes:WarningCount>0</mes:WarningCount>
<mes:IgnoreCount>0</mes:IgnoreCount>
<mes:AlertCount>0</mes:AlertCount>
</HeaderReport>
</HL7V2MessageValidationReport>]]></return>
</ns2:validateResponse>
</soap:Body>
</soap:Envelope>
I've already spent too much time researching and fiddling with message placement in the request and I understand and appreciate the many comments associated with working with HL7 (none positive). Can anybody shed light as to how to format my out-going message? I'm expecting to get back a message similar to the manual message verification, e.g. 'Bushwood' is an invalid line segment.
Use the HL7 V2 Validation Tool just on copies of your original HL7 messages.
Take care not to insert Line Feeds, Form Feeds, Carriage Returns, Escapes or any other control codes into HL7 messages

Full SOAP syntax for a Sharepoint DspSts.asmx query including dsp:authentication and dsp:dataRoot

I'm trying to retrieve list data from a Sharepoint 2010 server using the webservice at DspSts.asmx. (Nope can't use oData here - long story). The WSDL suggests the following format:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp">
<SOAP-ENV:Header>
<dsp:authentication/>
<dsp:dataRoot>
<dsp:root>STRING </dsp:root>
</dsp:dataRoot>
<dsp:request document="" method=""/>
<dsp:versions>
<dsp:version>STRING </dsp:version>
</dsp:versions>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<dsp:queryRequest/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
So I created the following sample request code (and send it out using Oxygen XML):
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp">
<SOAP-ENV:Header>
<dsp:authentication/>
<dsp:dataRoot allowRemoteDataAccess="true" >
<dsp:root />
</dsp:dataRoot>
<dsp:request service="DspSts" document="content" method="query"></dsp:request>
<dsp:versions>
<dsp:version>1.0</dsp:version>
</dsp:versions>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<dsp:queryRequest>
<dsQuery select="/list[#id='{8F3269B6-02EA-44C5-BA2B-BA8A4D5E9C44}']" resultContent="dataOnly" columnMapping="element" resultRoot="Rows" resultRow="Row">
<Query QueryType="DSPQ">
<Fields>
<AllFields />
</Fields>
</Query>
</dsQuery>"
</dsp:queryRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
However when I send that query I do not get a login prompt (when I use the list web service I get one) and then an error result:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client.Dsp.InvalidSite</faultcode>
<faultstring>Failed to verify user permissions.</faultstring>
<detail>
<queryResponse xmlns="http://schemas.microsoft.com/sharepoint/dsp">
<dsQueryResponse status="failure"/>
</queryResponse>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
I'm using a hosted Sharepoint, so I don't know if I can tweak any security setting. Now my questions:
How can I enforce authentication?
What do I need to put into dsp:authentication
What to put in dsp:root
All samples I found didn't have dsp:authentication or dsp:root in it.
Help is very much appreciated
There actually is a work around. If you read a different Sharepoint web service first, e.g. Lists.asmx, then you are properly prompted for credentials and the following calls to DspSts.asmx use the digest credentials created in the first call.