in WSO2 publisher, I get error when I import wsdl with basic authentication. Is there any solution? - soap

in WSO2 publisher, I get error when I import wsdl with basic authentication. Is there any solution?
wso2 wsdl validator cannot validate this wsdl file. but it is valid! I guess it has schema in its types that has basic authentication too.
Is there any way to import this .wsdl file and soap API to WSO2?
I got error when adding wsdl file that have basic Authentication

If the WSDL file is basic auth protected, API Publisher is not able to retrieve the WSDL file. You have following options.
Download the WSDL file and provide the file to the API publisher
Host the WSDL file in a public location(Github) and provide the URL to the API Publisher
As WSDL file is basic auth protected I recommend to go with option 1 as you only download the file to your local machine and you don't share the file with the others.

Related

How can I delete API as active subscriptions?

I am trying to test wso2 if I can turn my soap to rest api. I follow the tutorial on youtube video call "Creating a REST API with a SOAP Back end with WSO2 API Manager". First I give full working wsdl link and I test it and get information that my wsdl is valid. But in API definition I couldnt see all my operation POST. But I continue to follow the video and subscribe my work. But I couldnt work or delete my work on store becuse I keep getting "How can I delete API as active subscriptions?" eror. How can I delete my api from active subscriptions?
Update:
The content the WSDL is saved as a resource in the /system/governance/apimgt/applicationdata/wsdls registry location. API artifacts have a dependency to this resource. Its original service address is reset to the API Gateway's address to prevent direct calls to the service endpoint. The registry permalink of the WSDL resource is shown in the API Store and users can download and create a service out of it.
How can I download and create a service my self?
Update:
In the API Subscribe secon on below under the POST I get this information, why XML cannot be generated?
<?xml version="1.0" encoding="UTF-8"?>
<!-- XML example cannot be generated -->

issue in using mock service as partner link in SOA BPEL11g

I have created one Mock service in SOAPUI which I want to use as partner link in my bpel. I just have simply added one invoke activity which calls that partner link .But when I am trying to deploy the code I am getting the below error:
here was an error deploying/undeploying composite on soa_server1: Update Failed: ****Unable to find a WSDL that has a definition for service {http://xmlns.oracle.com/RLG_NEW/TestMockRest/BPELProcessMock}bpelprocessmock_client_ep and port BPELProcessMock_pt. Please make sure that the port attribute for the binding defined in the composite file is correct by checking the namespace service name and port name. In addition check that the WSDL associated with the binding namespace is imported and currently reachable (check the import nodes at the top of the composite file). Finally validate the HTTP proxy settings for the server..****
The mock service endpoint is opening properly in my browser and able to hit the same from SOAPUI as well.
Please suggest.
Thanks,
Sreeparna
When you try to invoke the partner link, under the Partner role webservice interface, if you can access to all the methods available in Operations then your partner link is in sink with BPEL,
So try to access the operations and if it responds then your build should be success.

WSO2 API Manager - How to proxy a SOAP Service that has a basic Auth

Using wso2 api manager. I cannot publish an existing SOAP service that has a basic auth (in the back end). The publisher interface let you insert the wsdl location, but obviously it requires a basic auth (in fact i have a 401 error in the log).
I tried to put username and password in the url like https://username:pwd#server... but it does not work.
Thank you

debug rest call in wso2 api manager

I am connecting rest api call with wso2 api manager. I followed the steps from wso2 site
I am able to connect with rest api on my computer but following same procedure on another computer returns "Error: No Response from Server"
I had also configured the files as described here
Does anybody knows how to debug what is going wrong there ?
You can enable wirelogs and headers in API Manager to analyze the request response flow.
Open log4j.properties file in /repository/conf directory.
Uncomment the following loggers.
log4j.logger.org.apache.synapse.transport.http.headers=DEBUG
log4j.logger.org.apache.synapse.transport.http.wire=DEBUG
Save the changes and Restart the Server
Invoke the API.
Regarding your "Error: No Response from Server" response, other than the CORS issue, this can occur due to browser certificate issue as well.
Therefore, first check whether you can invoke the same API using a rest client like curl,
if yes
go to your browser, accept the certificate for the gateway URL and try out invoking the API again.

WSO2 ESB-4.8.1 connecting to WSO2-5.0.0 IS and UserInformationRecoveryService?wsdl

I am trying to connect WSO2 Identity Server to the WSO2 ESB. I have installed both products to my local computer and have configured them to run simultaneously. WSO2-IS has an offset of 1 and I set hostnameverifier to AllowAll. Given that both are on my local machine, I did not see the need to adjust or set anything in the Keystore. In WSO2-IS I have exposed the admin-wsdl's.
What I am trying to do is create an endpoint wsdl that points to
https://localhost:9444/services/UserInformationRecoveryService?wsdl (which is in the WSO2-IS).
In the admin console, I add the endpoint with the variables
1. The Name is UserInformationRecoveryService
2. The URI is https://localhost:9444/services/UserInformationRecoveryService?wsdl
3. The Service is UserInformationRecoveryService
4. The port is 9444 (which is the offset from 9443)
When I test this service, it says it is valid. When I add it, it disappears and I get the errors:
[2015-01-16 17:59:20,923] ERROR - WSDL11EndpointBuilder Couldn't retrieve endpoint information from the WSDL.
[2015-01-16 17:59:20,924] ERROR - WSDLEndpointFactory Couldn't create endpoint from the given WSDL URI : Couldn't retrieve endpoint information from the WSDL.
org.apache.synapse.SynapseException: Couldn't retrieve endpoint information from the WSDL.
at org.apache.synapse.config.xml.endpoints.utils.WSDL11EndpointBuilder.handleException(WSDL11EndpointBuilder.java:199)
... (I removed many of the other at's)
I also tried adding it as a wsdl proxy, but receive the error
Couldn't create endpoint from the given WSDL URI : Couldn't retrieve endpoint information from the WSDL.
and the errors:
[2015-01-16 18:06:49,890] ERROR - ProxyServiceAdminClient Couldn't create endpoint from the given WSDL URI : Couldn't retrieve endpoint information from the WSDL.
org.wso2.carbon.proxyadmin.stub.ProxyServiceAdminProxyAdminException: Couldn't create endpoint from the given WSDL URI : Couldn't retrieve endpoint information from the WSDL.
at org.wso2.carbon.proxyadmin.ui.client.ProxyServiceAdminClient.addProxy(ProxyServiceAdminClient.java:105)
at org.apache.jsp.proxyservices.template_005fwsdl_002dbased_jsp._jspService(org.apache.jsp.proxyservices.template_005fwsdl_002dbased_jsp:343)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
I am relatively new to the WSO2 suite, and have been unable to find many discussions on these two products working together.
From what I have read, WSO2-IS uses SOAP. The client that we are developing will be using REST. The ESB is to connect the client to WSO2-IS and convert SOAP-TO-REST.
My question is
1. Why do I receive these errors?
2. What is the best practice to connect the two services.
Thank you.
Enable option in carbon.xml and try your wsdl link in a browser and see whether you can access it or not.(All admin services's wsdls are hided) Later try to create proxy.
After more reading, I found that I was using the wrong port name. I was assuming the port was 9444, but having reread the wsdl again, I found that the ports were called
wsdl:port name="UserInformationRecoveryServiceHttpsSoap11Endpoint"
wsdl:port name="UserInformationRecoveryServiceHttpsSoap12Endpoint"
wsdl:port name="UserInformationRecoveryServiceHttpsEndpoint"