cancel
Showing results for 
Search instead for 
Did you mean: 

Soap connectivity to PI 7.0 version

Former Member
0 Kudos

Hi all,

I am developing a synchronous scenario which flows from webservice to RFC.This is my first webservice scenario and in our project this is the first time we are developing the soap interfaces.Please let me know the steps to establish the connectivity.

we are using soap UI tool in our remote server to test the interface.I tried to trigger the message with the following URL format

http://host:port/XISOAPAdapter/MessageServlet?channel=:sender service:sender channel

Getting blank response after triggering the message in soap UI.In Soap UI log it show

Thu May 21 14:27:49 SGT 2015:INFO:Got response for [MI_PTQBinding.MI_PTQ:Request 1] in 12ms (0 bytes)

Please help me in establishing the soap connection to PI server.And also please let me know do we need to install any certificates if the url has "https".

Thanks,

--Ramya

Accepted Solutions (1)

Accepted Solutions (1)

chaitanya_sudha
Explorer
0 Kudos

Hi Ramya,

Try to open URL in the browser. If it is successfully opened in the browser then check in soap ui, the URL and user credentials and ping PI IP address  from the server where you using soap ui. Still if you getting error then check error logs in soap ui, XPI_inspector and PI NWA logs.

Regards,

Chaitanya.

Former Member
0 Kudos

Hi Chaitanya,

I am able to open URL in the browser.Pinged IP address , I am able to connect to ip.

Please let me know how to get user credentials to connect the Soap URL .I am getting unauthorized error now.

Thanks,

--Ramya

former_member184720
Active Contributor
0 Kudos

The user should have the role "SAP_XI_APPL_SERV_USER" assigned in order to send message to PI.

chaitanya_sudha
Explorer
0 Kudos

Hi Ramya,

Ask basis team to create a user in PI system with below roles and those credentials you need to give to sender to call that service. For now you can test with your user also from soap ui. Please give user credentials in soap ui and test. if you still get error let me know.

1. SAP_BC_WEBSERVICE_PI_CFG_SRV

2. SAP_XI_APPL_SERV_USER

Regards,

Chaitanya.

Former Member
0 Kudos

Hi Chaitanya,

Now I am facing the following error.

<!--see the documentation-->

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

   <SOAP:Body>

      <SOAP:Fault>

         <faultcode>SOAP:Server</faultcode>

         <faultstring>Server Error</faultstring>

         <detail>

            <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">

               <context>XIAdapter</context>

               <code>ADAPTER.JAVA_EXCEPTION</code>

               <text>com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.af.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.af.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Name or password is incorrect (repeat logon)

  at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:455)

  at com.sap.aii.af.ra.ms.impl.core.queue.consumer.CallConsumer.onMessage(CallConsumer.java:134)

  at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:917)

  at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)

  at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

  at java.security.AccessController.doPrivileged(Native Method)

  at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)

  at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)</text>

            </s:SystemError>

         </detail>

      </SOAP:Fault>

   </SOAP:Body>

</SOAP:Envelope>

From whom will we get the RFC user credentials from basis or ABAP?

And I am doing poc on http connection.Using  URL with http is enough or credentials are required.

In brief could you please explain me steps involved in developing webservice to RFC scenarios using both http and https connections with soap ui residing on PI server and on external server.

Thanks,

--Ramya

zameerf
Contributor
0 Kudos

Hi Ramya,

With the above error as response in soapUI, it looks your web service call has reached PI and when trying to connect the receiver system using RFC receiver channel it throws error.

RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.af.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.af.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Name or password is incorrect (repeat logon)

Please check your RFC receiver channel configuration and see if you are using the correct user credentials for connecting target SAP system.

User details should be provided by the SAP Security team.

Regards,

Zameer Farook

chaitanya_sudha
Explorer
0 Kudos

Hi Ramya,

Please check if there are any messages in PI adapter or integration engine. It might be error from PI to ECC system. Please check the connections from PI to ECC system (RFC destination).

Regards,

Chaitanya.

chaitanya_sudha
Explorer
0 Kudos

Hi Ramya,

Please refere below threads,

