I would like to send a SAML Authentication Request to my WSO2 IS using the operation authenticate() from IdentitySAMLSSOService.wsdl admin services. Is there any example of usage?
After successfully configure and run the travelocity sample: docs.wso2.com
I call the authenticate() operation via SOAP UI 5.1.3. passing these parameters:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://dto.saml.sso.identity.carbon.wso2.org/xsd" xmlns:xsd2="http://util.java/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:authenticate>
<!--Optional:-->
<xsd:authReqDTO>
<!--Optional:-->
<xsd1:assertionConsumerURL>http://bd-vm-d-wso2bam:8080/travelocity.com/home.jsp</xsd1:assertionConsumerURL>
<!--Optional:-->
<xsd1:certAlias>wso2carbon</xsd1:certAlias>
<!--Optional:-->
<xsd1:destination>https://bd-vm-d-wso2is:9443/samlsso</xsd1:destination>
<!--Optional:-->
<xsd1:issuer>travelocity.com</xsd1:issuer>
<!--Optional:-->
<xsd1:nameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</xsd1:nameIDFormat>
</xsd:authReqDTO>
</xsd:authenticate>
</soapenv:Body>
</soapenv:Envelope>
And I receive the following response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>unknown</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
On the other hand, how to send the signature of the SAML Authentication Request?
I don't see the any related parameter in the wsdl.
Example of usage of the authenticate() web service:
https://svn.wso2.org/repos/wso2/carbon/platform/tags/turing-chunk11/components/identity/org.wso2.carbon.identity.sso.saml/4.2.0/src/main/java/org/wso2/carbon/identity/sso/saml/servlet/SAMLSSOProviderServlet.java
Related
I want to host a web-service which will return a response of
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<QcB2BQNBPaymentIntegrationBalUpdatePaymentPostingResponse xmlns="http://tempuri.org">
<response xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>QCP-0031312;158155421123</b:string>
</response>
</QcB2BQNBPaymentIntegrationBalUpdatePaymentPostingResponse>
</soapenv:Body>
</soapenv:Envelope>
but I am getting the response as
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<QcB2BQNBPaymentIntegrationBalUpdatePaymentPostingResponse xmlns="http://tempuri.org">
<response >
<ns1:string xmlns:ns1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">QCP-0031312;158155421123</ns1:string>
</response>
</QcB2BQNBPaymentIntegrationBalUpdatePaymentPostingResponse>
</soapenv:Body>
</soapenv:Envelope>
I want to get the former response. please share some insight.
note: I've generated the java bean skeleton using axis
I am currently working on user provisioning for NetSuite.
How to get all the roles, departments and subsidiaries of an account using SuiteTalk(WebServices)?
For Subsidiary:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:urn="urn:messages_2017_2.platform.webservices.netsuite.com" xmlns:urn1="urn:core_2017_2.platform.webservices.netsuite.com" xmlns:ns1="urn:accounting.lists.webservices.netsuite.com" xmlns:ns2='urn:common_2017_2.platform.webservices.netsuite.com'>
<soapenv:Header>
<urn:applicationInfo>
<!--Optional:-->
<urn:applicationId></urn:applicationId>
</urn:applicationInfo>
<urn:passport>
<urn1:email></urn1:email>
<urn1:password></urn1:password>
<urn1:account></urn1:account>
</urn:passport>
</soapenv:Header>
<soapenv:Body>
<platformMsgs:search
xmlns:platformCore="urn:core_2017_2.platform.webservices.netsuite.com"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:s0="urn:accounting_2017_2.lists.webservices.netsuite.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:platformCommon="urn:common_2017_2.platform.webservices.netsuite.com"
xmlns:platformMsgs="urn:messages_2017_2.platform.webservices.netsuite.com">
<platformMsgs:searchRecord xsi:type="s0:SubsidiarySearch">
<s0:basic>
</s0:basic>
</platformMsgs:searchRecord>
</platformMsgs:search>
</soapenv:Body>
</soapenv:Envelope>
For Department :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:urn="urn:messages_2017_2.platform.webservices.netsuite.com" xmlns:urn1="urn:core_2017_2.platform.webservices.netsuite.com" xmlns:ns1="urn:accounting.lists.webservices.netsuite.com" xmlns:ns2='urn:common_2017_2.platform.webservices.netsuite.com'>
<soapenv:Header>
<urn:applicationInfo>
<!--Optional:-->
<urn:applicationId></urn:applicationId>
</urn:applicationInfo>
<urn:passport>
<urn1:email></urn1:email>
<urn1:password></urn1:password>
<urn1:account></urn1:account>
</urn:passport>
</soapenv:Header>
<soapenv:Body>
<platformMsgs:search
xmlns:platformCore="urn:core_2017_2.platform.webservices.netsuite.com"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:s0="urn:accounting_2017_2.lists.webservices.netsuite.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:platformCommon="urn:common_2017_2.platform.webservices.netsuite.com"
xmlns:platformMsgs="urn:messages_2017_2.platform.webservices.netsuite.com">
<platformMsgs:searchRecord xsi:type="s0:DepartmentSearch">
<s0:basic>
</s0:basic>
</platformMsgs:searchRecord>
</platformMsgs:search>
</soapenv:Body>
</soapenv:Envelope>
For Role:
Not able Fetch those records using SuiteTalk.
I'm trying to submit the request and get the response in SOAP UI but getting the following error.
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context>XIAdapter</context>
<code>ADAPTER.JAVA_EXCEPTION</code>
<text>See log trace with id: n/a</text>
</s:SystemError>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
The request i'm sending is
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:seg="http://intel.com/xi/Intel-MDM/Project/Segment">
<soapenv:Header/>
<soapenv:Body>
<seg:ListSegment_Request>
<!--Optional:-->
<SegmentName></SegmentName>
<!--Optional:-->
<StatusCode></StatusCode>
<!--Optional:-->
<PendingInd></PendingInd>
<!--Optional:-->
<ChangeDateFrom></ChangeDateFrom>
<!--Optional:-->
<ChangeTimeFrom></ChangeTimeFrom>
<!--Optional:-->
<ChangeDateTo></ChangeDateTo>
<!--Optional:-->
<ChangeTimeTo></ChangeTimeTo>
<!--Optional:-->
<List>
<!--Zero or more repetitions:-->
<Item>
<SegmentIdentifier>?</SegmentIdentifier>
</Item>
</List>
</seg:ListSegment_Request>
</soapenv:Body>
</soapenv:Envelope>
Is the issue with server or SOapUI or am i missing something here?
I am new to webservices ,
wsdl link : http://pp.hotels.travelrepublic.co.uk/ChannelManager.svc?wsdl
I have a wsdl url, easily in netbeans i have created and used.
Input via netbeans to webservice :
I am Sending the Request via java Program in netbeans request is:
<Request><Authentication CMId='68' Guid='5594FB83-F4D4-431F-B3C5-EA6D7A8BA795' Password='poihg321TR' Function='1' /><Establishment Id='4297867' > </Establishment></Request>
the response is :
<Response>
<Authentication CMId="68" Guid="5594FB83-F4D4-431F-B3C5-EA6D7A8BA795" Password="poihg321TR" Function="1" />
<Establishment Id="4297867">
<RoomTypes>
<RoomType RoomTypeId="1040459" Description="Double Room" />
<RoomType RoomTypeId="1040458" Description="Single Room" />
</RoomTypes>
<BoardTypes>
<BoardType BoardTypeId="1" Description="Room Only" />
</BoardTypes>
with the help of SoapUI
request generated is
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:RequestData>
<!--Optional:-->
<tem:requestDocument xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</tem:RequestData>
</soapenv:Body>
</soapenv:Envelope>
What i am sending through SoapUI is
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:RequestData>
<!--Optional:-->
<tem:requestDocument xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<!--The data sent via java program:-->
<Request>
<Authentication CMId='68' Guid='5594FB83-F4D4-431F-B3C5-EA6D7A8BA795' Password='poihg321TR' Function='1' />
<Establishment Id='4297867' >
</Establishment>
</Request>
<!--The data sent via java program:-->
</tem:RequestData>
</soapenv:Body>
</soapenv:Envelope>
If I run this in SoapUI
Output is not same as
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<RequestDataResponse xmlns="http://tempuri.org/">
<RequestDataResult><Response Error="Unable to parse xml">
<RequestDate Date="2014-05-30 16:14:15.7383" />
</Response></RequestDataResult>
</RequestDataResponse>
</s:Body>
</s:Envelope>
Try:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:RequestData>
<!--Optional:-->
<tem:requestDocument>
<![CDATA[<Request>
<Authentication CMId="68" Guid="5594FB83-F4D4-431F-B3C5-EA6D7A8BA795" Password="poihg321TR" Function="1"/>
<Establishment Id="4297867"></Establishment>
</Request>]]>
</tem:requestDocument>
</tem:RequestData>
</soapenv:Body>
</soapenv:Envelope>
Essentially, the WSDL does not have any of the Request and Authentication and other stuff defined, so you cannot send that. Further, the response tells you: "Unable to parse xml", so the application (as opposed to the service) is looking for XML data.
My WSO2 Identity Server version is 4.0.0 final. I have turned on admin service.
Here are the two requests.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mgt="http://mgt.user.carbon.wso2.org">
<soapenv:Header/>
<soapenv:Body>
<mgt:listUsers>
<!--Optional:-->
<mgt:filter>*</mgt:filter>
</mgt:listUsers>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mgt="http://mgt.user.carbon.wso2.org">
<soapenv:Header/>
<soapenv:Body>
<mgt:getAllRolesNames/>
</soapenv:Body>
</soapenv:Envelope>
If i call them separately in Test Case, it is okay. If i call listUsers first, and then getAllRolesNames (In SOAPUI, call listUser first, then change the Envelope to getAllRolesName one), it shows
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>unknown</faultstring>
<detail>
<ns:UserAdminUserAdminException xmlns:ns="http://mgt.user.carbon.wso2.org">
<UserAdminException xsi:type="ax2566:UserAdminException" xmlns="http://mgt.user.carbon.wso2.org" xmlns:ax2566="http://common.mgt.user.carbon.wso2.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ax2566:errorMessage xsi:nil="true"/>
</UserAdminException>
</ns:UserAdminUserAdminException>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Does it mean there are some bug inside server side implementation ?
I tested them in SOAPUI. The login session is not expired, i can still use it for querying. Does it mean i have to create ws client bean using request scope instead of session scope?
Thanks a lot.