cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Receiver with SSL Certificate

Former Member
0 Kudos

Hi All,

Hi have a SOAP Receiver with Certificate scenario.

Question: Do I have to set Security Profile of Service Interface to High?

In all Service Interfaces?

Web Service Owners told me that they have a validation about Security tag in SOAP header, with in PI SOAP message there is no Security tag in XML...

Thanks all.

Regards.

Urtzi.

Accepted Solutions (0)

Answers (2)

Answers (2)

robertot4s
Active Participant
0 Kudos

Hi,

If you have to send some security tags in the SOAP header, you need to:

- Compose the SOAP message in the Message Mapping with the desired tags

- Check the flag "Do not use SOAP Envelope" in the receiver channel. With this option SAP PI doesn't generate an additional SOAP envelope.

Regards,

Roberto

Former Member
0 Kudos

Hi Roberto,

I tried your solution, but, I can create header y mapping with my tags and no more? the other standard tags?

Thanks.

iaki_vila
Active Contributor
0 Kudos

Hi Urtzi,

point to point do you mean with no Integration Process?

This means without PI Integration Server treatment, from my point of view the PI is only used to know that scenario exists but it doesnt partipate actively. http://help.sap.com/saphelp_nwpi71/helpdata/EN/45/6121e75e0b2073e10000000a1553f7/frameset.htm

but i see that your scenario is not of this kind.

I tried your solution, but, I can create header y mapping with my tags and no more? the other standard tags?

You could do with XSL mapping and to put all desired tags.

Regards.

Former Member
0 Kudos

Yes, XSL mapping, but how?

I copy first all Header and then add my own tags at the end? the order is not important?

Any sample?

Thanks!

Regards.

iaki_vila
Active Contributor
0 Kudos

Hi Urtzi,

Check this thread http://scn.sap.com/thread/3245986

You could contruct your <soap:header> directly in XSL mapping putting  all your namespaces directly, the xsl will map all the structure as a constant. Also, you could have a dummy schema in the target side because the PI wont try to validate it.

Don't forget 's advice with the flag in the Receiver SOAP communication channel.

Regards.

robertot4s
Active Participant
0 Kudos

Hi,

This is an XSLT that generates a SOAP Envelope with two securiy tags in the header and copy the payload in the body:

<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

      <xsl:template match="/">

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

                <soapenv:Header>

                     <security_tag>user</security_tag>

                     <security_tag2>pwd</security_tag2>

                </soapenv:Header>

                <soapenv:Body>

                     <xsl:copy-of select="*"/>

                </soapenv:Body>

           </soapenv:Envelope>

      </xsl:template>

</xsl:stylesheet>

Regards,

Roberto

Former Member
0 Kudos

Hi Roberto, Iñaki,

I still with this issue. Target Web Service has some validations

if ( context.Envelope.Body == null )

throw new ApplicationException("The message must contain a soap:Body element");

//if ( context.Addressing.To == null || context.Addressing.To.TargetElement == null )

// throw new ApplicationException("The message must contain a wsa:To header");

if ( context.Addressing.Action == null || context.Addressing.Action.TargetElement == null )

throw new ApplicationException("The message must contain a wsa:Action header");

if ( context.Addressing.MessageID == null || context.Addressing.MessageID.TargetElement == null )

throw new ApplicationException("The message must contain a wsa:MessageID header");

if ( context.Security.Timestamp == null )

throw new ApplicationException("The message must contain a wsu:Timestamp header");

But this nodes does not exist in my SOAP??!?!!?

I have done XSLT:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Addressing>

<xsl:element name="To"></xsl:element>

<xsl:element name="Action"></xsl:element>

<xsl:element name="MessageID"></xsl:element>

</soap:Addressing>

<soap:Security>

<xsl:element name="Timestamp"></xsl:element>

</soap:Security>

<soap:Header>

<xsl:copy-of select="*"/>

</soap:Header>

<soap:Body>

<xsl:copy-of select="*"/>

</soap:Body>

</soap:Envelope>

</xsl:template>

</xsl:stylesheet>

That generate :

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

   <soap:Addressing>

      <To/>

      <Action/>

      <MessageID/>

   </soap:Addressing>

   <soap:Security>

      <Timestamp/>

   </soap:Security>

   <soap:Header>

      <ns1:MT_WS_Request xmlns:ns1="https://87.98.226.28/portal/Ws/Services.asmx">

         <cifEmisor/>

         <cifReceptor/>

         <referenciaFactura/>

         <fechaFactura>0016/04/03</fechaFactura>

         <importeFactura/>

         <formato>5</formato>

         <extensionfichero>PDF</extensionfichero>

         <facturaZipB64/>

      </ns1:MT_WS_Request>

   </soap:Header>

   <soap:Body>

      <ns1:MT_WS_Request xmlns:ns1="https://87.98.226.28/portal/Ws/Services.asmx">

         <cifEmisor/>

         <cifReceptor/>

         <referenciaFactura/>

         <fechaFactura>0016/04/03</fechaFactura>

         <importeFactura/>

         <formato>5</formato>

         <extensionfichero>PDF</extensionfichero>

         <facturaZipB64/>

      </ns1:MT_WS_Request>

   </soap:Body>

</soap:Envelope>

But stil doesn't work...

Any help?

Thanks!

Urtzi.

robertot4s
Active Participant
0 Kudos

Hi,

You can try to test the Web Service with soapUI or another tool and compare the soap message generated with this one.

Regards,

Roberto

iaki_vila
Active Contributor
0 Kudos

Hi Urtzi,

In Sap help documentation about the security profile http://help.sap.com/saphelp_nw72/helpdata/en/55/c5633c3a892251e10000000a114084/content.htm:

This feature is applicable only for point to point communication

Do you go to implement  a point to point communication?

Regards.

Former Member
0 Kudos

point to point do you mean with no Integration Process?

I have one but I think I could use point to point because is SAP-PI-SOAP syncronous scenario.

Regards.