http://scn.sap.com/people/rahul.nawale2/blog/2006/05/31/how-to-use-client-authentication-with-soap-a...

http://scn.sap.com/thread/3154635

http://scn.sap.com/people/shabarish.vijayakumar/blog/2007/11/07/walkthrough--soap-xi-rfcbapi

The steps as follows.

1. Finalise source structure and import rfc.

2. Finish design in repository and directory (message mapping, operation mapping, receiver determination, interface determination, etc)

3. We can use RFC adapter to connect to ECC system. For better development use proxy and call RFC in proxy code.

4. Create communication user in PI system. Generate WSDL from sender agreement. Provide WSDL with URL and user credentials to sender.

5. Fro HTTP we require URL and user credentials to call web service to PI.

6. For HTTPS we have to provide client certificate.

Regards,

Chaitanya.

Answers (5)

Answers (5)

former_member183816
Active Participant
0 Kudos

After configuring your scenarion in PI.....


Generating WSDL in SAP PI

There are two ways to generate WSDL in SAP PI.

  1. Open IB->Go to Tools-> Display WSDL

Complete the wizard steps and save generated WSDL.

  1. Open Sender agreement of your configuration scenario. Click on Sender agreement-> Display WSDL

 

Note: if it's ICO, use ICO->display wsdl      

Save your WSDL from here.

Providing WSDL to third Party:

Save your WSDL from either of steps, mentioned above and provide it to sender application.

Sometimes third party expects WSDL URL instead of entire WSDL.

Extracting WSDL URL from WSDL:

In above steps a WSDL URL will be generated automatically. But it is recommended to provide WSDL URL in following standard format.

https://<server>:<port>/XISOAPAdapter/MessageServlet?senderParty=<sender party>&senderService=<sender component>&receiverParty=<receiver party>&receiverService=<receiver component>&interface=<outbound service interface>&interfaceNamespace=<interface namespace>

Best way to find your WSDL URL is,

Open your WSDL, find end point URL. It should be within <wsdl:port name>tag, under <soap:address location> tag at end of WSDL.

Replace “/ XISOAPAdapter/MessageServlet?”  Or “/xi/engine” with  “/dir/wsdl?”

And provide this URL to your sender application.

For example, your WSDL end point URL is,

https://abcd.nam.efgh.com:51101/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_XYZ &receiverParty=&receiverService=&interface=SI_AA_XYZ_OUT_Sync_SL&interfaceNamespace=aaa:bb.ccc.com:crm:xyz

So your WSDL URL would be,

https://abcd.nam.efgh.com:51101/dir/wsdl?senderParty=&senderService=BC_XYZ &receiverParty=&receiverService=&interface=SI_AA_XYZ_OUT_Sync_SL&interfaceNamespace=aaa:bb.ccc.com:crm:xyz

Issues while consuming your WSDL in third party application

Authentication failures:

If your PI server is password protected, sender needs to provide credential along with request message.

Otherwise it will give authentication failure as below.

Invalid WSDL:

Your WSDL URL or WSDL is not properly generated. Correct the WSDL or WSDL URL and provide it to sender application.

Otherwise it will give error while importing WSDL or WSDL URL as below.

Inbound Security Checks / Certificate issues:

In sender communication channel there are 3 options for HTTP security level.

It depends on sender application, what level of security it wants to be implemented between sender and PI.

HTTP

Simple HTTP request will be send to PI server.

HTTP doesn’t incorporate any security over outgoing and incoming request and response. It's like sending plain text over internet.
That means any third party can interfere our message. Though it uses encoding techniques like UTF-8 etc. but it can be easily decoded.

HTTPS

HTTPS provide transport level security along with message level security.
Normally it creates a secure session between client and server and transfer request and response message through it in an encrypted format.

HTTPS uses SSL (secure socket layer) certificates to provide security between client and server communication.

In simple language, using certificates means your client knows on which server it's sending data and server knows from which client data is being received. So that it cannot be tampered in between by any third person.

HTTPS always required client side authentication at least. It doesn't matter that you provide it by exporting server certificate or by using self-signed certificate. Depends on your server configuration whether it allows without client authenticated request or not.

