WSO2 Identity Server userAdmin Web Service Failed to Re-use - wso2

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.

Related

SOAP namespace change axis

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

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.

Soap webservice returning different responses from same call

I have a SOAP service developed in DELPHI and published on IIS. Testing the services we found some strange behaviour, the soap response structure changes after we call an operation with a wrong parameter type.
The test case is simple, we are calling this simple operation:
Test1_1(i:Integer; var s:string);
Call 1 (right parameter type)
Request:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:WS_MCH_PrivadosIntf-IWS_MCH_Privados">
<soapenv:Header/>
<soapenv:Body>
<urn:Test1_1 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<numero xsi:type="xsd:int">1</numero>
</urn:Test1_1>
</soapenv:Body>
</soapenv:Envelope>
Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<Test1_1Response xmlns="urn:WS_MCH_PrivadosIntf-IWS_MCH_Privados">
<res xmlns="http://www.w3.org/2001/XMLSchema">TEST1_1 OK</res>
</Test1_1Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Call 2 (wrong parameter type)
Request:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:WS_MCH_PrivadosIntf-IWS_MCH_Privados">
<soapenv:Header/>
<soapenv:Body>
<urn:Test1_1 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<numero xsi:type="xsd:int">a</numero>
</urn:Test1_1>
</soapenv:Body>
</soapenv:Envelope>
Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>'a' is not a valid integer value</faultstring>
<faultactor/>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Call 3 (right parameter type, and response changes here from the first call)
Request:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:WS_MCH_PrivadosIntf-IWS_MCH_Privados">
<soapenv:Header/>
<soapenv:Body>
<urn:Test1_1 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<numero xsi:type="xsd:int">1</numero>
</urn:Test1_1>
</soapenv:Body>
</soapenv:Envelope>
Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:NS1="urn:WS_MCH_PrivadosIntf-IWS_MCH_Privados">
<NS1:Test1_1Response>
<res xsi:type="xsd:string">TEST1_1 OK</res>
</NS1:Test1_1Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
As you can see, the first call and the third are exactly the same, but the response is different. Like i said before, it changes after an invokation with the wrong parameter type.
The client of the service doesn't recognize the response after it changes.
Any clues about this behaviour?
I need the server to answer always in the same way.
You need to contact Idera and send them your test case.
I had a similar problem a few months ago, as what you described, and I couldn't resolve this error. I contacted Idera (the owner of Delphi) and reported this as a VCL error.
I did get a reply and fix, but I am unable to share the hot-fix with you.
(Please do not contact me for this...)
This is a hot-fix for Delphi Seattle or Update 1 fix for Delphi Berlin.

WSO2 IdentitySAMLSSOService.wsdl usage

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

SoapUI doesnt give correct response compared with written java program in netbeans

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.