does wsimport depend on the original source of the wsdl? - web-services

I'm learning about wsimport. In the examples I've seen, they show how to generate the wsdl from the server code, and then, how to use wsimport on the wsdl to generate the java client stubs. Does this imply that in order to use wsimport on the wsdl file, the wsdl file must need to have been originally created using jax-ws? Or should it work on any wsdl file?
The reason why I'm asking is because I get an error when I run the command:
"C:\Program Files\Java\jdk1.8.0_25\bin\wsimport" -s . http://developer.ebay.com/webservices/latest/ebaySvc.wsdl
I get [ERROR] unexpected <ws:any>
I'm still new at this, so I'm not sure if I'm doing something wrong, or if there's something wrong with the WSDL?

In principle it works with any wsdl (as long as it follows the standard). Have you tried to download it locally first, in case it wasn't obtained correctly remotely.

Related

Using gSOAP to consume a Web Service from C++

I have followed this page to generate client proxy of Web Service: https://www.genivia.com/doc/soapdoc2.html#tth_sEc1.2
The problem is that what occurs is different from what the document says it should occur.
For instance, this file was generated by "wsdl2h -o WSLipigas.h http_of_wsdl": WSLipigas.h
On the other hand, these files were generated by "soapcpp2 -i -C -Iimport WSLipigas.h": ns1.nsmap, SoapC.cpp, soapH.h, soapStub.h.
soapcpp2 output is different from what documentation says, even when i am using version 2.8.
When I examined the generated files, I didn't find any class that I can use conveniently.
The only methods i found were of the type "soap_METHOD_VERB_send__ns1__ACTUALFUNCTION" and "soap_METHOD_VERB_send__ns1__ACTUALFUNCTIONResponse"
With that, i don't now how to proceed later on.
Any help will be appreciated.

How to generate proxy class with wsdl.exe when my file imports other wsdl and xsd files?

I have a wsdl file and I'm trying to generate a proxy class with VS 2012 wsdl.exe tool, but when I try I get the following error message:
C:\VISUAL_STUDIO_PATH>wsdl.exe "C:\PATH_TO_FILE\AmHub_service_1_0.wsdl"
Error: Cannot find definition for http://www.csapi.org/wsdl/parlayx/v1_0/interface:CloudMovil. Service Description with namespace http://www.csapi.org/wsdl/parlayx/v1_0/interface is missing.
Parameter name: name
My AmHub_service_1_0.wsdl file imports a AmHub_interface_1_0.wsdl, which at the same time imports a parlayx_common_faults_2_0.wsdl from another namespace, and two other xsd files from different namespaces, called AmHub_types_1_0.xsd and parlayx_common_types_2_1.xsd.
The problem I think the tool is having, is that inside both AmHub_interface_1_0.wsdl and parlayx_common_faults_2_0.wsdl an xsd:import to parlayx_common_types_2_1.xsd is being made. I've read that the wsdl tool can't generate the proxy when this kind of situation is present.
How can I generate my proxy class for this kind of situation? Do I stick with the wsdl tool or are there other tools for Visual Studio 2012?
I went through this and the best way is using visual studio. Download wsdl file into a folder and put all schemas (xsd files) in it. Then Add Service Reference.
Add route to wsdl file.
Press OK and you are ready to go.

Making a client application with C++, GSOAP, and Onvif

