You are viewing limited content. For full access, please sign in.

Question

Question

HTTP Web Request Activity - Workflow

asked on February 17, 2014 Show version history

I am trying to consume web service by passing value and get response as xml, this xml contains  three child nodes.

 

web service name : https://localhostADDCUAT/RequestBill.asmx

operation name url : https://localhostADDCUAT/RequestBill.asmx?op=GetCaseDetails

 

this operation input is string

 

response of above web service as below 

 

RequestBill

Click here for a complete list of operations.

GetCaseDetails

Test

The test form is only available for requests from the local machine.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /ADDCUAT/RequestBill.asmx HTTP/1.1

Host: adweaintsrv.adweag.ae

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "https://adweaintsrv.adweag.ae/GetCaseDetails"

 

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <GetCaseDetails xmlns="https://adweaintsrv.adweag.ae/">

      <CaseID>string</CaseID>

    </GetCaseDetails>

  </soap:Body>

</soap:Envelope>

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

 

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <GetCaseDetailsResponse xmlns="https://adweaintsrv.adweag.ae/">

      <CCBCaseXml>

        <CaseID>string</CaseID>

        <CaseDetails>string</CaseDetails>

        <StatusCode>string</StatusCode>

        <StatusDesc>string</StatusDesc>

      </CCBCaseXml>

    </GetCaseDetailsResponse>

  </soap:Body>

</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /ADDCUAT/RequestBill.asmx HTTP/1.1

Host: adweaintsrv.adweag.ae

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

 

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">

  <soap12:Body>

    <GetCaseDetails xmlns="https://adweaintsrv.adweag.ae/">

      <CaseID>string</CaseID>

    </GetCaseDetails>

  </soap12:Body>

</soap12:Envelope>

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

 

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">

  <soap12:Body>

    <GetCaseDetailsResponse xmlns="https://adweaintsrv.adweag.ae/">

      <CCBCaseXml>

        <CaseID>string</CaseID>

        <CaseDetails>string</CaseDetails>

        <StatusCode>string</StatusCode>

        <StatusDesc>string</StatusDesc>

      </CCBCaseXml>

    </GetCaseDetailsResponse>

  </soap12:Body>

</soap12:Envelope>

 

 

I provide the below 

1- add web service to web service manage URL http://localhost:/Service1.asmx

2- under request , what shall i fill here ? web service url or web service and operation url ? in both cases i got bad request error 400

4- which method shall i select POST or GET ? i want to pass string and get three values as xml response.

5- selecting preferred response format as XML

 

 

Error : A potentially dangerous Request.Path value was detected from the client (:)

/  Error code 400

 

i made requests from SOAPUI and i got the result 

 

laserfiche help file is enough to answer these questions.

 

please advise

 

regards

 

 

 

 

0 0

Replies

replied on February 18, 2014

The HTTP Web Request activity doesn't have much support for SOAP web services and is intended for the easier to configure 'RESTful' web services that don't require a complicated SOAP envelope. The best way to support SOAP web services in workflow is to create a custom activity that consumes the SOAP service (through the add service or web reference functionality) and generates the code to produce and parse the SOAP envelope and response.

For this reason, I haven't actually tried to use this activity with a SOAP service. I'll try my best to answer your questions.

 

1- add web service to web service manage URL http://localhost:/Service1.asmx

  • This should be fine. Note that the web service needs to be on the workflow machine for localhost to work. Note that the service might be named RequestBill.asmx instead of Service1.asmx.

2- under request , what shall i fill here ? web service url or web service and operation url ? in both cases i got bad request error 400

4- which method shall i select POST or GET ? i want to pass string and get three values as xml response.

  • POST

5- selecting preferred response format as XML

  • Sounds right - you could try custom with the value
    • application/soap+xml; charset=utf-8

 

 

-----------

The best way to figure this out would be to probably use a program that can view the HTTP traffic like fiddler and see what a working program uses (like the test page) versus what workflow sends and then tweak what the activity sends.

1 0
replied on December 7, 2017

Dear Ed ,

I followed your steps, but I got this error

I reviewed Event viewer and I found Workflow calling my WebMethod with this URL

http://localhost/LFWebsevices/MyService.asmx/?op=GetDetails 

but the correct is

http://localhost/LFWebsevices/MyService.asmx?op=GetDetails

Workflow added a '/' char before the '?' char

how to solve this problem!

 

0 0
replied on February 18, 2014

anyone can help me please ?????!!!!!!!

0 0
replied on February 18, 2014

thanks a lot for your reply.

 

I will check it, in case does not work, i will try to find another solution.

 

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.