Read RSS feed with Biztalk - rss

Is it possible to import the contents of an RSS feed with Biztalk?
I would like to import the RSS feed and send it to a Send port that put the content into a SQL Server database.
Thanks

You will need to start with an Xml Schema (XSD) that defines the RSS message - take a look at http://rss2schema.codeplex.com/ which defines an RSS 2.0 schema.
You would typically retrieve an RSS feed from a HTTP endpoint by issuing a HTTP GET request and the webserver would respond with the RSS content.
Unfortunately, the BizTalk HTTP Send Adapter (the thing that performs the HTTP request on your behalf) only supports the POST verb and I imagine you will find that the majority of websites won't let you retrieve an RSS feed by using POST.
There does appear to be a few options out there, including using a WCF-Custom Send Port (http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/3d001f89-88e2-4c67-8a54-2ea5a5f7c064/). If this seems like a lot of work, you might simply want to consider writing a WCF Service or Web-Service which would perform the GET Request which you invoke from BizTalk.
Once you have the RSS response message, simply parse and write to SQL using a Send Port configured with the SQL Adapter (or WCF-SQL Adapter).
I imagine that the lack of HTTP GET in the BizTalk HTTP Adapter is why nsoftware wrote its RSS adapter....

Since rss is basically an xml message, and BizTalk provides an HTTP protocol, it would seem reasonably simple.
Create a receive location to retrieve the rss feed
use an orchestration to load the content
Create a send port to connect to sql server to write the content you retrieved.
It's not trivial, but doesn't seem too difficult

Related

Sending Image And Metadata Using Restful - JSON

I am bit new to HTTP/2. I have learned that using HTTP/2 we can send multiple requests to the server without waiting for previous responses. Well I want to send an image file to the server which is large (more then 500 MB). There are following ways as listed here
Base64 encode the file, at the expense of increasing the data size by around 33%.
Send the file first in a multipart/form-data POST, and return an ID to the client. The client then sends the metadata with the ID, and
the server re-associates the file and the metadata.
Send the metadata first, and return an ID to the client. The client then sends the file with the ID, and the server re-associates
the file and the metadata.
I donont want to use first solution because it will increase the file size by 33%. I want to use 3rd solution.
As I am using HTTP/2 so my questions are
Can I send metadata and image simultaneously without waiting for ID from the server ?
If yes, then how can I implement ? Like do I have to do multithreading at server end for a client or how can I associate metadata and image with each other ?
If no then should I go for conventional style of HTTP/1.1 ?
I am using Restful and JSON for communication. More specifically I am using C# command-line client to send image and Asp.Net as server.
You can use multipart/related type to make a request with related mime-types. i.e in your case you can send an image along with a JSON body data.
You can refer Google drive file upload api which has a very similar implementation.

XI52 IBM Websphere DataPower

I have a service like this
MPGW <===> WSP <===> Backend
On the response, I have an attachment which I was expecting the type to be 'XOP' but instead I'm getting 'MIME' . Is there any way I can over ride to XOP?
FYI...when I hit the service directly the back-end (by passing datapower), I'm getting XOP attachment type.
Processing MTOM with SOAP 1.1 is not supported in DataPower so make sure you are using SOAP 1.2.
You need to check if it is the WSP (likely) or the MPGW that is changing the response. This you can do using the Probe.
You can handle the attachments in a MTOM Policy for the service. Also use pass-through if possible for the MPGW to make sure it is not changing the payload.

Third party to PeopleSoft SSO integration

I have to write sign on peoplecode to make a service call by passing token (sent from third party) to API and get the responce (if token is valid responce will have username) in json format to create a PS_TOKEN.
I am fresher to peoplecode. How can I run HTTP POST request by passing token and get the response using Peoplecode?
You would create a synchronous service operation in the Integration Broker. The Integration Broker works best if you are sending XML or JSON. If this is just a regular HTTP POST with fields then it can cause some issues with the Integration Broker. I had a similar case and could not get the basic HTTP Post to work but instead ended up using HTTP POST multipart/form-data and was able to get that to work.
Steps I had to do to make this work.
Create a Message (document based or rowset based are both possible)
Create Service Operation and related objects
Create Transform App Engine to convert the Message to a HTTP POST multipart/form-data
Create a routing and modify the connector properties to send the content type of multipart/form-data. Also call the Transform app engine as part of the routing.
The issue with a application/x-www-form-urlencoded POST is that it seems PeopleSoft does another url encoding after the Transform, which is the last time you can touch the output with code. This final url encoding was encoding the = sign in the form post which made the format invalid.
Your other option would be to write this is Java and call the Java class from within PeopleSoft (or mix the Java objects in with PeopleCode). If you choose to go this way then the App Server needs to have connectivity to your authentication server. My only experience with this is I had a client that used this approach and had issues under heavy load. It was never determined the cause of the performance issue, they switched to LDAP instead to resolve the issue.

In BizTalk 2013 R2, how to create response schema of web api as I need this response in BizTalk orchestration to update some tables in database

In BizTalk 2013 R2, I want to POST JSON request/string to web API. I used WCF-Web Http adapter and JSON decoder/encoder pipeline to create a JSON request. But I am unable to find how to create response schema as I need this response in BizTalk orchestration to update some tables in database. Have anyone worked on it?
As stated in the comments.
Capture the JSON response by having your inbound pipeline initially set the PassThru
Have a Send Port subscribing to the response on the send port and write it to a file
Use the JSON wizard to create a schema from the response file.
Deploy the response schema to BizTalk
Change the inbound pipeline to a custom pipeline with the JSON Decoder.
To Capture the HTTP Status from the REST Service see this article BizTalk Server: REST Services Error Handling. Which involves having the create a custom service behavior to capture the HTTP Status and inject it into the message context property.

SOAP and HTTP Post

I have an ASP.NET web service running that accepts both HTTP POST and SOAP requests. Are there any disadvantages to using a simple HTTP POST to get the data from the WS instead of using SOAP over HTTP?
I can't think of anything else other than the support for transmission of complex data types, and I don't think I'll need that in this project.
Thanks,
Teja.
The clue is in the question...
using a simple HTTP POST to get the data
A POST is not a GET, a GET is a GET.
If you're the only person operating on the WS then it's not a problem as long as you are handling your incoming connections properly. If it is open to outsiders then I would recommend sticking to conventions, they are there to save us from ourselves :)

Resources