Sabre Webservice to create Session using SoapUI 5.2.0 - web-services

I am trying to get token and then session in Sabre Production using SessionCreateRQ but getting error "Invalid or Expired binary security token ".
Endpoints: https://webservices.havail.sabre.com/websvc and https://sws-crt.cert.havail.sabre.com
I have an EPR which works in both Prod and cert but defaults to Prod.
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:mes="http://www.ebxml.org/namespaces/messageHeader" xmlns:web="http://webservices.sabre.com">
<soapenv:Header>
<sec:Security>
<!--Optional:-->
<sec:UsernameToken>
<!--Optional:-->
<sec:Username>*****</sec:Username>
<!--Optional:-->
<sec:Password>*******</sec:Password>
<!--0 to 2 repetitions:-->
<sec:NewPassword>******</sec:NewPassword>
<!--Optional:-->
<Organization>IPCC</Organization>
<!--Optional:-->
<Domain></Domain>
</sec:UsernameToken>
<!--Optional:-->
<sec:SabreAth>?</sec:SabreAth>
<!--Optional:-->
<sec:BinarySecurityToken>?</sec:BinarySecurityToken>
</sec:Security>
<mes:MessageHeader mes:id="?" mes:version="?">
<mes:From>
<!--1 or more repetitions:-->
<mes:PartyId mes:type="?">?</mes:PartyId>
<!--Optional:-->
<mes:Role>?</mes:Role>
</mes:From>
<mes:To>
<!--1 or more repetitions:-->
<mes:PartyId mes:type="?">?</mes:PartyId>
<!--Optional:-->
<mes:Role>?</mes:Role>
</mes:To>
<mes:CPAId>?</mes:CPAId>
<mes:ConversationId>?</mes:ConversationId>
<mes:Service mes:type="?">TokenCreateRQ</mes:Service>
<mes:Action>TokenCreateRQ</mes:Action>
<mes:MessageData>
<mes:MessageId>?</mes:MessageId>
<mes:Timestamp>?</mes:Timestamp>
<!--Optional:-->
<mes:RefToMessageId>?</mes:RefToMessageId>
<!--Optional:-->
<mes:TimeToLive>?</mes:TimeToLive>
<!--Optional:-->
<mes:Timeout>3000</mes:Timeout>
</mes:MessageData>
<!--Optional:-->
<mes:DuplicateElimination>?</mes:DuplicateElimination>
<!--Zero or more repetitions:-->
<mes:Description xml:lang="?">?</mes:Description>
<!--You may enter ANY elements at this point-->
</mes:MessageHeader>
</soapenv:Header>
<soapenv:Body>
<web:TokenCreateRQ Version="?"/>
</soapenv:Body>
</soapenv:Envelope>
Response:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader eb:version="1.0" soap-env:mustUnderstand="1" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader">
<eb:From>
<eb:PartyId eb:type="?">?</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="?">?</eb:PartyId>
</eb:To>
<eb:CPAId>?</eb:CPAId>
<eb:ConversationId>?</eb:ConversationId>
<eb:Service eb:type="?">TokenCreateRQ</eb:Service>
<eb:Action>ErrorRS</eb:Action>
<eb:MessageData>
<eb:MessageId>1467037801397820233</eb:MessageId>
<eb:Timestamp>2021-02-17T22:15:39</eb:Timestamp>
<eb:RefToMessageId>?</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">?</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Client.InvalidSecurityToken</faultcode>
<faultstring>Invalid or Expired binary security token: ?</faultstring>
<detail>
<StackTrace>com.sabre.universalservices.base.session.SessionException: errors.session.USG_INVALID_SECURITY_TOKEN</StackTrace>
</detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>
Please help me what is wrong here? I know my EPR working fine.

