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)
LVL 13
samic400Asked:
Who is Participating?
 
gpizzutoConnect With a Mentor Commented:
I don't know your library, but
is probably wcfInput._PARMCUST a collection or an array of parameters and not a single value ???
0
 
samic400Author Commented:
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.
0
 
samic400Author Commented:
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
0
 
samic400Author Commented:
Your comment made us think further, and we solved the issue
0
 
samic400Author Commented:
Issue resolved
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.