Link to home
Start Free TrialLog in
Avatar of Bob Butcher
Bob ButcherFlag for United States of America

asked on

Consume AS400 Web Service Problem

We have developed a web service on the AS400.  We are using ASP.Net to consume the service.  When no input parameters are defined, we receive data correctly,  when we define an input parameter, using visual studio 2012, we are not able to assign a value to the input parameter.

Dim wcfClient1 As WCSSHIPMNT.WCSSHIPMNTPortTypeClient = New WCSSHIPMNT.WCSSHIPMNTPortTypeClient

Dim wcfInput As WCSSHIPMNT.WCSSHIPMNTInput = New WCSSHIPMNT.WCSSHIPMNTInput

 wcfInput._PARMCUST = "12341234" (here we see "Value of type string cannot be converted to hank22.WCSSHIPMNT.PARMCUST

Any help would be appreciated


        Dim wcfResult1 As WCSSHIPMNT.WCSSHIPMNTResult = wcfClient1.wcsshipmnt(wcfInput)
ASKER CERTIFIED SOLUTION
Avatar of Giuseppe Pizzuto
Giuseppe Pizzuto
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bob Butcher

ASKER

Your question triggered an idea for us and it answered the problem.   In the RPG program on the 400, we had defined the parm field as Dparmcust         S     8   forgetting to place an A after the 8, indicating it was a Alpha field.  When the WSDL was generated, it did not know what datatype to make the field, so it defaulted to the name of the field,  after correcting the rpg program, and checking the wsdl, the datatype came back as TEXT, and when VS resolved and created the classes and properties, it defined the type as string as it should have.  Problem solved, and thank you for  the brain tickler.
I've requested that this question be closed as follows:

Accepted answer: 0 points for samic400's comment #a39555443

for the following reason:

The reply made us think further and we were able to solve the issue
Your comment made us think further, and we solved the issue
Issue resolved