You can use this snippet for TokenCreateRQ
https://developer.sabre.com/docs/soap_apis/session_management/create_access_token
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext"
xmlns:eb="http://www.ebxml.org/namespaces/messageHeader"
xmlns:web="http://webservices.sabre.com">
<soapenv:Header>
<sec:Security>
<!--Optional:-->
<sec:UsernameToken>
<sec:Username>${#Project#Username}</sec:Username>
<sec:Password>${#Project#Password}</sec:Password>
<Organization>${#Project#Organization}</Organization>
<Domain>${#Project#Domain}</Domain>
</sec:UsernameToken>
</sec:Security>
<eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1">
<eb:From>
<eb:PartyId>Client</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId>SWS</eb:PartyId>
</eb:To>
<eb:CPAId>${#Project#Organization}</eb:CPAId>
<eb:ConversationId>1234</eb:ConversationId>
<eb:Service>Session</eb:Service>
<eb:Action>TokenCreateRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>1234</eb:MessageId>
<eb:Timestamp>2015-01-01T00:00:00</eb:Timestamp>
</eb:MessageData>
</eb:MessageHeader>
</soapenv:Header>
<soapenv:Body>
<web:TokenCreateRQ Version="2.0.0"/>
</soapenv:Body>
</soapenv:Envelope>
HTH

Related

wso2is tenant management problem when add new tenant

I using the service endpoint TenantMgtAdminService.TenantMgtAdminServiceHttpsSoap12Endpoint/
with the method addTenant in wso2is 5.9.0
I have the error:
<soapenv:Text xml:lang="en-US">Error in adding claims to the user.</soapenv:Text>
and in other ocassiones this error:
<soapenv:Text xml:lang="en-US">Error in notifying tenant addition.</soapenv:Text>
This is my soapenv:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://services.mgt.tenant.carbon.wso2.org" xmlns:xsd="http://beans.common.stratos.carbon.wso2.org/xsd">
<soap:Header/>
<soap:Body>
<ser:addTenant>
<!--Optional:-->
<ser:tenantInfoBean>
<!--Optional:-->
<xsd:active>true</xsd:active>
<!--Optional:-->
<xsd:admin>admin#abc.com</xsd:admin>
<!--Optional:-->
<xsd:adminPassword>admin</xsd:adminPassword>
<!--Optional:-->
<xsd:createdDate></xsd:createdDate>
<!--Optional:-->
<xsd:email>admin#abc.com</xsd:email>
<!--Optional:-->
<xsd:firstname>firstname</xsd:firstname>
<!--Optional:-->
<xsd:lastname>lastname</xsd:lastname>
<!--Optional:-->
<xsd:originatedService></xsd:originatedService>
<!--Optional:-->
<xsd:successKey></xsd:successKey>
<!--Optional:-->
<xsd:tenantDomain>mydomain.com</xsd:tenantDomain>
<!--Optional:-->
<xsd:tenantId>1</xsd:tenantId>
<!--Optional:-->
<xsd:usagePlan></xsd:usagePlan>
</ser:tenantInfoBean>
</ser:addTenant>
</soap:Body>
</soap:Envelope>

User Provisioning for Netsuite?

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.

XIAdapter Error in Soap UI

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?

values for find criteria and find control in soap ui

below is xml soapui version of a wsdl obtained from oracle oer to get salary details from fusion.The webservice asks for Assignmentid,hiredate,findcriteria,findcontrol,When i consume this webservice in Jdeveloper i give find creiteria and findcontrol as null and pass values to assignmentid and hiredate and i am able to get salary attribute .But problem with soap ui is i dono what to pass it for find criteria and find control .My task is to run it in soapui
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/hcm/compensation/salary/core/salaryServiceV2/types/" xmlns:typ1="http://xmlns.oracle.com/adf/svc/types/">
<soapenv:Header />
<soapenv:Body>
<typ:findSalaryfindByAssignmentIdAndDate>
<typ:findCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>-1</typ1:fetchSize>
<!--Optional:-->
<typ1:filter>
<!--Optional:-->
<typ1:conjunction>?</typ1:conjunction>
<!--1 or more repetitions:-->
<typ1:group>
<!--Optional:-->
<typ1:conjunction>?</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<!--1 or more repetitions:-->
<typ1:item>
<!--Optional:-->
<typ1:conjunction>?</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>?</typ1:attribute>
<typ1:operator>?</typ1:operator>
<!--You have a CHOICE of the next 2 items at this level-->
<!--Zero or more repetitions:-->
<typ1:value>?</typ1:value>
<typ1:nested />
</typ1:item>
</typ1:group>
<!--Zero or more repetitions:-->
<typ1:nested />
</typ1:filter>
<!--Optional:-->
<typ1:sortOrder>
<!--1 or more repetitions:-->
<typ1:sortAttribute>
<typ1:name>?</typ1:name>
<typ1:descending>false</typ1:descending>
</typ1:sortAttribute>
</typ1:sortOrder>
<!--Zero or more repetitions:-->
<typ1:findAttribute>?</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<!--Zero or more repetitions:-->
<typ1:childFindCriteria>
<typ1:fetchStart>0</typ1:fetchStart>
<typ1:fetchSize>-1</typ1:fetchSize>
<!--Optional:-->
<typ1:filter>
<!--Optional:-->
<typ1:conjunction>?</typ1:conjunction>
<!--1 or more repetitions:-->
<typ1:group>
<!--Optional:-->
<typ1:conjunction>?</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<!--1 or more repetitions:-->
<typ1:item>
<!--Optional:-->
<typ1:conjunction>?</typ1:conjunction>
<typ1:upperCaseCompare>false</typ1:upperCaseCompare>
<typ1:attribute>?</typ1:attribute>
<typ1:operator>?</typ1:operator>
<!--You have a CHOICE of the next 2 items at this level-->
<!--Zero or more repetitions:-->
<typ1:value>?</typ1:value>
<typ1:nested />
</typ1:item>
</typ1:group>
<!--Zero or more repetitions:-->
<typ1:nested />
</typ1:filter>
<!--Optional:-->
<typ1:sortOrder>
<!--1 or more repetitions:-->
<typ1:sortAttribute>
<typ1:name>?</typ1:name>
<typ1:descending>false</typ1:descending>
</typ1:sortAttribute>
</typ1:sortOrder>
<!--Zero or more repetitions:-->
<typ1:findAttribute>?</typ1:findAttribute>
<typ1:excludeAttribute>false</typ1:excludeAttribute>
<!--Zero or more repetitions:-->
<typ1:childFindCriteria />
<typ1:childAttrName>?</typ1:childAttrName>
</typ1:childFindCriteria>
</typ:findCriteria>
<typ:assignmentId>?</typ:assignmentId>
<typ:effectiveDate>?</typ:effectiveDate>
<typ:findControl>
<typ1:retrieveAllTranslations>false</typ1:retrieveAllTranslations>
</typ:findControl>
</typ:findSalaryfindByAssignmentIdAndDate>
</soapenv:Body>
</soapenv:Envelope>
If you want to pass a node with null value, you can do it like this:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://xmlns.oracle.com/apps/hcm/compensation/salary/core/salaryServiceV2/types/"
xmlns:typ1="http://xmlns.oracle.com/adf/svc/types/">
<soapenv:Header />
<soapenv:Body>
<typ:findSalaryfindByAssignmentIdAndDate>
<typ:findCriteria /><!-- NULLed node -->
<typ:assignmentId>your_id</typ:assignmentId>
<typ:effectiveDate>effective_date</typ:effectiveDate>
<typ:findControl /><!-- NULLed node -->
</typ:findSalaryfindByAssignmentIdAndDate>
</soapenv:Body>
</soapenv:Envelope>

Magento update product from SOAP

Magento 1.9.1.0, SOAP, WS-I compliant. i'm trying to update product qty, magento returns "success", qty stays as it was before (didn't changed). How to change product qty from SOAP ?
request:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<catalogInventoryStockItemMultiUpdateRequestParam xmlns="urn:Magento">
<sessionId xmlns="">32efdfffb0f27f43f3ee0073a9351de3</sessionId>
<productIds xmlns="">
<complexObjectArray>9198</complexObjectArray>
</productIds>
<productData xmlns="">
<complexObjectArray>
<qty>17</qty>
<is_in_stock>1</is_in_stock>
</complexObjectArray>
</productData>
</catalogInventoryStockItemMultiUpdateRequestParam>
</s:Body>
</s:Envelope>
response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento">
<SOAP-ENV:Body>
<ns1:catalogInventoryStockItemMultiUpdateResponseParam>
<result>true</result>
</ns1:catalogInventoryStockItemMultiUpdateResponseParam>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I just tried this and it worked
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
<soapenv:Header/>
<soapenv:Body>
<urn:catalogInventoryStockItemMultiUpdateRequestParam>
<sessionId>ddaf6e2b9bf7055ae59b7cbeeca9c894</sessionId>
<productIds>
<!--Zero or more repetitions:-->
<complexObjectArray>764</complexObjectArray>
</productIds>
<productData>
<!--Zero or more repetitions:-->
<complexObjectArray>
<!--Optional:-->
<qty>9</qty>
<use_config_notify_stock_qty>1</use_config_notify_stock_qty>
</complexObjectArray>
</productData>
</urn:catalogInventoryStockItemMultiUpdateRequestParam>
</soapenv:Body>
</soapenv:Envelope>
Here are the results
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento">
<SOAP-ENV:Body>
<ns1:catalogInventoryStockItemMultiUpdateResponseParam>
<result>true</result>
</ns1:catalogInventoryStockItemMultiUpdateResponseParam>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Here is a screen shot of the updated qty