SOAP namespace change axis - web-services

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

Related

How to transfor soap fault message in xslt transformation

how to create xslt which transforms the response message to a soap fault message.please refer the Attached the Input and what i expected Output,xslt Result after xslt transformation.
This is my xml
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<soapenv:Fault>
<soapenv:Code>
<soapenv:Value>soapenv:Sender</soapenv:Value>
</soapenv:Code>
<soapenv:Reason>
<soapenv:Text xml:lang="en">User NotFound</soapenv:Text>
</soapenv:Reason>
<soapenv:Detail>
<axis2ns4:sdpFault xmlns:axis2ns4="http://testservice.com/uat/testservice">
<axis2ns4:resultNameCode>2</axis2ns4:resultNameCode>
<axis2ns4:resultNameType>GH</axis2ns4:resultNameType>
</axis2ns4:sdpFault>
</soapenv:Detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Expecte result
set this message <soapenv:Text xml:lang="en">User NotFound</soapenv:Text>
<ns1:UserDescription>User NotFound</ns1:UserDescription>

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.

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.

Webservice envelope issue

I created a webservice producer from wsdl file using cxf.response is
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://esb.tiaa.org/life-insurance-correspondence-v1/types" xmlns:ns3="http://esb.tiaa.org/indianarmyshortservice">
<soap:Body>
<ns2:getSourcesResponse xmlns:ns2="http://channelmapwebservice.service.web.ccad/">
<return>
<sourceId>3</sourceId>
<sourceName>DUMMY9</sourceName>
</return>
The expected result is
<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>
<ns1:getSourcesResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://com.ccadllc.dac.web.service.channelmapwebservice">
<getSourcesReturn soapenc:arrayType="xsd:anyType[644]"
xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<getSourcesReturn xsi:type="ns2:SourceInfo" xmlns:ns2="http://channelmapwebservice.service.web.ccad">
<sourceId xsi:type="xsd:int">3</sourceId>
<sourceName xsi:type="xsd:string">DUMMY9</sourceName>
</getSourcesReturn>
How to obtain the exptected result

WSO2 Identity Server userAdmin Web Service Failed to Re-use

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.