This discussion is archived
1 2 Previous Next 18 Replies Latest reply: Apr 19, 2012 12:05 PM by user12947803 RSS

Some more complex sample of invokin WS needed

729423 Newbie
Currently Being Moderated
Helo,

I have run the sample obwsapp from SALT 10gR3 distribution, which is very simple. I would like to see how some more complex WebService could be invoked with SALT. By complex I mean the WebService method taking several arguments, of which some are complex types.

I have run the WebService but have not enough experience to write the ATMI client to call this service.

Is there anybody who is able to show me some more complex sample ?

regards Olek
  • 1. Re: Some more complex sample of invokin WS needed
    Todd Little Expert
    Currently Being Moderated
    Hi Olek,

    Once you have imported the WSDL and have the Tuxedo service definition, you can use the ud32 command to invoke the web service. ud32 is a standard Tuxedo command line utility that allows you to create FML32 buffers on the fly and invoke a service with that FML32 buffer. If you can provide the WSDL for the service you want to invoke (assuming it isn't overly complex) someone should be able to post the example ud32 input that will invoke the service.

    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect
  • 2. Re: Some more complex sample of invokin WS needed
    772640 Newbie
    Currently Being Moderated
    Hi Todd,

    I am late to the SALT game but want to get started on the right footing. I was able to compile and run sample outbound client successfully, I however would like to use ud32 instead. Below is the WSDL file.

    <wsdl:definitions xmlns:axis2="http://calc.sample" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns="http://calc.sample/xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://calc.sample">
    <wsdl:types>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://calc.sample/xsd">
    <xs:element name="add">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="param0" nillable="true" type="xs:int"/>
    <xs:element name="param1" nillable="true" type="xs:int"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="addResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="return" nillable="true" type="xs:int"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="addMessage">
    <wsdl:part name="part1" element="ns:add"/>
    </wsdl:message>
    <wsdl:message name="addResponseMessage">
    <wsdl:part name="part1" element="ns:addResponse"/>
    </wsdl:message>
    <wsdl:portType name="CalculatorPortType">
    <wsdl:operation name="add">
    <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsaw:Action="urn:add" message="axis2:addMessage"/>
    <wsdl:output xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:addResponseMessage" wsaw:Action="urn:add"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="CalculatorSOAP11Binding" type="axis2:CalculatorPortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <wsdl:operation name="add">
    <soap:operation soapAction="urn:add" style="document"/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="Calculator">
    <wsdl:port name="CalculatorSOAP11port" binding="axis2:CalculatorSOAP11Binding">
    <soap:address location="http://localhost:7001/axis2/services/Calculator"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

    Thanks for your help in advance.

    Ransford
  • 3. Re: Some more complex sample of invokin WS needed
    772640 Newbie
    Currently Being Moderated
    Sorry forgot to mention what is done so far...

    [rcihp146:rhewitt2]:/home/infra/rhewitt2/SALT/obwsapp/tux/work:>./client 123 321
    The result of (123 + 321) is: 444

    [add.UD]
    SRVCNM add
    param0 123
    param1 321



    [rcihp146:rhewitt2]:/home/infra/rhewitt2/SALT/obwsapp/tux/work:>ud32 -n < add.UD
    SENT pkt(1) is :
    param0 123
    param1 321
    SRVCNM add

    CMDTUX_CAT:994: ERROR: Reply failure - TPEOTYPE - type and/or subtype do not match buffer's or unknown

    [ULOG]
    ...
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Outbound>DeTuxedoQ
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: OK>Tux2XML
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Outbound>PackSOAPBody
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: OK>PackSOAPHeader
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Default>WSRMHandle3
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: OK>PackHTTP
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Default>Send
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:Sending HTTP Header: POST /axis2/services/Calculator HTTP/1.1
    Host: rcihp146:7001
    User-Agent: gSOAP/2.7
    SOAPAction: "urn:add"
    Content-Type: text/xml; charset=UTF-8
    Content-Length: 348
    Connection: keep-alive


    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:Sending SOAP Message: <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><ns0:add xmlns:ns0="http://calc.sample/xsd"><ns0:param0 xmlns:ns0="http://calc.sample/xsd">123</ns0:param0><ns0:param1 xmlns:ns0="http://calc.sample/xsd">321</ns0:param1></ns0:add></SOAP-ENV:Body></SOAP-ENV:Envelope>
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Default>Connecting
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: OK>SendToNet
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:Send a http message to net, SCO index=4095
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: OK>SendOver
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Outbound>Receive
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Found>ParseHTTP
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:HTTP Parsing: Buffer length 174 -- HTTP/1.1 200 OK
    Date: Sun, 15 May 2011 16:53:14 GMT
    Server: Simple-Server/1.1
    Transfer-Encoding: chunked
    Content-Type: text/xml; charset=UTF-8
    Connection: keep-alive


    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: NotFound>Receive
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Found>ParseHTTP
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:HTTP Parsing: Buffer length 266 -- ff
    <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:addResponse xmlns:ns="http://calc.sample/xsd"><ns:return>444</ns:return></ns:addResponse></soapenv:Body></soapenv:Envelope>
    0


    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: OK>HTTPDispatch
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:A HTTP message is received, SCO index=4095
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: HTTPOK>ParseSOAPHeader
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Default>ParseHeaderRoot
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:A SOAP message is received, SCO index=4095
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: None>ParseSOAPBody
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Default>ParseBodyRoot
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: OK>ParseBodyElement
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: OK>WSSEPolicyCheck1
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: OK>WSRMHandle1
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Default>FindService
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: OK>XML2Tux
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Outbound>EnTuxedoQ
    125314.rcihp146!GWWS.24587.17.0: TRACE:ms:SCO[4095] FSM State Transition: Default>PutToCallingQ
    125314.rcihp146!GWWS.24587.16.0: TRACE:ms:SCO[4095] FSM State Transition: OK>Delete
    125728.rcihp146!GWWS.24587.18.0: TRACE:ms:SCO[4095] FSM State Transition: Outbound>DeTuxedoQ
    125728.rcihp146!GWWS.24587.18.0: TRACE:ms:SCO[4095] FSM State Transition: OK>Tux2XML
    125728.rcihp146!GWWS.24587.18.0: TRACE:ms:SCO[4095] FSM State Transition: OBFail>Error
    125728.rcihp146!GWWS.24587.18.0: TRACE:ms:SCO[4095] FSM State Transition: Outbound>EnTuxedoQ
    125728.rcihp146!GWWS.24587.18.0: TRACE:ms:SCO[4095] FSM State Transition: Default>PutToCallingQ
    125728.rcihp146!GWWS.24587.9.0: TRACE:ms:SCO[4095] FSM State Transition: OK>Delete

    Ransford
  • 4. Re: Some more complex sample of invokin WS needed
    Todd Little Expert
    Currently Being Moderated
    Hi Ransford,

    You should be able to examine the service metadata repository to determine what ud32 input you need to use. Based upon the WSDL, I believe your ud32 input should look like:
    SRVCNM add
    add 
            param0  123
            param1   321
    The key here is that there is an embedded FML32 field called add that has to contain the parameters (so it matches the addMessage part of the WSDL.) The syntax above is the line with add should contain a tab after the field name add and then a new line. The following lines start with tab, then the parameter name, followed by tab and the field value.

    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect
  • 5. Re: Some more complex sample of invokin WS needed
    772640 Newbie
    Currently Being Moderated
    Hi Todd,

    I followed your instructions to the letter but got this error:

    [rcihp146:rhewitt2]:/home/infra/rhewitt2/SALT/obwsapp/tux/work:>ud32 -n < add.UD
    CMDTUX_CAT:988: ERROR: ud detected syntax error in fielded buffer #1
    LIBFML_CAT:10: ERROR: Bad syntax in boolean expression

    SRVCNM add
    add
    param0 123
    param1 321


    [calc.wsdf]
    <?xml version="1.0" encoding="utf-8"?>
    <Definition xmlns="http://www.bea.com/Tuxedo/WSDF/2007" name="calc" wsdlNamespace="http://calc.sample">
    <WSBinding id="CalculatorSOAP11Binding">
    <Servicegroup id="CalculatorPortType">
    <Service name="add" soapAction="urn:add">
    <Input wsaAction="urn:add"/>
    <Output wsaAction="urn:add"/>
    </Service>
    </Servicegroup>
    <SOAP version="1.1" style="document" use="literal">
    <AccessingPoints>
    <Endpoint id="CalculatorSOAP11port" address="http://rcihp146:7001/axis2/services/Calculator"/>
    </AccessingPoints>
    </SOAP>
    </WSBinding>
    </Definition>

    [calc.fml32]
    # FML32 Mapping File Generated by wsdlcvt

    *base 1000 <----- Please specify proper base number here.

    #name rel-number type flags comment
    #---- ---------- ---- ------ -------
    add 1 fml32 - fullname=add, schema=ns:add
    addResponse 2 fml32 - fullname=addResponse, schema=ns:addResponse
    param0 3 long - fullname=param0, schema=xs:int
    param1 4 long - fullname=param1, schema=xs:int
    ws_return 5 long - fullname=return, schema=xs:int

    [calc.mif]


    ############
    # SERVICE: * add
    ############
    service=add
    tuxservice=add
    export=y
    servicetype=service
    servicemode=webservice
    inbuf=FML32
    outbuf=FML32
    errbuf=FML32
    param=add
    access=in
    paramschema=XSD_E:add@http://calc.sample/xsd
    type=fml32
    (
    param=param0
    access=in
    paramschema=XSD_E:param0@http://calc.sample/xsd
    type=long
    primetype=int

    param=param1
    access=in
    paramschema=XSD_E:param1@http://calc.sample/xsd
    type=long
    primetype=int
    )

    param=addResponse
    access=out
    paramschema=XSD_E:addResponse@http://calc.sample/xsd
    type=fml32
    (
    param=ws_return
    access=out
    paramschema=XSD_E:return@http://calc.sample/xsd
    type=long
    primetype=int
    )

    param=TA_WS_SOAP11_FAULTCODE
    paramschema=XSD_E:faultcode@unqualified
    access=err
    type=string

    param=TA_WS_SOAP11_FAULTSTRING
    paramschema=XSD_E:faultstring@unqualified
    access=err
    type=string

    param=TA_WS_SOAP11_FAULTACTOR
    paramschema=XSD_E:faultactor@unqualified
    access=err
    type=string
    requiredcount=0

    param=TA_WS_SOAP11_FAULTDETAIL
    paramschema=XSD_E:detail@unqualified
    access=err
    requiredcount=0
    type=fml32
    (
    param=TA_WS_SOAP_FAULTCONTENT
    access=err
    type=xml
    requiredcount=0

    )


    ... and in another related matter, I am trying to use a more realistic example by building the WSDF file using an in-house application and got two different errors:

    wsdlcvt -i http://vmelxap051:7050/WSLServices/SubscriberMaintenance.jws -o SMaintenance
    http://vmelxap051:7050/WSLServices/SubscriberMaintenance.jws; Line #1; Column #63; XSLT Error (javax.xml.transform.TransformerException): White spaces are required between publicId and systemId.
    Exception in thread "main" java.lang.RuntimeException: White spaces are required between publicId and systemId.
    at org.apache.xalan.xslt.Process.doExit(Process.java:1153)
    at org.apache.xalan.xslt.Process.main(Process.java:1126)
    WSDLCVT:35:ERROR: Failed to run "org.apache.xalan.xslt.Process" with /opt/tuxedo91/udataobj/salt/download.xsl. Please refer to the java output to solve the problem.

    -rw-r--r-- 1 rp1oln10 test 200130 May 16 11:06 SubscriberMaintenance.jws
    wsdlcvt -i SubscriberMaintenance.jws -o SMaintenance
    ERROR: Failed to manipulate the XML document.An exception occurred! Type:NetAccessorException, Message:Could not connect to the socket for URL 'http://wireless.rogers.com/schemas/AddAndRemoveSubscriberServices/Request'
    WSDLCVT:42:ERROR: Fail to import schema in "".
  • 6. Re: Some more complex sample of invokin WS needed
    Todd Little Expert
    Currently Being Moderated
    Hi Ransford,

    So quite literally add.UD contains:

    SRVCNM<tab>add
    add<tab>
    <tab>param0<tab>123
    <tab>param1<tab>321
    <newline>
    <EOF>

    An error in boolean expression from ud32 usually means a syntax error in the input. The tab (<tab>) characters are critical. Make sure your text editor isn't replacing tabs with spaces. Also the blank line at the end is also critical although I think you already know that based upon your previous post.

    As for the other error, it looks like you are trying to pass an annotated Java source file to wsdlcvt. It requires a WSDL file (in XML format). Although this is just a guess without knowing the contents of SubscriberMaintenance.jws. The other error looks like you didn't have access to something either because of an error in a URL or maybe not connected to an internal network?

    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect
  • 7. Re: Some more complex sample of invokin WS needed
    772640 Newbie
    Currently Being Moderated
    Hi Todd,

    The tabs were added as suggested (they didn't show in my earlier response which was copy/pasted). So I am still at the same point as before with the syntax errors.

    Thanks.

    Ransford
  • 8. Re: Some more complex sample of invokin WS needed
    Todd Little Expert
    Currently Being Moderated
    Hi Ransford,

    Can you e-mail the file? Just use my first name period last name @oracle.com.

    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect
  • 9. Re: Some more complex sample of invokin WS needed
    Todd Little Expert
    Currently Being Moderated
    Hi Ransford,

    You need a completely blank line at the end of your file. Here is the hexdump of your file and my modified version:
    hexdump -C add.UD 
    00000000  53 52 56 43 4e 4d 09 61  64 64 0a 61 64 64 09 0a  |SRVCNM.add.add..|
    00000010  09 70 61 72 61 6d 30 09  31 32 33 0a 09 70 61 72  |.param0.123..par|
    00000020  61 6d 31 09 33 32 31 0a  0a                       |am1.321..|
    00000029
    hexdump -C add2.UD 
    00000000  53 52 56 43 4e 4d 09 61  64 64 0a 61 64 64 09 0a  |SRVCNM.add.add..|
    00000010  09 70 61 72 61 6d 30 09  31 32 33 0a 09 70 61 72  |.param0.123..par|
    00000020  61 6d 31 09 33 32 31 0a  0a 0a                    |am1.321...|
    0000002a
    Notice the additional newline character at the end of the file. Try that and see if your Bad syntax in boolean expression error goes away.

    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect
  • 10. Re: Some more complex sample of invokin WS needed
    772640 Newbie
    Currently Being Moderated
    Hi Todd,

    This is what I am getting now after adding new line at bottom of file.


    ud32 -n < add.UD
    SENT pkt(1) is :
    SRVCNM add
    add
    param0 123
    param1 321


    CMDTUX_CAT:994: ERROR: Reply failure - TPEOTYPE - type and/or subtype do not match buffer's or unknown

    [ULOG]
    ...
    094921.rcihp146!GWWS.1907.21.0: TRACE:ms:SCO[4095] FSM State Transition: Outbound>DeTuxedoQ
    094921.rcihp146!GWWS.1907.21.0: TRACE:ms:SCO[4095] FSM State Transition: OK>Tux2XML
    094921.rcihp146!GWWS.1907.21.0: GWWS_CAT:1068: DataMapping Error: There is the redundant data in the received buffer.
    094921.rcihp146!GWWS.1907.21.0: TRACE:ms:SCO[4095] FSM State Transition: OBFail>Error
    094921.rcihp146!GWWS.1907.21.0: TRACE:ms:SCO[4095] FSM State Transition: Outbound>EnTuxedoQ
    094921.rcihp146!GWWS.1907.21.0: TRACE:ms:SCO[4095] FSM State Transition: Default>PutToCallingQ
    094921.rcihp146!GWWS.1907.20.0: TRACE:ms:SCO[4095] FSM State Transition: OK>Delete

    Thanks.

    Ransford
  • 11. Re: Some more complex sample of invokin WS needed
    Todd Little Expert
    Currently Being Moderated
    Hi Ransford,

    Sigh, my guess is that the field SRVCNM is actually being sent to the service and since it isn't in the service definition, the GWWS is complaining as it doesn't know what to do with the field. You might try playing with the MIF file and adding SRVCNM as an optional parameter to the service and see if that helps.

    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect
  • 12. Re: Some more complex sample of invokin WS needed
    772640 Newbie
    Currently Being Moderated
    Hi Todd,

    I don't know what to say, this call to .TMIB works fine.

    ud32 -n < t_svcgrp.UD
    SENT pkt(1) is :
    TA_FLAGS 65536
    SRVCNM .TMIB
    TA_CLASS T_SVCGRP
    TA_OPERATION GET

    RTN pkt(1) is :
    TA_ERROR 0
    TA_MORE 0
    TA_OCCURS 1
    TA_BLOCKTIME 0
    TA_GRPNO 1
    TA_LOAD 50
    TA_NCOMPLETED 12
    TA_NQUEUED 0
    TA_PRIO 75
    TA_SVCTIMEOUT 0
    TA_TRANTIME 30
    TA_SRVID 3
    TA_CLASS T_SVCGRP
    TA_STATE ACTIVE
    TA_AUTOTRAN N
    TA_BUFTYPE ALL
    TA_ROUTINGNAME
    TA_RQADDR 00001.00003
    TA_SERVICENAME add
    TA_SVCRNAM GWWS
    TA_SVCTYPE APP
    TA_SIGNATURE_REQUIRED N
    TA_ENCRYPTION_REQUIRED N
    TA_BUFTYPECONV NOCONVERT
    TA_LMID simple
    TA_SRVGRP GROUP1
  • 13. Re: Some more complex sample of invokin WS needed
    Todd Little Expert
    Currently Being Moderated
    Hi Ransford,

    I'm not sure what a .TMIB request has to do with the problem. The issue I suspect is that most FML32 based services simply extract the fields needed from the FML32 buffer and ignore the rest. My guess is that the GWWS is pulling each field out of the buffer and trying to process it and when it hits an unknown field complains about it. I have a very vague recollection of this problem being encountered before, so let me see if there is some sort of work around.

    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect
  • 14. Re: Some more complex sample of invokin WS needed
    user12947803 Newbie
    Currently Being Moderated
    Halo,

    We are encountering the same issue while working on a wsdl...We are not able to figure out what is causing this issue...


    Apr 18, 2012 14:29:43 :(FLDID(197774461)) Client
    (FLDID(197774462)) GWWS_CAT:1068: DataMapping Error: There is the redundant data in the received buffer.


    Were you able to find the problem?...If so can you suggest the steps to analyze further and if there is any work around for this issue..


    Thanks,
    Babu Khan...
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points