473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

HRESULT=0x80070057: The parameter is incorrect. Consuming a web service

Hi All,
I've been struggling with this issue for a while. I am using the autogenerated code from Excel VBA to consume a web service which takes as input a complex type and returns a complex type. I keep getting the following error

Generic Custom Type Mapper:Element RequestKey could not be saved while saving type ItemRequest HRESULT=0x80070057: The parameter is incorrect.

I just can't figure out what's wrong. Can anyone help?

Below is the some code sniplets


Dim str_WSML As String
str_WSML = "<servicemapping>"
str_WSML = str_WSML & "<service name='ItemService_1'>"
str_WSML = str_WSML & "<using PROGID='MSOSOAP.GenericCustomTypeMapper30' cachable='0' ID='GCTM'/>"
str_WSML = str_WSML & "<types>"
str_WSML = str_WSML & "<type name='ChildItem' targetNamespace='http://schemas.rr.com/ns/2006/04/14/rmds/webservices/ItemService_1/types' uses='GCTM' targetClassName='struct_ChildItem'/>"
str_WSML = str_WSML & "<type name='Item' targetNamespace='http://schemas.rr.com/ns/2006/04/14/rmds/webservices/ItemService_1/types' uses='GCTM' targetClassName='struct_Item'/>"
str_WSML = str_WSML & "<type name='ItemRequest' targetNamespace='http://schemas.rr.com/ns/2006/04/14/rmds/webservices/ItemService_1/types' uses='GCTM' targetClassName='struct_ItemRequest'/>"
str_WSML = str_WSML & "<type name='ItemResponse' targetNamespace='http://schemas.rr.com/ns/2006/04/14/rmds/webservices/ItemService_1/types' uses='GCTM' targetClassName='struct_ItemResponse'/>"
str_WSML = str_WSML & "<type name='QoS' targetNamespace='http://schemas.rr.com/ns/2006/04/14/rmds/webservices/ItemService_1/types' uses='GCTM' targetClassName='struct_QoS'/>"
str_WSML = str_WSML & "<type name='RateInfo' targetNamespace='http://schemas.rr.com/ns/2006/04/14/rmds/webservices/ItemService_1/types' uses='GCTM' targetClassName='struct_RateInfo'/>"
str_WSML = str_WSML & "<type name='Status' targetNamespace='http://schemas.rr.com/ns/2006/04/14/rmds/webservices/ItemService_1/types' uses='GCTM' targetClassName='struct_Status'/>"
str_WSML = str_WSML & "<type name='TimelinessInfo' targetNamespace='http://schemas.rr.com/ns/2006/04/14/rmds/webservices/ItemService_1/types' uses='GCTM' targetClassName='struct_TimelinessInfo'/>"
str_WSML = str_WSML & "<type name='Field' targetNamespace='http://schemas.rr.com/ns/2006/04/14/rmds/webservices/omm' uses='GCTM' targetClassName='struct_Field'/>"
str_WSML = str_WSML & "<type name='ItemKey' targetNamespace='http://schemas.rr.com/ns/2006/04/14/rmds/webservices/omm' uses='GCTM' targetClassName='struct_ItemKey'/>"
str_WSML = str_WSML & "</types>"
str_WSML = str_WSML & "</service>"
str_WSML = str_WSML & "</servicemapping>"

Set sc_ItemService1 = New SoapClient30

sc_ItemService1.MSSoapInit2 c_WSDL_URL, str_WSML, c_SERVICE, c_PORT, c_SERVICE_NAMESPACE
'Use the proxy server defined in Internet Explorer's LAN settings by
'setting ProxyServer to <CURRENT_USER>
sc_ItemService1.ConnectorProperty("ProxyServer") = "<CURRENT_USER>"
'Autodetect proxy settings if Internet Explorer is set to autodetect
'by setting EnableAutoProxy to True
sc_ItemService1.ConnectorProperty("EnableAutoProxy ") = True

Set sc_ItemService1.ClientProperty("GCTMObjectFactory" ) = New clsof_Factory_ItemService1


Public Function wsm_RetrieveItem_1(ByVal obj_ItemRequest As struct_ItemRequest) As struct_ItemResponse
'************************************************* ****************
'Proxy function created from http://192.168.77.109/sds-ws/ItemService?WSDL.
'************************************************* ****************

'Error Trap
On Error GoTo wsm_RetrieveItem_1Trap

Set wsm_RetrieveItem_1 = sc_ItemService1.RetrieveItem_1(obj_ItemRequest)

Exit Function
wsm_RetrieveItem_1Trap:
ItemService1ErrorHandler "wsm_RetrieveItem_1"
End Function
Jul 19 '07 #1
0 3742

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: FS Liu | last post by:
Hi, In my current ATL server project, I have to parse the input in the client application's request to find out the different combination of parameters, instead of using SOAP. For this reason,...
7
by: Roberto Perez via .NET 247 | last post by:
Hello all and thank you in advance. We have several old applications in Cobol, Centura, etc that needs to be converted to .NET In order to save time our plan is to create web services and call...
1
by: mzam | last post by:
Hi everyone, I have a vbscript which is consuming WebMethods from a WebService. Whenever the WebMethod returns a string or integer then no problem but when the WebMethod returns a DataSet then...
0
by: Jessard | last post by:
Hi all, I am trying to consuming a .NET web service from a standard (classic) ASP page. I have come across a few articles which describe that it can be done as follows (after installing the...
2
by: Richard Collette | last post by:
Hi, I have a service, that runs perfectly when executed outside of the web service environment. When called as a web service I get the exception listed below sporadically. A call to the web...
4
by: Jianwei Sun | last post by:
Hi, all, I have a question, and I hope to get some hints here.. I created a really simple service just to check why the service manager doesn't start my service the second time if the first...
5
by: Lloyd Dupont | last post by:
Hi All! I have this application of mine which works well. It even used to work on Vista. (I work on XP most of the time). There are some ManagedC++ assemblies in the project. Now when I try...
9
by: =?Utf-8?B?Wm9vZG9y?= | last post by:
I have a web service, written in C#, that calls a managed C++ library that itself calls a third-party unmanaged C++ library (which is its only purpose - to allow me to call some unmanaged C++ from...
1
by: jeanbdenis | last post by:
Hi All, I've been struggling with this issue for a while. I am using the autogenerated code from Excel VBA to consume a web service which takes as input a complex type and returns a complex type. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.