Web-Services Error Code 302

Clovertech Forums Cloverleaf Web-Services Error Code 302

  • Creator
    Topic
  • #120614
    Jim Vilbrandt
    Participant

      I setup a WS-RawClient and a WS-Server in the same Cloverleaf site for testing JSON message transport. No matter what message I send from the client to the server, I get a 302 (specific URL has been moved temporarily to a new location) error.

      Jun 08, 2023 3:21:56 PM org.apache.cxf.interceptor.LoggingOutInterceptor
      INFO: Outbound Message
      —————————
      ID: 8
      Address: http://<URL Removed>:12700/wave
      Http-Method: POST
      Content-Type: application/json; charset=utf-8
      Headers: {Content-Type=[application/json; charset=utf-8], Accept=[application/json]}
      Payload: testing
      ————————————–
      Jun 08, 2023 3:21:56 PM org.apache.cxf.interceptor.LoggingInInterceptor
      INFO: Inbound Message
      —————————-
      ID: 8
      Response-Code: 302
      Encoding: ISO-8859-1
      Content-Type:
      Headers: {Content-Length=[0], Date=[Thu, 08 Jun 2023 13:21:56 GMT], Location=[http://<URL Removed>:12700/wave/], Server=[Jetty(9.2.11.v20150529)], X-Content-Type-Options=[nosniff], X-Frame-Options=[SAMEORIGIN], X-XSS-Protection=[1; mode=block]}
      ————————————–

      What am I missing?

      Best Regards, Jim

    Viewing 3 reply threads
    • Author
      Replies
      • #120616
        David Barr
        Participant

          It looks like Cloverleaf is expecting a slash at the end of the URL.

        • #120618
          Jim Vilbrandt
          Participant

            Hi David,

            Thanks for responding. I have tried various URL combinations, including your suggestion. With this configuration, I do get a 200 response but the client then throws a “Media type separator is missing” error. I haven’t consider this in the past, but do I need to send a JSON response instead of the standard WS XML?

            Regards, Jim

             

            INFO: Inbound Message
            —————————-
            ID: 1
            Response-Code: 200
            Encoding: ISO-8859-1
            Content-Type: charset=iso-8859-1
            Headers: {Content-Length=[104], content-type=[charset=iso-8859-1], Date=[Fri, 09 Jun 2023 05:09:26 GMT], Server=[Jetty(9.2.11.v20150529)], User-Agent=[Cloverleaf], X-Content-Type-Options=[nosniff], X-Frame-Options=[SAMEORIGIN], X-XSS-Protection=[1; mode=block]}
            Payload: {httpResponseCode 200} {httpResponseHeaders {{user-agent Cloverleaf} {content-type charset=iso-8859-1}}}
            ————————————–
            Jun 09, 2023 7:09:26 AM com.infor.cloverleaf.gjdws.WSRawClient processMessageFromCloverleaf
            WARNING: caught exception using webClient to call http://<URL Removed>:12700/wave/
            Jun 09, 2023 7:09:26 AM com.infor.cloverleaf.gjdws.WSRawClient processMessageFromCloverleaf
            SEVERE: Caught retryable exception trying to process message from Cloverleaf
            com.lawson.cloverleaf.driver.RetryException: webClient got exception calling http://<URL Removed>:12700/wave/
            at com.infor.cloverleaf.gjdws.WSRawClient.processMessageFromCloverleaf(WSRawClient.java:238)
            at com.lawson.cloverleaf.driver.FromCloverleafLink.doMsg(FromCloverleafLink.java:46)
            Caused by: javax.ws.rs.ProcessingException: java.lang.IllegalArgumentException: Media type separator is missing

          • #120619
            David Barr
            Participant

              Can you try adding “Content-type: application/json” to the headers on the server thread?

            • #120622
              Jim Vilbrandt
              Participant

                Hi David,

                thanks for pointing me in the right direction. My “send ws ack” tps had a hardcoded content type that was causing the issue. I changed it to echo the content type that was sent and everything appears to be working as expected.

                Best Regards, Jim

            Viewing 3 reply threads
            • You must be logged in to reply to this topic.