Issue using a custom logic apps connector(SOAP) to wcf service

Rajesh Nerenki 1 Reputation point
2024-06-24T12:44:31.67+00:00

Hi

I'm trying to use the logic apps custom connector(SOAP) - https://learn.microsoft.com/en-us/connectors/custom-connectors/create-register-logic-apps-soap-connector

The wcf service is hosted on azure vm and is set up with basic authentication. There's only one operation to submit the details to SAP. I've imported the wsdl and I can see the request body and response body generated successfully from the wsdl. However when I try to call the connector from logic apps, I get internal server error. The vnet has been set up properly and I'm able to ping the host server from within logic apps(I used tcpping from kudu)

One issue I see is the webservice has a weird url for e.g. https://xyz.abc.az:1443/order/abc/data/200/abc123. When I import the wsdl, the basepath gets set up as "/" instead of the whole relative path. I tried amending the basePath in swagger editor, but that hasn't worked. The fazioservice example that is shown in the documentation has all the operations at the root of the service and hence works fine. I don't know if this is being the root cause.

I'm able to connect to the service using the HttpConnector by providing the full path to the service, passing the request body xml and using basic authentication. So I'm not sure why the SOAP connector doesn't work. I tried looking at the logs but doesn't see any exception details. Is there a way to turn on verbose logging? I've also tried using Postman sending the request body as xml and that too works. Any help highly appreciated

Thanks

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,222 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ganeshkumar R 665 Reputation points
    2024-06-24T13:47:57.7966667+00:00

    It sounds like you have a complex setup and you're encountering issues with the custom SOAP connector in Azure Logic Apps. Here are some detailed steps and suggestions to help you troubleshoot and resolve the issue:

    Step-by-Step Troubleshooting:

    1. Check the Base URL Configuration:
      • Ensure that the base URL is correctly configured in the custom connector. Since your URL includes a specific path (e.g., /order/abc/data/200/abc123), you need to ensure that the WSDL's service address is correctly specified.
      • You mentioned that the basePath gets set up as / instead of the whole relative path. Make sure to adjust this in the connector configuration.
    2. Modify the Swagger Definition:
      • You can manually edit the Swagger (OpenAPI) definition to ensure that the paths and operations are correctly defined. Use the Swagger Editor to load your definition and ensure that the paths are accurate.
      • For example:
        
             paths:
        
               /order/abc/data/200/abc123:
        
                 post:
        
                   ...
        
        
    3. Authentication Configuration:
      • Since your service uses basic authentication, double-check that the credentials are correctly configured in the custom connector.
      • Verify that the authentication headers are being correctly sent in the request.
    4. Enable Detailed Logging:
      • Unfortunately, Logic Apps do not have a built-in feature for verbose logging for custom connectors. However, you can add logging within your workflow to log request and response details.
      • Consider using an HTTP connector before and after the SOAP connector to log request and response details.
    5. Test with HTTP Connector:
      • Since you mentioned that the HTTP connector works, compare the request details (headers, body, URL) between the HTTP connector and the SOAP connector.
      • Ensure that the SOAP connector is sending the request in the same format as the HTTP connector.
    6. Use Postman for Testing:
      • Continue to use Postman to test your SOAP requests. Verify the exact request details and compare them with what is being sent by the Logic Apps custom connector.
    7. Review Network Configuration:
      • Ensure that all necessary network configurations, such as VNET and firewall rules, are correctly set up and that there are no network issues preventing the Logic App from reaching the service.

    Example of Swagger Definition for Custom Connector:

    Here is an example of how you might define the path in your Swagger definition:

    
    swagger: '2.0'
    
    info:
    
      title: Your Connector
    
      description: SOAP Custom Connector
    
      version: '1.0'
    
    host: xyz.abc.az:1443
    
    basePath: /order/abc/data/200
    
    schemes:
    
      - https
    
    paths:
    
      /abc123:
    
        post:
    
          summary: Your Operation
    
          description: Operation description
    
          operationId: SubmitDetails
    
          consumes:
    
            - application/soap+xml
    
          produces:
    
            - application/soap+xml
    
          parameters:
    
            - name: body
    
              in: body
    
              required: true
    
              schema:
    
                $ref: '#/definitions/RequestBodySchema'
    
          responses:
    
            '200':
    
              description: Successful response
    
              schema:
    
                $ref: '#/definitions/ResponseBodySchema'
    
    definitions:
    
      RequestBodySchema:
    
        type: object
    
        properties:
    
          # Define your request body schema
    
      ResponseBodySchema:
    
        type: object
    
        properties:
    
          # Define your response body schema
    
    

    Additional Resources:

    Contact Microsoft Support:

    If you continue to experience issues, consider reaching out to Microsoft support for more detailed assistance. Provide them with the exact error messages, logs, and configuration details you have.

    By carefully reviewing and adjusting the configuration, you should be able to resolve the issue with the SOAP connector in Azure Logic Apps.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.