cancel
Showing results for 
Search instead for 
Did you mean: 

URL for C4C Demand Assignment Replication In via CPI

bodo_koerner
Participant
0 Kudos

In a integration scenario with C4C and CPI we use
Replicate Assignments for Demands from External System
The URL given by the C4C Communication arrangement is:
https://myxxxxx.crm.ondemand.com/sap/bc/srt/scs/sap/demandassignmentreplicationin

Trying this URL in Browser or with CPI from SOAPUi fails.

Inside CPI I can see the request error log:
Outbound processing in endpoint at https://myxxxx.crm.ondemand.com/sap/bc/srt/scs/sap/demandassignmentreplicationin failed with message "SoapFault:faultstring=Error writing to XMLStreamWriter.; faultcode={http://schemas.xmlsoap.org/soap/envelope/}Client", caused by "SunCertPathBuilderException:unable to find valid certification path to requested target"

What is the right URL to the Service in C4C ?

Accepted Solutions (1)

Accepted Solutions (1)

bodo_koerner
Participant
0 Kudos

It seems that the users password was locked. After changing this we got access to the inbound Message but now leading to an error in C4C: XSLT exception at offset 153 , XPath ns1:DemandAssignmentMassRequest(1)MessageHeader(1)CreationDateTime(1)

Seems the timestamp sent was not in the right format with time zone.

Answers (3)

Answers (3)

bodo_koerner
Participant
0 Kudos

After loading the certificates of cpi and changing to basic authentication C4C receives the Request for demand assignment.
Inside the payload the sending and receiving system was required.
Message header....
<SenderParty> <InternalID schemeAgencyID="310" schemeID="CommunicationSystemID">VISITOURVIAHCI</InternalID> </SenderParty> <RecipientParty> <InternalID schemeAgencyID="310" schemeID="LocalSystemID">0M25TKD</InternalID> </RecipientParty>

But even without any error we can't see any assignment in C4C.
The whole payload was:

"<ns1:DemandAssignmentMassRequest xmlns:ns1="http://sap.com/xi/SAPGlobal20/Global"> <MessageHeader> <ID>55678</ID> <CreationDateTime>2018-03-07T00:00:00Z</CreationDateTime> <SenderParty> <InternalID schemeAgencyID="310" schemeID="CommunicationSystemID">VISITOURVIAHCI</InternalID> </SenderParty> <RecipientParty> <InternalID schemeAgencyID="310" schemeID="LocalSystemID">0M25TKD</InternalID> </RecipientParty> </MessageHeader> <DemandAssignmentRequest> <BasicMessageHeader/> <DemandAssignmentRequest> <TicketItem> <ItemUUID>00163e10-b464-1ee8-88be-de7590cb7c73</ItemUUID> <ItemAssignment> <AssignmentUUID>55678</AssignmentUUID> <ResourceID>18</ResourceID> <StartDateTime timeZoneCode="CET">2018-02-22T18:33:00Z</StartDateTime> <Duration unitCode="min">22</Duration> <Description>5870</Description> </ItemAssignment> </TicketItem> </DemandAssignmentRequest> </DemandAssignmentRequest> </ns1:DemandAssignmentMassRequest>"

Maybe something is missing ?

bodo_koerner
Participant
0 Kudos

Hello Satya,
in Inbound channel of C4C the following URL is given:
https://myxxx.crm.ondemand.com/sap/bc/srt/scs/sap/demandassignmentreplicationin
when I download the wsdl from C4C Inbound and import this to SOAPUI i found the URL:
https://myxxx.crm.ondemand.com/sap/bc/srt/scs/sap/demandassignmentreplicationin?sap-vhost=myxxx.crm....
When I start a request with the valid credentials in SOAP UI I receive a "Logon Error Message" Logon failedFrom http log I can see
Wed Feb 28 14:12:26 CET 2018:DEBUG:<< "HTTP/1.1 401 Unauthorized[\r][\n]"
When call the webservice we made in CPI inside CPI the connection to C4C gives a response with

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Error writing to XMLStreamWriter.</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>

In C4C Message Monitoring I find:
Error Details
org.apache.cxf.binding.soap.SoapFault: Error writing to XMLStreamWriter., cause: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Deeper in the LOG of this Message i found:

An error has occurred in CXF Outbound Request:
StartTime = Wed Feb 28 13:14:33.943 UTC 2018 Status = FAILED ChildCount = 12
Error = Outbound processing in endpoint at https://myxxx.crm.ondemand.com/sap/bc/srt/scs/sap/demandassignmentreplicationin?sap-vhost=myxxx.crm.... failed with message
"SoapFault:faultstring=Error writing to XMLStreamWriter.; faultcode={http://schemas.xmlsoap.org/soap/envelope/}Client", caused by "SunCertPathBuilderException:unable to find valid certification path to requested target"

Where is the solution ?

bodo_koerner
Participant
0 Kudos

Could change this message to:
Message processing failed.

Error Details

org.apache.cxf.interceptor.Fault: Could not send Message., cause: org.apache.cxf.transport.http.HTTPException: HTTP response '401: Unauthorized' when communicating with https://myxxx.crm.ondemand.com/sap/bc/srt/scs/sap/demandassignmentreplicationin?sap-vhost=myxxx.crm....

The user in C4C is given by C4C Communication Arrangement. This user has a Password and the client cert of CPI.
The same user on CPI included in an artifact has this password and the client certificate of C4C

manideepsatya
Advisor
Advisor
0 Kudos

Hello Bodo,

Are you getting the same error when you simulate this via SOAP UI?

@HCI : Ensure that you upload the HCI certificate chain in C4C and configure the communication channels properly

This is the correct url - you can validate this by checking communication arrangement.

Regards,
Manideep Satya