CAA_WS SOAP issue

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf CAA_WS SOAP issue

  • Creator
    Topic
  • #55499
    Steve Pringle
    Participant

      We’re new to SOAP and CAA-WS.  We’re trying to get a simple SOAP client working.  All it does is make a call to a service that returns the zip code of a city.  The wsdl file validates w/o errors.

      Here’s the PAYLOAD xml we’re trying to send out, and we get the error following:

      http://www.webserviceX.NET“>

         Brooklyn

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–] sms_ob_data Dump:

      [tcl :out :INFO/0:    zipClient:09/18/2017 15:52:14] msg: 0xefffed28

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgType           : DATA

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgClass          : ENGINE

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgState          : OB pre-SMS (10)

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgPriority       : 5120

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgRecoveryDbState: Log:update (3)

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgFlags          : 0x8006

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgMid            : [0.0.160779]

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgSrcMid         : [0.0.160777]

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgSrcMidGroup    : midNULL

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgHostId         : 3427268942

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgOrigSrcThread  : zipClientFile

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgOrigDestThread : zipClient

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgSrcThread      : zipClientFile

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgDestThread     : zipClient

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgXlateThread    :

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgSkipXlate      : 0

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgSepChars       :

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgNumRetries     : 0

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgGroupId        : 0

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgDriverControl  : {FILENAME request/ziprequest1.xml} {_TRXID_ _HCI_static_route_}

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgRecordFormat   :

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgRoutes         :

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgUserData       :

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgStaticIsDirty  : 0

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgVariableIsDirty: 0

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgTimeStartIb    : 1505775134.310

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgTimeStartOb    : 1505775134.316

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgTimeCurQueStart: 0.000

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgTimeTotalQue   : 0.004

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgTimeRecovery   : 1505775134.316

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgEoConfig       : 0x0

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     msgData (BO)      : 0xefffee2c

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]     message           : ‘x0a    Brooklynx0ax0a’

      [tcl :out :INFO/0:    zipClient:09/18/2017 15:52:14]

      [tcl :out :INFO/0:    zipClient:–/–/—- –:–:–]

      [tcl :out :INFO/0:    zipClient:09/18/2017 15:52:14]

      [cmd :cmd :INFO/0:zipClient_cmd:09/18/2017 15:52:14] Receiving a command

      [cmd :cmd :INFO/0:zipClient_cmd:09/18/2017 15:52:14] Receiving a command

      [cmd :cmd :INFO/0:zipClient_cmd:09/18/2017 15:52:14] Received command: ‘zipClient_xlate xrel_post’

      [cmd :cmd :INFO/0:zipClient_xlate:09/18/2017 15:52:14] Doing ‘xrel_post’ command with args ‘

      [cmd :cmd :INFO/0:zipClient_cmd:09/18/2017 15:52:14] Receiving a command

      [cmd :cmd :INFO/0:zipClient_cmd:09/18/2017 15:52:14] Command client went away.  Closing connection.

      Sep 18, 2017 3:52:15 PM com.infor.cloverleaf.gjdws.WSClient processMessageFromCloverleaf

      SEVERE: Caught exception trying to process message from Cloverleaf

      org.apache.cxf.wsdl11.WSDLRuntimeException: Part Body defined with no element and no type.

      at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildMessage(WSDLServiceBuilder.java:876)

      at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation(WSDLServiceBuilder.java:606)

      at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface(WSDLServiceBuilder.java:573)

      at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:347)

      at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:203)

      at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:175)

      at org.apache.cxf.jaxws.ServiceImpl.createDispatchService(ServiceImpl.java:278)

      at org.apache.cxf.jaxws.ServiceImpl.createDispatch(ServiceImpl.java:632)

      at org.apache.cxf.jaxws.ServiceImpl.createDispatch(ServiceImpl.java:611)

      at org.apache.cxf.jaxws.ServiceImpl.createDispatch(ServiceImpl.java:603)

      at javax.xml.ws.Service.createDispatch(Service.java:363)

      at com.infor.cloverleaf.gjdws.utils.SOAPDispatchFactory.createDispatch(SOAPDispatchFactory.java:78)

      at com.infor.cloverleaf.gjdws.WSClient.processMessageFromCloverleaf(WSClient.java:107)

      at com.lawson.cloverleaf.driver.FromCloverleafLink.doMsg(FromCloverleafLink.java:46)

      [java:wrte:ERR /0:  zipClient_0:09/18/2017 15:52:15] Call to “doMsg” returned error string “BADDATA caught exception trying to processMessageFromCloverleaf: Caught bad data exception trying to process message from Cloverleaf”. Returning bad send to engine.

      Anyone have any idea what the issue is?

      thanks,

      Steve

    Viewing 3 reply threads
    • Author
      Replies
      • #85561
        Levy Lazarre
        Participant

          Hi Steve,

          The error seems to indicate that the payload is incomplete, missing the SOAP Envelope. You are only sending the body of the message. Without the SOAP envelope, the system cannot know if you are sending SOAP 1.1 or SOAP 1.2 messages. The message is invalid. You need to create a SOAP envelope to wrap your data.

          I hope this helps.

        • #85562
          Steve Pringle
          Participant

            Well, we’re using the PAYLOAD service mode option on the thread, which lets CXF handle the SOAP envelope/Header.  So it seems all we need to supply is the payload, not the SOAP envelope/header.

            From the user’s guide:

            Service Mode

            PAYLOAD

            Selecting PAYLOAD tells the system to send/receive only the contents of the SOAP Body element and that CXF will handle the SOAP Envelope/Header.

            Use PAYLOAD mode unless there is information in the SOAP Header that the system requires or must send that CXF does not already handle.

            thanks,

            Steve

          • #85563
            Levy Lazarre
            Participant

              OK. I wasn’t aware that you were using the PAYLOAD service mode.

              I am not sure if you have Apache CXF installed on your PC, but in the “bin” directory of this program, there is a utility named “wsdlvalidator” that is used to validate WSDLs.

              When I run that utility against a downloaded copy of the WSDL for the web service you are accessing, the validation fails with 8 errors, indicating that cxf considers the WSDL file to be invalid. Now the XML is well-formed and looks good in XMLSpy but the WSDL fails validation under the strict SOAP standards applied by CXF. This is why the log is showing the error:

              Code:


              SEVERE: Caught exception trying to process message from Cloverleaf
              org.apache.cxf.wsdl11.WSDLRuntimeException: Part Body defined with no element and no type.
               

              If you take a close look at the WSDL, you will find 8 instances where the part named “Body” is defined without a type or an element:

              Code:


              CXF performs strict validation and considers the file to be invalid.

              What you could try is to download a copy of the WSDL file, make the 8 necessary corrections, supplying the type like this:

              Code:


              Next you point Cloverleaf to this local copy of the WSDL (instead of the http:// address) and retry.

            • #85564
              Steve Pringle
              Participant

                Hi Levy,

                That did it!  I ran into a few other minor issues but the bad wsdl was the major problem.  I fixed the wsdl file as you suggested.  I actually had validated the wsdl file on a validation tool I found online, and it passed, so go figure.  

                I don’t have apache CXF so I couldn’t try the wsdlvalidator tool.

                anyway – thanks for your help!

                –Steve

            Viewing 3 reply threads
            • The forum ‘Cloverleaf’ is closed to new topics and replies.