Unable to pass parameters to Web Service - InfoPath Dev
in

InfoPath Dev

Unable to pass parameters to Web Service

Last post 03-10-2011 06:53 PM by sr0737. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 06-06-2005 04:24 AM

    Unable to pass parameters to Web Service

    I've made an Infopath form where I call a Web service for reading some data. lets call it "readData". This web service returns the data in a complex Type, for example:

    returnType:
    Val1:string
    Val2:string

    This Works well. But I have also a call to a webservice for posting data (lets call it "sendData") with a complex type agument, for example:

    parameterType:
    val3:int
    val4:string

    When I make the connection fot "sendData" in Infopath it does not create automatically the Fields in "Data Surce". I create it manually (Same name and type of the "parameterType"), but when i send the form into web service val3 and val4 are "nothing" and they does not receive the data i've filled in the module.

    Why this happens???

    Thanks
  • 06-06-2005 04:55 AM In reply to

    Re: Unable to pass parameters to Web Service

    For a webmethod there will be two sections in your dataconnenction one is "QueryFields" and the other one is "DataFields". If you are passing parameters to a webmethod you need to set those value in QueryFields if you are getting values from a webmethod they will reside in "DataFields".

    Where are you setting the values, in the "QueryFields" or in "DataFields".
    If you are setting the values in "DataFields" it will not work. You need to set the values(web methods Parameters) in "QueryFields".

    Look at the DataConnections XML completely you will be able to understand this clearly.

    Hope this Helps!



    Agni
    InfoPathDev India
  • 06-06-2005 10:30 AM In reply to

    Re: Unable to pass parameters to Web Service

    I know this, but Infopath does not create DataFields and/or Query Fields for "parameterType" structure, so I can't do this :(
  • 06-07-2005 04:42 PM In reply to

    Re: Unable to pass parameters to Web Service

    Can you verify whether the schema to your webservice is created properly.
    And one more thing for a webservice XML is prepared when you create your dataconnection itself?

    Last thing when you are trying to call webservice is your call going till the Webserver?

    Agni
    InfoPathDev India
  • 06-07-2005 11:44 PM In reply to

    Re: Unable to pass parameters to Web Service

    To all your questions I can reply "YES".

    If I create a new module and connect it to the same web service only for sending, so there are no other connections than this one, Infopath creates the structure (DataFields and QueryFields) for all the parameters. After that, if I add a second connection to another webservice for sending data it does not create the DataFields and QueryFields Structure.
    If I create a connection for receiving data it always create the DataFields and QueryFields structure.

  • 06-12-2005 03:48 AM In reply to

    Re: Unable to pass parameters to Web Service

    If you are creating a "Submit" Dataconnection then you have to specify the data that is being sent to the WS as part of creating a data connection. You do not have a dom so that you can set those values dynamically

    If you want to set values dynamically to the WS then reate a "Recieve" data connection to the same web service function and then you have the DOM so that you can set the values dynamically. You can then submit this data by calling .Query on the Recieve dataconnection.

    Does this answer your question?

    Shanthi
    InfoPathDev India
    Shanthi Reddy
  • 03-10-2011 06:53 PM In reply to

    • sr0737
    • Not Ranked
    • Joined on 01-06-2011
    • Posts 5

    Re: Unable to pass parameters to Web Service

    Hi Shanthi, i am consuming webservice in infopath to submitt the data. i need to pass application name and app key as credentials to the webservice. is there any way i can pass credentials without any code in the form... can i pass credentials using .udc file ... Thanks, Suresh Reddy
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.