Clarity

  • 1.  Http error 500 while calling .Net webservice from GEL script

    Posted Mar 02, 2011 02:20 PM
    Hi All,

    I am facing some issues in calling a .Net webservice from my GEL script and it returns the below error. However, i am able to call a java based webservice successfully using the same code by changing the endpoint and the soap body in the below code. I would highly appreciate any help in resolving this.

    [color=#CC2323]BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:14:112: <soap:invoke> Failed to send a SOAP message generated to 'http://eavqadotnet301/CMServices/ContractSvc.asmx'.HTTP Error: Status-Code: 500: Internal Server Error at com.niku.union.gel.tags.soap.InvokeTag.doTag[color]

    Below is the GEL script i am using

    <gel:script

    xmlns:core="jelly:core"

    xmlns:fileutil="jelly:com.ca.clarity.services.utils.FileUtilsTagLibrary"

    xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"

    xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"

    xmlns:xog="http://www.niku.com/xog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


    <soap:invoke endpoint="http://website.com/WSClarityMobileApp/MobileData.asmx" var="xogdata">



    <soap:message>

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

    <soap:Header/>





    <soap:Body>



    <tns:GetData>






    <tns:value>4</tns:value>


    </tns:GetData>


    </soap:Body>





    </soap:Envelope>





    </soap:message>

    </soap:invoke>



    <gel:set asString="true"

    select="$xogdata" var="printme"/>

    <gel:log level="info" message="XOG RESPONSE = ${printme}"/>

    </gel:script>


  • 2.  RE: Http error 500 while calling .Net webservice from GEL script

    Posted Mar 07, 2011 10:58 AM
    I did the following changes to the above code and i no longer get the error message.However, I still do not get the response xml back from the webservice. With the same input the webservice yeilds data when I tried it through SOAP UI.

    The changes i did are:

    1. removed the xmlns: soap namespace from the <gel:script> tag
    2. Added xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" namespace to the soap:invoke tag.
    3. Cleaned up the soap:envelope tag as below
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">

    When i try to print the output variable declared in the soap:invoke tag, it doesnt print anything.

    I would really appreciate if someone can help on this. Thanks!


  • 3.  RE: Http error 500 while calling .Net webservice from GEL script

     
    Posted Mar 08, 2011 12:20 PM
    Hi All,

    Any ideas here for Sanjay?

    Thanks!
    Chris


  • 4.  RE: Http error 500 while calling .Net webservice from GEL script
    Best Answer

    Posted Apr 04, 2011 12:14 PM
    Finally, with some assistance from fellow clarity community user I was able to fix the issue.
    When you call a .Net webservice from you GEL script you need to make sure to user soapAction variable in your soap:invoke tag. I had to change the namespace used for soap and include the soapAction variable to my invoke tag to make it work. Here is the working code.

    <gel:script


    xmlns:core="jelly:core"


    xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"


    xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary">

    <soap:invoke endpoint="http://claritydev.com/ClarityMobileRequest/ClarityRequest.svc" soapAction="http://tempuri.org/IClarityRequest/GetData" var="xogdata">


    <soap:message>


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

    <soapenv:Header/>

    <soapenv:Body>

    <tem:GetData>

    <tem:value>4</tem:value>

    </tem:GetData>

    </soapenv:Body>
    </soapenv:Envelope>

    </soap:message>

    </soap:invoke>

    <gel:set asString="true" select="$xogdata" var="printme"/>

    <gel:log level="info" message="XOG RESPONSE = ${printme}"/>
    </gel:script>


  • 5.  RE: Http error 500 while calling .Net webservice from GEL script

     
    Posted Apr 04, 2011 01:12 PM
    Thanks for letting everyone know you were able to resolve this Sanjay!

    Chris


  • 6.  RE: Http error 500 while calling .Net webservice from GEL script

    Posted Apr 07, 2014 04:10 PM

    Hi,

    I just want to capture the response of the webservice in Clarity 13.1

    Tried the below , but didnt work

    <gel:set asString="true" select="$xogdata/soapenv:Envelope/soapenv:Body" var="XOGoutcome"/>
    <gel:log level="info">Response: ${XOGoutcome}</gel:log>

    Also, i get the response if i use just use <gel:set asString="true" select="$xogdata" var="printme"/> and print the variable.

    Please let me know if i am missing anything.



  • 7.  RE: Http error 500 while calling .Net webservice from GEL script

    Posted Jan 31, 2013 01:19 AM
    Hi Sanjay,

    I'm trying to access a .Net WebService and getting a similar error with Status code:500.

    Any tips on how to access these WS from GEL would be of great help.

    Thanks & Regards,
    RItesh Kumar.


  • 8.  RE: Http error 500 while calling .Net webservice from GEL script

    Posted Jan 31, 2013 03:10 AM
    Hi Sanjay,

    Were you able to find some solution for this?
    Actually, I'm struck at this point now. I'm trying to consume .Net Web Services (Rest Based) and I'm getting similar error with Status Code 500.

    Thanks & Regards,
    Ritesh Kumar