Call Web Service

pvg1975
pvg1975 used Ask the Experts™
on
I need to call this web service:

https://product.api.cj.com/wsdl/version2/productSearchServiceV2.wsdl

I already added the reference, but I dont know how to use the service.

I know I need to pass a key, how do I do that programatically? (asp.net vb)

Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014
Commented:

Author

Commented:
Hi CodeCruiser!

Sorry, I dont understand C#

Im totally lost with this :(

Author

Commented:
And I saw the example with google, but I dont know how to make it work with the link I have to use.
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Most Valuable Expert 2012
Top Expert 2014

Commented:
Do you have any code at the moment? First step is to instantiate the client. Do a

Dim client As New ???

Replace ??? with whatever namespace and classname has been generated by the webservice.
in thsi example the webservice referensce name is test

Dim request As New test.Product (so if you put a dot after test you wil see a list)
        request. (than when you put the dot after requet you will see all your itesm of product)

in your solution explorer you can see the name of your webreference under the folder web reference

Author

Commented:
Hi all,

Sorry, I feel like an idiot, I never did this before and for some reason I cannot make it work after I read a lot of tutorials :(

I added the reference, and I named it C1

In the solution explorer, the following appears (inside C1)

Reference.svcmap
then

configuration.svcinfo
configuration91.svcinfo
productsearchserviceV2.wsdl

My problem is that I dont know how to pass parameters to it, they require me to pass a key and I dont know how. Here's their website: http://help.cj.com/en/web_services/web_services.htm#product_catalog_search_service_rest.htm

Thanks!

ok change the request var to test.productSearchServiceV2()

Dim request As New test.productSearchServiceV2()

create a response var
Dim response As New test.ProductResponse()

and then set the response var withe the request DOT search en op de the ( en there you will see all the vars you can fill in
        response = request.search(

i can't test because i don't have test info (like developer key etc)

maybe SoapUI can help you also with webservice there you can load in the WSDL en then can you see the request function.

Author

Commented:
Thanks Godeschalk!

I tried this:

response = request.search(developerKey = "33297824782378", websiteId = "344323")

and this

response = request.search("developerKey = 33297824782378, websiteId = 344323")

also this

response = request.search("developerKey = '33297824782378', websiteId = '344323'")

and I get "developerKey" is not declared constantly

Please help!

Author

Commented:
It looks like I have to enter "" for values that I dont want to pass any parameter!

I fixed it, but this is what I get;

Could not find default endpoint element that references contract 'LINKS.linkSearchServiceV2PortType' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

Author

Commented:
Thanks guys, I have like a zillion more questions lol, I will post them later today.

Thanks a lot :)

Paula

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial