cancel
Showing results for 
Search instead for 
Did you mean: 

SuccessFactors configuration using SFSF Adapter

Former Member
0 Kudos

Hi All,



I am working on SAP PI and SuccessFactors integration. so for this I am using SFSF adapter on a receiver side.
I used Eclipse Juno for modeling my receiver channel for entity "JobApplication$301" and got my XSD generated. When I used this XSD to update the fields in SuccessFactors , I observed that instead of "JobApplication$301" I am getting "JobApplication_301" , which is mismatching with the actual name of template in SuccessFactors and giving me an error saying


<ns2:errorMessage>Entity type name 'jobapplication' doesn't allow sub entity!</ns2:errorMessage>

below is the XSD generated for the same from Eclipse Juno tool.

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

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="updateJobApplication_301">

<xs:complexType>

<xs:sequence>

<xs:element minOccurs="1" maxOccurs="unbounded" name="JobApplication_301">

<xs:complexType>

<xs:sequence>


I tried replacing the "_" with "$" in generated XSD but in that case SAP PI is not importing the updated XSD as "$" is not a valid character for XSD definition. I cant do this change in mapping also as this is the part of XSD definition.

What can I do here?  Can you please help me.

Accepted Solutions (0)

Answers (1)

Answers (1)

RaghuVamseedhar
Active Contributor
0 Kudos

Gaurav,

According to XML standards, XML element name can not have $.

XML Elements

Solution 1: - Request SuccessFactors team to rename JobApplication$301 to JobApplication_301 in SuccessFactors.

Solution 2: - After Message Mapping add Java Mapping to replace JobApplication$301 with JobApplication_301 in XML.


package com.map;

import java.io.*;

import com.sap.aii.mapping.api.*;

public class Test_JavaMapping extends AbstractTransformation {

    @Override

    public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput) throws StreamTransformationException {

        try {

            InputStream inputstream = transformationInput.getInputPayload().getInputStream();

            OutputStream outputstream = transformationOutput.getOutputPayload().getOutputStream();

            // Copy Input content to String. 

            byte[] b = new byte[inputstream.available()];

            inputstream.read(b);

            String input = new String(b);

           

            input = input.replace("JobApplication$301", "JobApplication_301");

            outputstream.write(input.getBytes());

        } catch (Exception exception) {

            getTrace().addDebugMessage(exception.getMessage());

            throw new StreamTransformationException(exception.toString());

        }

    }

}