Clarity

Expand all | Collapse all

GEL - possible SSL error?

  • 1.  GEL - possible SSL error?

    Posted 01-22-2013 08:00 AM
    Hi,

    I have a process with a GEL script contained within. The script should XOG in a list of Resources from an Excel spreadsheet however I'm hitting an error very early on which I think might be related to our environment running SSL or possibly just some syntax error on my part in setting up my XOG connection params

    Seperate note - we have current issue whereby the cert for our Dev environment is not named correctly (ie doesn't match the hostname) which I've been told will mean I cannot run my code from the cmd prompt. However I believe it should work if executed within a process (please correct me if wrong)

    The actual error I'm getting back after excuting the process is as follows:
    [XOG]XOG failed: org.apache.commons.jelly.JellyTagException: null:50:59: <soap:invoke> Failed to send a SOAP message generated to 'https://sw610niku:8043/niku/xog'.HTTPS hostname wrong: should be <sw610niku>
    The error appears to be relating to the invoke SOAP part of the script.

    Snippets of code (I can provide more if required however I think these are the important bits relating to the error)
    <!-- *****************************************************************
    < 1 Establish GEL   
    < ***************************************************************** -->
    <gel:script 
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:core="jelly:core" 
    xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary" 
    xmlns:file="jelly:com.niku.union.gel.FileTagLibrary" 
    xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary" 
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:sql="jelly:sql" 
    xmlns:xog="http://www.niku.com/xog" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    
    <gel:parameter var="p_XOGURL" default="https://sw610niku:8043"/>
    <gel:parameter var="p_XOGUsername" default="admin"/>
    <gel:parameter var="p_XOGPassword" default="changeme" secure="true"/>
    <!-- *****************************************************************
    < 4 Invoke SOAP 
    < ***************************************************************** -->
    <gel:out>[XOG]Logging into Clarity XOG at ${p_XOGURL}.</gel:out>
    <gel:log level="INFO" category="XOG">Logging into Clarity XOG at ${p_XOGURL}.</gel:log>
    <core:catch var="v_xog_exception">
    
    
    <soap:invoke endpoint="${p_XOGURL}/niku/xog" var="auth">
    
    
    
    <soap:message>
    
    
    
    
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
    
    
    
    
    
    <soapenv:Header/>
    
    
    
    
    
    <soapenv:Body>
    
    
    
    
    
    
    <xog:Login>
    
    
    
    
    
    
    
    <xog:Username>${p_XOGUsername}</xog:Username>
    
    
    
    
    
    
    
    <xog:Password>${p_XOGPassword}</xog:Password>
    
    
    
    
    
    
    </xog:Login>
    
    
    
    
    
    </soapenv:Body>
    
    
    
    
    </soapenv:Envelope>
    
    
    
    </soap:message>
    
    
    </soap:invoke>
    Any ideas what I'm doing wrong here? Happy to provide more information but I'm hoping it's something simple I'm getting wrong

    Thanks

    Alex


  • 2.  RE: GEL - possible SSL error?

    Posted 01-23-2013 05:48 AM
    Not even trying to think about HTTPS, but does the endpoint="internal" in place of the URL suggested by Sean in Ways to get a password to use in a gel script help at all (v13+)?


  • 3.  RE: GEL - possible SSL error?

    Posted 01-23-2013 06:06 AM
    Hi ,

    Instead of appending "/niku/xog" in the end point specify it directly in the gel parameter as below

    <gel:parameter var="p_XOGURL" default="https://sw610niku:8043/niku/xog"/>

    and remove the appended part from the endpoint as below

    <soap:invoke endpoint="${p_XOGURL}" var="auth">

    Try this once.

    Thanks & Regards,
    Radha Vihari


  • 4.  RE: GEL - possible SSL error?

    Posted 01-23-2013 09:21 AM
    Hi guys, thanks for your suggestions

    @Dave - Funnily enough I found this thread the other day and thought it would be the solution- unfortunately we are still on 12.0.3 and so endpoint="internal" is not supported. I did try it anyway but it errored saying "internal"... not recognised.

    @Radha - I did try your suggested syntax but unfortunately I'm getting the same error as before, this change didn't seem to have any impact

    Anything else you can think of?

    From reviewing other code snippets on the forum I can see another possible way to initialise the XOG would be to use the XOGAdmin Class

    Can anyone explain if this would work as alternative approach, how does this differ from the <soap:invoke....> approach I have currently?
    <j:if test="${debug == 'true'}">
                <g:log level="info">XOG script creation completed, calling XOG...</g:log>
            </j:if>
            <j:new className="com.niku.xog.client.XOGClientInterface" var="XOGAdminClient"/>
            <j:invoke method="invoke" on="${XOGAdminClient}" var="xogResponse">
                <j:arg type="java.lang.String" value="${xogUser}"/>
                <j:arg type="org.w3c.dom.Document" value="${xogRequest}"/>
            </j:invoke>
    Thanks again!, much appreciated
    Alex


  • 5.  RE: GEL - possible SSL error?

    Posted 02-01-2013 04:51 PM
    Is there more to the error, including a stack trace with causes mentioned? Please have a look in the bg logs to see.

    I think this problem is usually an SSL certificate / hostname resolution problem, but I would typically expect there to be more of an error reported to help indicate further.


  • 6.  Re: GEL - possible SSL error?

    Posted 05-17-2019 02:24 AM

    Hi Alex,

     

    Did you get any answer on the below? Can you please share the explanation?

    This alternative approach works but not the <sopa:invoke....>, how does this differ from the <soap:invoke....> approach I have currently?

    <j:if test="${debug == 'true'}">             <g:log level="info">XOG script creation completed, calling XOG...</g:log>         </j:if>         <j:new className="com.niku.xog.client.XOGClientInterface" var="XOGAdminClient"/>         <j:invoke method="invoke" on="${XOGAdminClient}" var="xogResponse">             <j:arg type="java.lang.String" value="${xogUser}"/>             <j:arg type="org.w3c.dom.Document" value="${xogRequest}"/>         </j:invoke>