There are two options in SAP PI to communicate using HTTPS connection.

HTTPS without client authentication

Sender application needs to trust our WSDL URL in order to communicate with PI.

In this approach client don’t have to authenticate its self to server. Only client needs to know, where it's sending data by exporting server certificate or by using self-signed certificate, if server certificate is not available.
It ensures only transport level security

HTTPS with client authentication

In this approach you need to exchange SSL certificates between client and server. Without authentication between both, communication is not possible and you will get certification or SSL error at sender application.
These certificates are generated and provided by some authentic vendors. You can also create these certificates at client and server application if it allows.
It also ensures message level security if you use digitally signed certificates along with transport level security.
This is the most secured way to communicate over internet.

Former Member
0 Kudos

Thank you all .

My scenario with https connection is working now.

But for http scenario .The following error is coming in soap ui log

Fri May 22 20:11:37 SGT 2015:ERROR:Exception in request: org.apache.commons.httpclient.ProtocolException: The server xxxx.com failed to respond with a valid HTTP response

Fri May 22 20:11:37 SGT 2015:ERROR:An error occured [The server xxxx.com. failed to respond with a valid HTTP response], see error log for details

Fri May 22 20:11:37 SGT 2015:INFO:Error getting response for [MI_xyzBinding.MI_xyz:Request 1]; org.apache.commons.httpclient.ProtocolException: The server xxxx.com failed to respond with a valid HTTP response

Please let me know do I need to maintain any parameter.

Thanks,

--Ramya

chaitanya_sudha
Explorer
0 Kudos

Hi Ramya,

Please change authentication type to " preemptive " from " Global HTTP Settings " in SOAP UI and try again.

Regards,

Chaitanya.

Former Member
0 Kudos

Hi Chaitanya,

Still I am facing the above error.I am getting the above error only for http connections.

Thanks,

Ramya


chaitanya_sudha
Explorer
0 Kudos

Hi Ramya,

Please check soap default settings.

File-->Preferences-->HTTP Settings-->HTTP Version and change the value to 1.1.

Regards,

Chaitanya.

Former Member
0 Kudos

Hi Chaitanya,

By default the version is 1.1.

The url used is in the below format.

http://host:port/XISOAPAdapter/MessageServlet?channel=:sender service:sender channel

Thanks,

Ramya

iaki_vila
Active Contributor
0 Kudos

Hi Ramya,

Are you sure your URL is right?:

http:// <host name> : <port name> /XISOAPAdapter/MessageServlet?channel= <party name> : <service name> : <channel name> . If you have not created a party, enter channel=: <service name> : <channel name> 

Regards.

zameerf
Contributor
0 Kudos

Hi Ramya,

You said you are getting a blank response in SOAP UI, did you check if the web service call from SOAP UI reached PI server? check the status of the sender SOAP channel in PI if it has any error.

Regards,

Zameer

Former Member
0 Kudos

Hi All,

Interface messages are synchronous and the quality of service is best effort.Webservice call did not reach pi and the communication channel is in inactive status eventhough it is active in integration directory.

For https connection which credentials will be given in the soap UI tool for connectivity.

For my scenario do we need to open any ports ?

Thanks,

--Ramya

zameerf
Contributor
0 Kudos

Hi Ramya,

Whether your scenario requires or implemented for https connectivity?

Are you using https in your SOAP sender channel?

If not, check if your SOAP UI tool is inside the same network as PI.

channel in inactive status is normal and will turn green once message hits.

Regards,

Zameer Farook

Former Member
0 Kudos

Hi Zameer,

Soap UI tool is inside the same network as PI.

Please let me know the difference between http and https connectivity.

Present scenario is implemented for https.

And If I use the soap URL for https connectivity how can I get the Username and password for soap URL

Regards,

--Ramya

iaki_vila
Active Contributor
0 Kudos

Hi Ramya,

If you received a blank response may you have set your scenario asynchronous. Check your Interface Messages are sync and your SOAP sender channel is with quality of service Best Effort.

For https connection check the links in this thread https://scn.sap.com/thread/980058

Regards.