SOAP Service call Issue

Hello,

I am currently trying to make SOAP call to Oracle Right Now(ORN) Enterprise. ORN provides WSDL however I was not able to connect to the WSDL via Web Service smart node, getting 'An error occurred while processing the WSDL. It may not be a valid WSDL 1.1 document. (APNX-1-4041-002)'. tried with third party SOAP test tool and it worked. I am guessing the WSDL is currently not supported by Appian.

Is there an another way to make SOAP call other than Web service smart node?

I was looking into 'Send HTTP Request Plug-in' plug in. The plug in description says it supports to send SOAP XML to a Web Service but didn't provide further instructions. 

If someone can provide more high level details implementation direction or any other approach that I can try, I would really appreciated.

FYI, the following is the example SOAP XML provided ORN for the operation I want to use.

<soapenv:Envelope xmlns:soapenv='schemas.xmlsoap.org/.../'>
    <soapenv:Header xmlns:rnm='urn:messages.ws.rightnow.com/v1_3'>
        <rnm:ClientInfoHeader>
            <rnm:AppID>IncidentResponse001.xml</rnm:AppID>
        </rnm:ClientInfoHeader>
        <wsse:Security soapenv:mustUnderstand="false"
			xmlns:wsse="docs.oasis-open.org/.../oasis-200401-wss-wssecurity-secext-1.0.xsd"
			xmlns:wssu="docs.oasis-open.org/.../oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:UsernameToken>
                <wsse:Username>admin123</wsse:Username>
                <wsse:Password wsse:Type="docs.oasis-open.org/.../oasis-200401-wss-username-token-profile-1.0
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
        <rnm:SendIncidentResponse
        		xmlns:soapenc='schemas.xmlsoap.org/.../'
        		xmlns:xs='www.w3.org/.../XMLSchema'
        		xmlns:xsi='www.w3.org/.../XMLSchema-instance'
        		xmlns:rnm='urn:messages.ws.rightnow.com/v1_3'
        		xmlns:rno='urn:objects.ws.rightnow.com/v1_3'
        		xmlns:rng='urn:generic.ws.rightnow.com/v1_3'
        		xmlns:rnb='urn:base.ws.rightnow.com/v1_3'
        		xmlns:rnok='urn:base.ws.rightnow.com/v1_3'>
            <rnm:IncidentResponse>
                <rno:Incident>
                    <rno:PrimaryContact>
                        <rno:Contact>
                            <rnb:ID id="1"/>
                        </rno:Contact>
                    </rno:PrimaryContact>
                    <rno:Subject>Overheating of the device</rno:Subject>
                    <rno:Threads>
                        <rno:ThreadList action='add'>
                           <rno:Channel>
                           	<rnb:Name>Email</rnb:Name>
                           </rno:Channel>
                            <rno:EntryType>
                                <rnb:ID id='2'/>
                            </rno:EntryType>
                            <rno:Text>Thank you for reaching out!</rno:Text>
                        </rno:ThreadList>
                    </rno:Threads>
                </rno:Incident>
                <rno:CC>
                    <rno:EmailAddresses>bob@example.com</rno:EmailAddresses>
                </rno:CC>
            </rnm:IncidentResponse>
        </rnm:SendIncidentResponse>
    </soapenv:Body>
</soapenv:Envelope>

  Discussion posts and replies are publicly visible

