I have a java webapp that exposes several webservice endpoints that appear to be behaving slightly differently under different deployments.
Were using IBM Websphere 6.1 in all environments.
The namespace on the requests that the service expects differs whether I deploy the ear locally or on the test env - i.e.
Test Env Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:look="http://com.XXXX.bi/lookup">
<soapenv:Header>
<look:Password>XXXXX</look:Password>
<look:Username>XXXXX</look:Username>
</soapenv:Header>
<soapenv:Body>
<look:Lookup>
<Role>Admin</Role>
<ID>AB1234</ID>
<Name>Bob Smith</Name>
<DOB>1901-01-01</DOB>
</look:Lookup>
</soapenv:Body>
</soapenv:Envelope>
Local Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:look="http://com.XXXX.bi/lookup">
<soapenv:Header>
<look:Password>XXXXX</look:Password>
<look:Username>XXXXX</look:Username>
</soapenv:Header>
<soapenv:Body>
<look:Lookup>
<look:Role>Admin</look:Role>
<look:ID>AB1234</look:ID>
<look:Name>Bob Smith</look:Name>
<look:DOB>1901-01-01</look:DOB>
</look:Lookup>
</soapenv:Body>
</soapenv:Envelope>
Both the services on each environment function correctly and in the same manner.
The WSDLs are both identical.
I'm pretty sure this is going to end up being a Websphere config issue as I'm deploying the same ear in both circumstances, but I cant spot any differences between the envs.
Anyone got any ideas what I would need to change?
Thanks
Related
Can you please let me know how to do a Java SOAP webservice (JAX-WS) call. For example , I want to send below headers to the url https://example.com/eai_enu/WSSOAP=1 and get the response. Sharing an example code will be really helpful. Thank you in advance.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://siebel.com/WebService">
<soapenv:Header>
<UsernameToken xmlns="http://siebel.com/webservices">XXXXXXX</UsernameToken>
<PasswordText xmlns="http://siebel.com/webservices"></PasswordText>
<SessionType xmlns="http://siebel.com/webservices">Stateless</SessionType>
</soapenv:Header>
<soapenv:Body>
<web:QuerySR_Input>
<web:SRNum>450545194</web:SRNum>
</web:QuerySR_Input>
</soapenv:Body>
</soapenv:Envelope>
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
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
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 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.