I am using Visual Studio and GSOAP 2.8.15 to create a C++ Onvif client.
I have run these commands to create source code:
> wsdl2h -P -x -o onvif.h http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl
> soapcpp2 -i -C -IC:\gsoap-2.8.15\gsoap;C:\gsoap-2.8.15\gsoap\import onvif.h
Then I put these files in my MSVC solution:
duration.h/.cpp
soapH.h/soapC.cpp
stdsoap2.h/.cpp
I added this file to the directory but not to the solution:
soapStub.h
I added this as a #define to the compilation:
WITH_NONAMESPACES
I added this include to the main file of my program:
#include "soapDeviceBindingProxy.h"
This gives me a DeviceBindingProxy object, but I don't know what to do with it. I want to connect to an Onvif camera at a known ip address and request information about the device.
The GSOAP examples aren't specific to Onvif, and the Onvif pseudo-code examples aren't specific to GSOAP. Any help would be appreciated.
Just open the definition of DeviceBindingProxy object (or even better: run a doxygen on the gSoap-generated source files and enjoy comfortable HTML documentation).
It should contain a separate method for each action the service provides, named exactly as per service definition.
Each of the methods should take two parameters: request & response (their types are pointers to gSoap-generated structures: see their definition/documentation for details).
All you need to do is create instances of request & response, fill the request, pass pointers to both to this method and harvest the data from (already parsed) response.

oracle integration repository package

I am new to Oracle and have been having trouble following instructions for importing a package into the integration repository.
The instructions include code for creating a package and body, but don't really tell me what to do with that code. It looks like I should run it in SQL Plus. Is that correct?
It also includes instructions for generating the ILDT file--but only in a generic way. Those instructions just refer me to the "SOA Gateway Implementation Guide". (http://docs.oracle.com/cd/E18727_01/doc.121/e12169/T511175T543269.htm) The command is:
$IAS_ORACLE_HOME/perl/bin/perl $FND_TOP/bin/irep_parser.pl -g -v -username=sysadmin itg:patch/115/sql:fndav.pls:12.0=/tmp/fndav.pls
I'm not sure what to use for the .pls file. Is that generated and then the ILDT file is also created?
Apologies for this newbie question.
I appreciate any help!
Thanks,
Sami
You probably figured this by now, as per oracle conventions .pls file is the package specification and .plb is for package body.

Files missing with soapcpp2 version 2.8.1

I have a application that must communicate using SOAP with a SmartServer, which is a embedded device. The SOAP messages it accepts are without the namespaces but gSAOP sends them with namespaces. So they look like this:
<ns3:List>
<ns3:iLonItem>
<ns3:xSelect></ns3:xSelect>
</ns3:iLonItem>
</ns3:List>
Instead of this:
<List>
<iLonItem>
<xSelect></xSelect>
</iLonItem>
</List>
I first tried changing the qualified in the WSDL and XSD files to unqualified and then regenerating the files, and changing unqualified to qualified. But the best what i got is
<ns3:List>
<iLonItem>
<xSelect></xSelect>
</iLonItem>
</ns3:List>
Which looks better, but still the lists are with the namespaces.
Then I found this site stating that I must use the SOAP_XML_DEFAULTNS option, so I tried. This didn't work in the beginning but then I found out I have to use version 2.8.1 instead of 2.7.9l-0.2 (the standard version of Debian). So I uninstall-ed the Debian version and downloaded 2.8.1 and copied the files. But now when i try to generate files with soapcpp2 the following files are missing: soapClient.cpp, soapClientLib.cpp, soapProxy.h and a lot of *.req.xml and *.res.xml files. I need especially the soapClient.cpp file to compile my project.
I tried the standard binarys from the gsoap/bin directory and rebuilding the src and wsdl files from the gsoap directory as described in INSTALL.txt , but none of this works as I want to.
Can anybody help me a bit further?
For if it matters I'm using Debian Linux version 5.0.8 (Lenny, old-stable) 32 bits.
Regarding your question:
...the following files are missing: soapClient.cpp, soapClientLib.cpp, soapProxy.h and a lot of *.req.xml and *.res.xml files. I need especially the soapClient.cpp file to compile my project.
According to the link http://www.cs.fsu.edu/~engelen/soapdoc2.html#tth_sEc8 (see section 9.1)
it looks as if you may have used the wrong option set for the call to soapcpp2. Are you sure you did not specify "Generate server-side code only" by using the -S switch? For client side only you would use the -C. For both server and client side files, no switches are required. Also, generating the proxy files requires that -i be used.
Hope this helps,
Ryyker