Parents
  • Unfortunately No. This is Oracle enterprise product out of box WSDL. Is there a way to use plug in, Send HTTP Request Plug-in?
  • 0
    Certified Lead Developer
    in reply to eric.jun@bitsinglass.com
    Hi

    You can usually use the HTTP Request route for WSDL's that Appian can't handle. I have done this a few times when the WSDL contained types that Appian did not like.

    The easiest way to go about this is to load your WSDL into SOAPUI or another application meant for testing services. You can pull out the raw XML request body from SOAPUI and throw that into the body input of the Send HTTP Request plug-in.
  • 0
    Certified Senior Developer
    in reply to Josh
    Do you have a quick example? This is my very first time to implement SOAP call and plug in doesn't provide much instructions or example.
  • +1
    Certified Lead Developer
    in reply to eric.jun@bitsinglass.com

    Sure. The National Weather Service has some information accessible via a SOAP protocol: 

    The WSDL is 

    When you load the endpoint into SOAPUI, you get a list of available services. The one I used is LatLonListZipcode.

     

     

    Here is the sample request:

    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ndf="https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl">
       <soapenv:Header/>
       <soapenv:Body>
          <ndf:LatLonListZipCode soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
             <zipCodeList xsi:type="dwml:zipCodeListType" xmlns:dwml="https://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd">20191</zipCodeList>
          </ndf:LatLonListZipCode>
       </soapenv:Body>
    </soapenv:Envelope>

    and the response:

    <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
       <SOAP-ENV:Body>
          <ns1:LatLonListZipCodeResponse xmlns:ns1="https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl">
             <listLatLonOut xsi:type="xsd:string"><?xml version='1.0'?><dwml version='1.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='https://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd'><latLonList>38.9521,-77.3452</latLonList></dwml></listLatLonOut>
          </ns1:LatLonListZipCodeResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Copying and pasting the request into Appian we have:

  • 0
    Certified Senior Developer
    in reply to Josh
    This is awesome. I will definitely try out. helped a lot. Thx a million. Just out of curiosity, Do I have to use SOAPUI or any other third party tool to get particular operation endpoints?
  • 0
    Certified Lead Developer
    in reply to eric.jun@bitsinglass.com
    SOAPUI and similar tools just help you build the request. It will ping the endpoint and craft the xml body for you. It’s also easier (in my opinion) to test and troubleshoot services from these tools vs Appian. Once I’m done testing or troubleshooting in a tool, I port the request over to Appian.
  • 0
    Certified Senior Developer
    in reply to Josh

    HI Josh,

    My SOAP call is working correctly now, It didn't work first so I thought it was because of WS security header so I was looking into WS related appian function such as wsConfig(). It turns out I wasn't using correct 'soapAction' value. Once I have correct header it did work. Your direction was very very helpful. Thank you very much.  

    The step I followed;

    1. Tried to use Web Service smart node, when I test connection WSDL URL, it did throw out not a valid WSDL error message.

    2. Use SOAP UI to load WSDL and select the operation that i want to user. Set required values and test the operation and confirmed it was working in SOAP UI. 

    3. While SOAP UI testing, it did not required any header.

    3. Copy the XML from SOAP UI and tested in Appian without header and it failed.

    4. Added soapAction and content-Type header configuration it's working as expected. 

    FYI, I tested with 'Web And XML Extensions' Plug in and tested it in SAIL as well and confirmed it's working in SAIL as well.

    load(
    local!endpoint: "payoneer--upgrade.custhelp.com/.../soap",
    /* the SOAP envelope */
    local!Body: "<soapenv:Envelope xmlns:soapenv=""schemas.xmlsoap.org/.../"" xmlns:v1=""urn:messages.ws.rightnow.com/v1_4"" xmlns:v11=""urn:objects.ws.rightnow.com/v1_4"" xmlns:v12=""urn:base.ws.rightnow.com/v1_4"" xmlns:v13=""urn:generic.ws.rightnow.com/v1_4"">
    <soapenv:Header>
    <v1:ClientInfoHeader>
    <v1:AppID>IncidentResponse001.xml</v1:AppID>
    </v1:ClientInfoHeader>
    <wsse:Security xmlns:wsse=""docs.oasis-open.org/.../oasis-200401-wss-wssecurity-secext-1.0.xsd"" soapenv:mustUnderstand=""1"">
    <wsse:UsernameToken xmlns:wsu=""docs.oasis-open.org/.../oasis-200401-wss-wssecurity-utility-1.0.xsd"" wsu:Id=""UsernameToken-3902281"">
    <wsse:Username>YOURUSERNAME</wsse:Username>
    <wsse:Password Type=""docs.oasis-open.org/.../oasis-200401-wss-username-token-profile-1.0
    </wsse:UsernameToken>
    </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
    <v1:SendIncidentResponse>
    <v1:IncidentResponse>
    <v11:Incident>
    <v11:PrimaryContact>
    <v11:Contact>
    <v12:ID id=""5518344""/>
    </v11:Contact>
    </v11:PrimaryContact>
    <v11:Subject>This Incident for email testing E</v11:Subject>
    <v11:Threads>
    <v11:ThreadList action=""add"">
    <v11:Channel>
    <v12:Name>Email</v12:Name>
    </v11:Channel>
    <v11:EntryType>
    <v12:ID id=""2""/>
    </v11:EntryType>
    <v11:MailHeader>This is mail Header for testing E</v11:MailHeader>
    <v11:Text>This is test email body E</v11:Text>
    </v11:ThreadList>
    </v11:Threads>
    </v11:Incident>
    </v1:IncidentResponse>
    </v1:SendIncidentResponse>
    </soapenv:Body>
    </soapenv:Envelope>",
    local!misResponse: httppostwithresponse(
    endpoint: local!endpoint,
    paramNames: {},
    paramValues: {},
    headerNames: {"soapAction","Content-Type"},
    headerValues: {"SendIncidentResponse","text/xml;charset=UTF-8"},
    body: local!Body,
    user: "appian_client",
    password: "de@vGpp1h4tAn",
    domain: null,
    timeout: 25,
    proxyHost: null,
    proxyPort: null,
    socketTimeout: 25
    ),

    {
    a!paragraphField(
    readOnly: true,
    value: local!misResponse
    )
    }

    )

  • 0
    Certified Lead Developer
    in reply to eric.jun@bitsinglass.com
    The same headers are in the SOAPUI client, just not as "categorized" as they are in Appian. In the request, you can switch over to "Raw" instead of "XML" - you will see the SOAPAction and Content-Type headers then.
  • Hi Josh,
    Could you briefly describe on this approach.

    We are also running into similar issues. Not able to call SOAP endpoint from "Call WebService" smart service which was initially working.

    I wanted to follow the HTTP approach.

    Please elaborate a bit.

    Thanks,
    Phani
  • 0
    Certified Lead Developer
    in reply to phanibabuk
    You'll have to be more specific with your question; I gave a pretty detailed example in this thread on how to invoke a SOAP WS with an integration object.

    Have you tested out your calls from SOAPUI or another application that gives you more flexibility on setting up a request?
Reply Children
No Data