Showing posts with label Oracle Sales Cloud. Show all posts
Showing posts with label Oracle Sales Cloud. Show all posts

Friday, April 8, 2016

Oracle Sales Cloud: Getting around OSC’s WSDL parsing , Siebel UCM


Recently working on getting Oracle Sales Cloud integrated to Siebel UCM for Accounts. Oracle Sales Cloud can read a WSDL specification from a URL, but you still have to build the request message using Groovy script (would be nice to shoot whoever designed this). So you have to use Groovy script and write a global function to build up the message. Turns out, you can only add elements and attributes to the message which is already in the parsed WSDL. Nothing new can be added. © 2016

The problem here is that for integrations to Siebel UCM, a hidden attribute named ExternalSystemId has to be populated in the incoming message. This attribute is not in the WSDL when it gets generated from Siebel UCM. But it has to be sent in the SOAP request (would also be nice to shoot whoever designed this).  © 2016

Error invoking service 'UCM Transaction Manager', method 'SOAPExecute' at step 'Transaction Manager'.(SBL-BPR-00162)
<?> Failed to find ExternalSystemId in input message(SBL-IAI-00436)


This is what you get when you consume the UCM WSDL in SOAP UI.


The actual message has to be (see highlighted changes) © 2016



If you add the groovy script to add this attribute, OSC will simply ignore it, and the attribute is not send to UCM. The only viable workaround is to Edit the WSDL AFTER it is generated, but BEFORE it is given to Sales Cloud !  © 2016

1: Generate the WSDL from UCM.

2: Open it in an XML editor , use XMLSPY if you have it. © 2016

3: Find the definition of the top container element int the WSDL: © 2016


4: Add this text (highlighted) : © 2016


<xsd:attribute name="ExternalSystemId" type="xsd:string"/>

5: Now validate, save and upload this WSDL to your public folder from where OSC can read it. OSC does not consume WSDLs, but reads the definition on the fly. © 2016

6: Now add the groovy script to populate this new attribute with the registered SystemId Name.


Phew !!


© 2016© 2016

Wednesday, March 2, 2016

.NET : No endpoint element matching this contract could be found in the client element


If you are using .NET and trying to integrate to Oracle Fusion Cloud service, any service, HCM,Sales Cloud, Service Cloud.., after consuming the WSDL and writing the first bits of code, you will get to this error:

Could not find default endpoint element that references contract ….' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.


You will get the error wether you try importing as Web Reference or Service Reference. The reason for this is that even after successfully consuming the WSDL, .NET does not add the end point configuration into the app.config file.


1: Possible workaround: When you write the code to create the client object, (SalesCloud account, in my case), instead of going with the default no parameter initialization,  add parameters for Binding and


VB.NET : Add this code to your project source:

Public Class UsernameTokenOverSslBinding : Inherits CustomBinding
    Public Sub New()
    End Sub
    Public Overrides Function CreateBindingElements() As BindingElementCollection
        Dim bindingElements As BindingElementCollection = New BindingElementCollection
        Dim messageEncoding As MtomMessageEncodingBindingElement = New MtomMessageEncodingBindingElement
        messageEncoding.MessageVersion = MessageVersion.Soap11
        Dim transport As HttpsTransportBindingElement = New HttpsTransportBindingElement

        Return bindingElements.Clone()
    End Function
End Class


C# .NET: Add this code


 public class UsernameTokenOverSslBinding : CustomBinding     {         public override BindingElementCollection CreateBindingElements()         {
            BindingElementCollection bindingElements = new BindingElementCollection();             bindingElements.Add(SecurityBindingElement.CreateUserNameOverTransportBindingElement());             MtomMessageEncodingBindingElement messageEncoding = new MtomMessageEncodingBindingElement();             messageEncoding.MessageVersion = MessageVersion.Soap11;             bindingElements.Add(messageEncoding);             HttpsTransportBindingElement transport = new HttpsTransportBindingElement();             bindingElements.Add(transport);             return bindingElements.Clone();         }     }
Now pass this class object as the first parameter to your Interface Object Initialization.
Example: Previous code:
Dim accountclient As New OSC.AccountServiceClient()
New code

Dim endpointAddress = New EndpointAddress(New Uri("URL”))  ‘ give the url here.
Dim accountclient As New OSC.AccountServiceClient(New UsernameTokenOverSslBinding(), endpointAddress)


…And thats it ! The object will now be able to connect to the server via a webservice call.

2: Possible workaround:  The other possible workaround is to add these lines to app.config file.




Any of these workarounds, and you should start seeing the response object:


Siebel IP 18 - 2018 SOD

Oracle is going ahead and staying with Siebel. For now. They have just released the statement of direction for IP 2018. At a high level th...