cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Receiver - Service Number

silentbull
Participant
0 Kudos

Hi,

I have a proxy to HTTP scenario. I have been given by external party with a url along with portnumber.

Do i need to enter the portnumber as service number or is it something different? They have given two ports one for http and another for https.

Alternatively if i use http destination, in the service number i need to give port number right?

With this assumptions I had configured and made test connection and got http 400 bad request error. Can i assume that the http server has been pinged successfully as only 400 bad request came or did the connection not successful at all.

Regards

Sam

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Sam,


Alternatively if i use http destination, in the service number i need to give port number right?

Yes, it's the same the port number and the service number.

That error seems the receiver http server can't understand your request, something in the http structure or the payload is wrong.

You can try with an external tool to test or to ask the endpoint managers for one example

Regards.

silentbull
Participant
0 Kudos

Hello Inaki,

Thanks for the reply. I am using PI 7.0 only.

Also, while doing a test connection using tcode sm59, there is no way you can specify the payload. For this normally you should get successful ping test , instead it is coming http 400 bad request. This is where I got confused?

Regards

Sam

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Sam,

It means that the ping is successful but the request was not understood (after all the HTTP Body is empty). So I believe the connection is already working.

Regards,

Mark

silentbull
Participant
0 Kudos

Thanks Mark,

The external party mentioned us to send data in enctype="multipart/form-data". Where do i mention this in the adapter.

Also, they mentioned that the server required three input parameters, although I believe those will be extracted from the XML payload.

Is this possible in normal http receiver channel?

Regards

Sam

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Sam,

The HTTP Adapter supports parameters (I think up to six). As for the multi-part type, as long as it is in the HTTP Body, it should be possible to build it using Java Mapping.

Regards,

Mark

silentbull
Participant
0 Kudos

Hello Mark,

So, are you saying that unless we use Java mapping, it is not possible to send it via normal HTTP ReceiverAdapter. What exactly does multi-part type mean ?

The reason being asked is that I am unable to send the message even in any normal HTTP client as all of them gave the same 400 request error.

Regards

Sam

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Sam,

It looks like you have to use SOAP Adapter with the "Do Not Use SOAP Envelope Checked"

I have never really tried this though. Java mapping will be used since the HTTP Body would be non-xml.

As for the 400 request, have you tried in the SMICM logs to see what is the cause of the error?

Regards,

Mark

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi Sam,

Check in the ICM trace if you have additional information (SMICM transaction->Go to...)

I dont think that this note will be your problem, but it can help you to start to research the problem: 1759226 - HTTP 400 Request too big in PI

Regards.

silentbull
Participant
0 Kudos

Hello Mark/Inaki,

With the traces, these are the only thing i found.

HttpPlugInHandleNetData: server: premature EOS (0/0) in request [http_plg_mt. 2005]

HttpPlugInHandleNetData: server: premature EOS (0/0) in request [http_plg_mt. 2005]

Just thinking, is it because i have not configured yet the response as the http server sends a response as well which i have not captured.

I will try SOAP adapter and update.

Update: Tried with SOAP adapter by checking 'Do not use SOAP Envelope'.

XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 400 Bad Request is the error.

Regards

Sam

iaki_vila
Active Contributor
0 Kudos

Hi Sam,

If you have connectivity locally with the endpoint you can test the http call with the next html code: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/66dadc6e-0a01-0010-9ea9-bb6d8ca48...

In this way you can test at least that the request is right, in the worse case you can do a java mapping to create the same request as Mark said, but first you need to know how is the exact call. Try to contact with the endpoint administrators to get a http call example.

Regards.

silentbull
Participant
0 Kudos

Hello Inaki,

I got an example html web form sent by the third party where it uploads the data to the server. I had tested and it works fine. Since in the manual method, you need to key in the input parameters and upload the xml file using the browse and submit button.

I was under the assumption that in automated method, the xml payload will automatically uploaded to the server since the header xml had the exact two parameters and the actual file as data.

The example form has two input parameters and one XML file upload button.  I am pasting that html code here

<html>

  <head>

    <title>Simple form for pushing a feed</title>

  </head>

  <body>

    <h1>Simple form for pushing a feed</h1>

    <form enctype="multipart/form-data" method=POST

      action="http://<APPLIANCE-HOSTNAME>:19900/xmlfeed">

      <p>Name of datasource:

        <input type="text" name="datasource">

        <br>

        (No spaces or non alphanumeric characters)

      </p>

      <p>Type of feed:

        <input type="radio" name="feedtype" value="full" checked>

        Full

        <input type="radio" name="feedtype" value="incremental">

        Incremental

        <input type="radio" name="feedtype" value="metadata-and-url">

        Metadata and URL

      </p>

      <p>

        XML file to push:

        <input type="file" name="data">

      </p>

      <p>

        <input type="submit" value=">Submit<">

      </p>

    </form>

  </body>

</html>

Regards

Sam

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Sam,

Are you testing this via SOAP UI? Can you share to us a screenshot of the raw screen? I was looking for a free webservice that accepts multi-part documents and did not find any.

Regards,

Mark

silentbull
Participant
0 Kudos

Hi Mark,

I tried many online tools and could not find one which uses multi-part.

We finished our scenario by asking them to make a web service approach and use via SOAP adapter with the option of 'Do not use Envelope'. It is working fine now.

Regards

Sam

Former Member
0 Kudos

Hi Sam,

In the HTTP Channel you need to fill in the following Parameters.

Target URL : .....

Tick Configure User Auth : X

SOAP Action : ....

The URL you can just past into the Target URL. You can leave the port in just make sure that your network guys have opened all the necessary ports and IP's.

Also make use of SoapUI tool that is free on the net if you need to test the URL outside of PI.

And also try to stay with HTTPS, it is more secure and would be PCI compliant.

Also please provide a screenshot of the channel with the IP's blacked out.

Regards,

Jannus