for monitoring purpose I was looking for a way, possibly via JMX or SNMP, to retrieve the Carbon Applications List and for each one of those the version.
I googled and read the docs but wasn't able to find anything
Any idea ?
TIA
Max
You can view the list or carbon apps deployed by calling admin services.
To get the list of carbon apps you should invoke ApplicationAdmin admin service.
Admin Service URL: https://localhost:9443/services/ApplicationAdmin
Sample Request Payload:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mgt="http://mgt.application.carbon.wso2.org">
<soapenv:Header/>
<soapenv:Body>
<mgt:listAllApplications/>
</soapenv:Body>
</soapenv:Envelope>
Sample Response Payload:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:listAllApplicationsResponse xmlns:ns="http://mgt.application.carbon.wso2.org" xmlns:ax21="http://mgt.application.carbon.wso2.org/xsd">
<ns:return>ContainerAPICompositeApplication_1.0.0</ns:return>
<ns:return>SalesforceCompositeProject_1.0.0</ns:return>
</ns:listAllApplicationsResponse>
</soapenv:Body>
</soapenv:Envelope>
Make sure you pass in the authenticated session ID when making the request. You can find more details on this at : http://itsmaheeka.blogspot.com/2016/06/wso2-admin-services.html
Related
I'm trying to create a serviceProvider including permissions using the webservice API of WSO2IS 5.1.0
The API I'm using is the one you can find on https://docs.wso2.com/display/IS510/Identity+Application+Management+API
Simply creating a serviceProvider with the request below works fine.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://model.common.application.identity.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:createApplication>
<xsd:serviceProvider>
<xsd1:applicationName>APP_NAME</xsd1:applicationName>
<xsd1:description>My application name</xsd1:description>
</xsd:serviceProvider>
</xsd:createApplication>
Trying to create a serviceProvider with permissions with the request below fails with the message
Error while storing permissions for application APP_NAME
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://model.common.application.identity.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:createApplication>
<xsd:serviceProvider>
<xsd1:applicationName>APP_NAME</xsd1:applicationName>
<xsd1:description>My application name</xsd1:description>
<xsd1:permissionAndRoleConfig>
<xsd1:permissions>
<xsd1:value>permission1</xsd1:value>
</xsd1:permissions>
</xsd1:permissionAndRoleConfig>
</xsd:serviceProvider>
</xsd:createApplication>
I cannot find any further information in the logs and also the example request messages on the WSO2 documentation site are lacking any information.
Any help or suggestion is welcome
We have a requirement to pass xml as a Soap Attachment in soap request. At present we are handling this requirement in a custom class mediator; we are trying to achieve this requirement through WSO2 ESB inbuilt mediators without coding the functionality in a custom class mediator. We are exploring for this option on WSO2 ESB 4.9.0 and 4.8.0
Please provide your valuable suggestions.
Soap request with attachment is as shown below. Xml file is attached is passed in the custom class mediator.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:swa="http://aasws.com/swa">
<soapenv:Header>
<swa:OurHeader>
<swa:Credential>
<swa:Username>XXXX</swa:Username>
<swa:Password>XXXX</swa:Password>
<swa:Dbtitle>XXXX</swa:Dbtitle>
<!--Optional:-->
<swa:Domain/>
<!--Optional:-->
<swa:Accessuser/>
</swa:Credential>
</swa:OurHeader>
</soapenv:Header>
<soapenv:Body>
<swa:getServiceInfo>
<swa:attachmentID>XXXX.xml</swa:attachmentID>
</swa:getServiceInfo>
</soapenv:Body>
</soapenv:Envelope>
You can send a SOAP attachment in WSO2 ESB via MTOM. Please find the following links which explain in detail how you can achieve this task.
[1] http://hi-my-world.blogspot.com/2015/01/sending-attachements-with-with-esb-via.html
[2] https://docs.wso2.com/pages/viewpage.action?pageId=33136025
[3] http://wso2.com/library/1148/
Cheers,
Pubudu.
I have enabled the admin services from carbon.xml for API Manager and extracted the wsdl successfully. Now I am trying to invoke the service RemoteTenantManagerService using SOAP UI. I have loaded the wsdl in SOAP UI and also provided the Basic authentication Username/Password as admin/admin. But I am getting following message back. Port for API Manager is Offset 1
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.ws.um.carbon.wso2.org">
<soapenv:Header/>
<soapenv:Body>
<ser:getAllTenants/>
</soapenv:Body>
</soapenv:Envelope>
Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>The service cannot be found for the endpoint reference (EPR) /services/RemoteTenantManagerService.RemoteTenantManagerServiceHttpsSoap11Endpoint</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
There are two types of transports, PassThrough and servlet. The admin services are exposed through servlet transport. Hence those must be invoked using servlet transport port.
For ex:- https://{host}:9443/services/RemoteTenantManagerService
In your case you have set offset to the "1" so please call the service using the URL https://{host}:9444/services/RemoteTenantManagerService
The generated WSDL contains the endpoint with Passthrough port hence soapUI shows it as the default endpoint. Please change the port to servlet port (your case it should be 9444) and run again.
I have deployed a custom Proxy Service in WSO2 ESB and I can't obtain any response from the web service i call with it in "Try this service" page. I've tried to send the request with SOAP UI passing through the Proxy Service of WSO2ESB (I put the endpoint of the Proxy Service, and NOT of the WS, in SOAP UI) and it works correctly. The same SOAP request doesn't work in the WSO2ESB page unreasonably.
So, when i create a scheduled task with the selected proxy service it returns me an error. I don't know how to change the content of the SOAP message in order to make it correct for ESB.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://ec.europa.eu/eurostat/sri/service/2.0">
<soapenv:Header/>
<soapenv:Body>
<ns:QueryStructure>
<!--Optional:-->
<ns:Query>
<RegistryInterface xsi:schemaLocation="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message SDMXMessage.xsd" xmlns="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message" xmlns:common="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/common" xmlns:compact="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/compact" xmlns:cross="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/cross" xmlns:generic="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/generic" xmlns:query="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/query" xmlns:structure="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/structure" xmlns:registry="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/registry" xmlns:utility="http://www.SDMX.org/resources/SDMXML/schemas/v2_0/utility" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<ID>JD014</ID>
<Test>true</Test>
<Truncated>false</Truncated>
<Name xml:lang="en">Trans46302</Name>
<Prepared>2001-03-11T09:30:47-05:00</Prepared>
<Sender id="BIS"/>
</Header>
<QueryStructureRequest resolveReferences="false">
<registry:DataflowRef/>
</QueryStructureRequest>
</RegistryInterface>
</ns:Query>
</ns:QueryStructure>
</soapenv:Body>
</soapenv:Envelope>
This runs on SOAP UI (through ESB) and not on the same ESB.
For changing the content of a message you can use Payload Mediator.
There's also an example on how to do this.
Hope that helps.
I have a problem with the Web Service I recently developed.
The problem is about the Web Service response. More precisely sometimes the Web Service sends back the following response:
<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:GetConstants2Response soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://usermanagerwstest">
<GetConstants2Return xsi:type="ns2:CFComponentSkeleton" xmlns:ns2="http://rpc.xml.coldfusion"/>
</ns1:GetConstants2Response>
</soapenv:Body>
</soapenv:Envelope>
Instead the correct response (that sometimes shows up in an intermittent way) is reported below:
<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:GetConstants2Response soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://usermanagerwstest">
<GetConstants2Return xsi:type="ns1:Constants2">
<BooleanTypeFalse xsi:type="xsd:string">0</BooleanTypeFalse>
<BooleanTypeTrue xsi:type="xsd:string">1</BooleanTypeTrue>
<GenderFemale xsi:type="xsd:string">F</GenderFemale>
<GenderMale xsi:type="xsd:string">M</GenderMale>
<LanguageEnglish xsi:type="xsd:string">inglese</LanguageEnglish>
<LanguageItalian xsi:type="xsd:string">italiano</LanguageItalian>
</GetConstants2Return>
</ns1:GetConstants2Response>
</soapenv:Body>
</soapenv:Envelope>
Where does the CFCComponentSkeleton comes from?
I thank everybody in advance.
It sounds like perhaps the method was missing. When you hit a CFC and don't pass a method, you get the descriptor - a HTML view of the CFC methods. When you do that with ?wsdl in the URL, it should send the WSDL back. But maybe something is getting in the way. Maybe check your web server logs and see if something odd was passed in the URL. Also look into adding some logging within the CFC as well.