IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  parsing soap/http response in wtx8.2

    Posted 01/17/08 11:09 AM

    Originally posted by: SystemAdmin


    We are trying to call web services using soap/http in wtx8.2. Right now we can send request and get/parse response if the request has valid format and all required fields.

    If the request misses any required field, we would expect to receive WSDL XML response which indicates what goes wrong(in this case what fields are missing). We have implemented fault message in WSDL however cannot get any response except error code 500. We tried -RAW option and it doesn't seem to work. If we open the http trace file, we could see the response with fault massege which is exactly what we want. Since we cannot parse trace file, is there any way to get the response?

    Any suggestion is appreciated.

    Thanks.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: parsing soap/http response in wtx8.2

    Posted 01/17/08 11:41 AM

    Originally posted by: cemeinz


    Hello!

    This came to my mind:

    If I understood you right, you send a corrupt message to the server in order to get a fault message back? Well, maybe the server / web service itself is configered in a way, that corrupt message will produce him a HTTP 500 error response. This error let your mapping fail. I would prefer to use the INGORE parameter.


    Example taken from the online library:
    <hr />
    Command:

    -I 404:410

    Result:

    * The adapter ignores errors of type 404 (not found).
    * The adapter ignores errors of type 410 (gone).


    This lets your mapping runs through if you parametrized with -I 500.

    I tested it with my on running and working example just seconds ago. I produced a HTTP 500 with a corrupt message, but my mapping runs through "mapping completed successfully" and wrote the response including the fault message onto my file system.

    Message was edited by: cemeinz

    Message was edited by: cemeinz
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 3.  Re: parsing soap/http response in wtx8.2

    Posted 01/17/08 01:10 PM

    Originally posted by: SystemAdmin


    cemeinz,


    Thank you for your quick response. I tried with your recommendation with following map rule:



    =GET("SOAP", "-SA '' -TRANSPORT 'HTTP(-HDRI+ -I 500 -TYPE text/xml -METHOD POST -URL http://ourwebservice/socs/OCService.wsdl -TRACEV)'", PACKAGE(BuildRequest))



    This web service handles our order capture process and above output card will be dumped into a file. If I send a valid request with all required fields I will get the following response:



    <OrderCaptureResponse><respCd>1</respCd><output>ORDERID: 111|LINE_ITEM: |ORDER_DATE: 20080117130239|FIRST_NAME: |MIDDLE_NAME: |LAST_NAME: </output></OrderCaptureResponse>



    However If I send a request without a required field(e.g. order_date), I got the following:


    SOAPAction: ""


    <Envelope xmlns:tns="http://tempuri.org/type" xmlns:SOAP-ENV="http://tempuri.org/type"><SOAP-ENV:Body><tns:OrderCaptureRequest xmlns:tns="http://tempuri.org/type"><tns:ORDER_ID>111</tns:ORDER_ID><tns:LINE_ITEM></tns:LINE_ITEM><tns:ORDER_DATE></tns:OR DER_DATE><tns:FIRST_NAME></tns:FIRST_NAME><tns:MIDDLE_NAME></tns:MIDDLE_NAME><tns:LAST_NAME></tns:LAST_NAME></tns:Orde rCaptureRequest></SOAP-ENV:Body></Envelope>



    It just bounced back the request we sent! Could you let me know how do you get the response? Is there anything wrong with above map rule?


    Thanks a lot!



    Message was edited by: xingstar
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: parsing soap/http response in wtx8.2

    Posted 01/17/08 01:58 PM

    Originally posted by: cemeinz


    Hello!

    I looked into the online library and found the following:

    "Empty string ( -SA ''), means that the intent of the request is provided by the HTTP request URI or Uniform Resource Identifier (no value is specified between the single quotes)"

    If I look into your command string, I never see a concrete request provided by the HTTP request or something like this.

    I did a smiliar command string in another web service example, but had to insert the concrete method used in the web service.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: parsing soap/http response in wtx8.2

    Posted 01/17/08 03:40 PM

    Originally posted by: SystemAdmin


    Actually I did try without -SA '' still the same result. At this point, I really don't know how to get the response which contains fault messages.

    Thanks.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 6.  Re: parsing soap/http response in wtx8.2

    Posted 01/17/08 05:07 PM

    Originally posted by: cemeinz


    Hello!

    I looked again at your command line. You never had to insert the *.wsdl url path. Instead you must address the concrete web service you want (which could be defined in this wsdl).
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 7.  Re: parsing soap/http response in wtx8.2

    Posted 01/18/08 09:54 AM

    Originally posted by: SystemAdmin


    Actually both are the same. Here's the port in wsdl file:


    <port name="OCServicePort" binding="tns:OCServicePort">
    <soap:address location="http://myservice/socs/OCService.wsdl" />
    </port>


    Thanks again for your help!
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 8.  Re: parsing soap/http response in wtx8.2

    Posted 01/28/08 03:48 AM

    Originally posted by: San@Sun


    Hi,

    Actually this a bug in WTX that the fault responses are not given back to the map from the SOAP/HTTP adaptor.
    You need to open a PMR @ https://www-111.ibm.com/software/support/ecare/support_login.jsp and post ur problem over here. IBM support should be able to provide you some patch for SOAP/HTTP Adaptor.

    But u'll still need to use -I 500 (IGNORE OPTION)in our Soap call.

    Hope this will surely resolve your problem.

    Regards,
    San@Sun.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender