I have an asmx web service running in a Web Role in a Windows Azure cloud application. I want to user the Windows Azure scheduler to call this service on an hourly basis. I am able to create the job but everything I have tried in the URI results in an error.
I can call the same web service successfully from a web page using ajax using a URI such as :
http://www.example.com/myservice.asmx/TheFunction
but this form returns an error (when I use either a GET or a POST):
Request format is unrecognized for URL unexpectedly ending in '/TheFunction'.
Can anyone advise what format this URI should take?
Thanks
Don't know if this will help, but our team found that if you're using the brand new Management screens from the Azure Portal to do this, you can only set the URL and the Content, but you don't appear to have access to the request headers.
We were calling into an MVC application, and found that we need to add a header variable (Content-type: application/x-www-form-urlencoded) in order for our Router / Controllers to pull the associated POST arguments. We're looking at using the API to create the job instead, as there appears to be control over the headers using this method.
See the "headers" argument within the
Create Job Method in the Scheduler API.
Related
I am trying to integrate the single sign on for my application running on Google app engine platform.
I am using SAML 2.0 protocol to get this done. My organization already have the identity provider using LDAP, which configured in such a format (https://sso-companyname/appname). For this configuration, its took following details
XML metadata for their assertion consumer service (ACS) (https://www.google/companyname/a/acs),
a list of the LDAP attributes to be sent (email),
which attribute is to be used as the subject of the assertion (company enterprise id),
the RelayState URL at the relying party site to send the user after the SAML Response assertion has been validated, (application target URL form GAE deployment. like (https://appname-dot-projectid.appspot.com)
a short name (less than 7 characters) of the application to be used in the URL, (given as app name)
According to this configuration, the ACS is not for a particular GAE application, so I am getting 400 error from the google server.
Can some one help me on how to create ACS for a single GAE application and would able to explain the SSO for GAE web application would be grateful.
The web application using Python jinja2 frame-work for the UI, webapp2 for the routing. It will call the google-big-query to populate the data to UI, currently, it is using Python standard environment of GAE, and OAuth 2 method to authenticate and call the big-query API to get data. So some people don't have the GCP/Project access, doesn't able to view the data. to resolve this we trying to implement SSO on top of the application.
I think the easiest way to integrate GAE with SSO/SAML is to use Google Identity Platform (GIP) which uses Firebase under the hood. This lets you use the firebase-admin Python package to easily interact with JWTs, and lets you use the GIP console to set up an SAML server.
I'm new to WSO2 products, I know while integrating BPS with ESB, we require the service of deployed Process
so My Question is:- Where to Find Web Service of Deployed BPM.
Deploying a BPM does not result in a Webservice, one or more processes will be deployed instead. You can find these under processes in the BPMN explorer https://[wso2server]:[port]/bpmn-explorer or they can be accessed through the BPMN rest API REST API Documentation.
If you want webservices that implement processes you should probably go with (WS-)BPEL. BPEL Reference
If you want to start/control the process from your webpage you can use the rest API. To start a process using the API you would send a POST request to the following URL:
https://<Host Name>:<Port>/bpmn/runtime/process-instances
This will create a new instance of the process you have specified in the Request body. All you need to put in the body to create the instance is either the processDefinitionId or processDefinitionKey (you can find both in the BPMN-explorer mentioned above). There are other, optional variables as well as the option to create your instance based on a message but this last option is not recommended.
{
"processDefinitionKey":"sampleJavaServiceTask"
}
For more info on this, check out the link to the BPMN REST API
I have a web reporting tool lets say Business Objects, Cognos, OBIEE, Crystal Reports. I want to display some data into the report which is coming from a Web Service. So i copy paste the Web service URL inside the report cell and i can access the data.
However this leaves a big security issue as i cannot authenticate the requestor. One thing which i can think of is checking the Http header request: referer property which is set by the reporting tool in my Web Service. This atleast ensures that the request has originated from my Reporting Application. Besides this i cannot see how i can authenticate a specific user.
Appending Username in the Web Service URL is also not an option because one report is used by many users. I would somehow want to access this specific user session and associate the web service request with this user session. Lets say both my Web Reporting tool and web service are running on the same Web Application Server. Is it possible to merge the Web Service Provider and my Reporting Application so that the session user name is available in the WebService ?
How can i use StatisticsAdmin of Application Server
My scenario is : i want to get responsetime of a service that deploy on a server(AppServer/DataServer..) and probed by ESB using discoveryproxy of governance regidtry. if is it possible how can i implement it? otherwise i should be get service response time from AppServer in direct using service name. i can create a proxy of ServerAdminMBean using this package and interface
import org.wso2.carbon.server.admin.service.ServerAdminMBean
but i need to use attributes and method of StatisticsAdmin type. how can i implement it?
you dont need to do your own implementation. it is already in the service statistics page.
You can find the service stat details in the monitor-->System Statistics page. If you need more fine grained details about your service,you might need to integrate BAM with AS.
Once you deploy any service, there's a log message prints in server back end console.(you may noticed that before). That message handled by the "LoggingAdmin" admin service. In that admin service there's a operation called "getSystemLog" and this operation sends all log messages one by one. you can create simple java class to call that admin service and get the deployed time stamp of each of the service you are deployed. if you know the service deployment start time, with above admin service you can get time taken to each of the service deployment.
You can use JMX to access those information. There is StatisticAdmin MBena available for monitoring in . You can refer this to get an idea how to invoke them using Java.
I implemented a batch job which makes a webservice call within the same salesforce instance, which then is supposed to send emails with a pdf attachment,
since you cannot send pdf attachments directly from a batch job. My webservice call looks like this:
public static void callOut(List ids){
InvoiceAttachmentConnector.InvoiceAttachmentService ws = new InvoiceAttachmentConnector.InvoiceAttachmentService();
ws.SessionHeader = new InvoiceAttachmentConnector.SessionHeader_element();
ws.SessionHeader.sessionId = UserInfo.getSessionId();
ws.handleInvoicePdfAttachment(ids);
}
However in batch jobs UserInfo.getSessionId() returns null, therefore i get a INVALID_SESSION_ID exception.
How can i log in to get a SessionId? So far I found no solution to login from salesforce to salesforce. If u can help I would appreciate it! Thanks!
You cannot get a session Id like this in batch apex as it runs under the system context and so has no specific user info for retrieval.
UPDATE:
You have the following options:
Try running the web services wsdl from your Salesforce org through the wsdl to apex generator in your org to generate some classes that may allow you to login. You are only allowed one web service request per execute call.
You could create a sites page that you make a HTTP get request to in your batch apex. This needs to retrieve the Ids of the items you want to send the PDFs for and a particular user to run as for you to use the System.runAs(user) method. You could pass these parameters in the HTTPRequest header or in a custom setting.
Note that neither of these solutions are ideal, you may want to reconsider why you are using Batch apex first of all and see whether you could reimplement it in a different way.