as I am at my wits and I decided to post this also on StackOverflow.
I recently tried to create a basic Hello World web service (through the Function Builder), and turn it into a WSDL. Then using (Java) wsimport function turning it into java files.
The finction looks like this:
FUNCTION ZWEBSERVICE1.
write: / 'hello world'.
ENDFUNCTION.
The first problem I encountered is while executing wsimport. I got a error that states that wsdl:service is not in the file. After googling a while, I found no discussions/solutions to that problem. So I just wrote:
<wsdl:service name="ZWEBSERVICE1">
</wsdl:service>
into the file, and executed wsimport again, and got my java and class files.
The next problem I encountered is that the ZWEBSERVICE1.java class is somewhat empty... It looks like this:
...
public class ZWEBSERVICE1 {
}
... so now I am at my wits end, and hope that someone can give me some insight in what I did wrong.
I posted this as dicussion on SAP, so if there are any changes there I will update this topc.
http://scn.sap.com/thread/3800470
WRITE is used to produce ABAP lists for interactive display of offline usage within the ABAP system. It is not suitable for web services in any way. Since your function does not appear to have any parameters, it doesn't make much sense to turn it into a web service - I wouldn't expect anything but an empty WSDL file in this case...
Related
I am new to Taffy API framework. Trying to run the examples with Lucee but I get this error
invalid component definition, can't find component [resources.throwsException]
But it works all fine with ColdFusion.
May I miss something that it's very obvious. Or some mappings are required in Lucee but not in ColdFusion.
Thanks.
Below are the screen caps for additional details.
The webroot is folder name is play_taffy, under webroot, it is taffy with the lib and examples folder.
There are a lot of things going on here, so let me unpack them one by one. Taffy is very powerful and has a lot of functionality. It is worth the time. The examples on the other had also try to cover a lot of stuff. They kind of use a non standard approach to the directory structure.
Short answer
Based on your error message, one of two thing are happening, either ./Taffy/examples/api_LogToEmail/resources/savesLog.cfc does not exist or it has a path mapping in <cfcomponent extends="taffy.core.resource" taffy_uri="/foo"> that is not resolving.
Long answer
I see that you are using Ortus CommandBox. (Shameless plug follows). I have written code and have code on how to do this. If you go to https://github.com/jmohler1970/Taffy_video , You can find the first video.
If you go to https://coldfusion.adobe.com/profile/jamesmohler and click on blog, you will find eight videos on this very topic.
Some code
Over on, https://github.com/jmohler1970/Taffy_video Taffy,
Consider the following directory structure:
box.json has
{
"dependencies":{
"taffy":"git://github.com/atuttle/Taffy.git",
"formutils":"git://github.com/jmohler1970/FormUtils.git",
"northamerica":"git://github.com/jmohler1970/NorthAmerica.git"
},
"installPaths":{
"taffy":"taffy",
"formutils":"formutils",
"northamerica":"db_setup"
}
}
Note in the code that Taffy is no where to be seen. We have a very clean structure. Taffy has not been applied to it yet. This is a good thing. Because I know where Taffy in a more normal way. I don't have to wonder why the examples are the way the are. I can just worry about my own code.
application.cfc
component extends="taffy.core.api" {
...
this.mappings['/resources'] = expandPath('./resources');
this.mappings['/taffy'] = expandPath('./taffy');
This is where I get the mappings to work. This is likely different from the Taffy examples, but is much closer to what you might use in a production environment
Screen of the log file which has failed
Screen of the log file which has Passed
I have been working on RobotFramework. As I am new to it, got these problem.
My Test has 17 Test Cases. I Tested it and got log file as shown in image.
Initially it was showing perfect log with all description of each test cases but now I don't know what exactly I have done. It's showing incomplete log with no any description of test case.
How can it might happen:
Related to Browser (I'm using Chrome).
Or some problem with either Test Suite setup/tear down.
Please point out the exact issue.
I was facing the similar issue with the Robot framework. I tried to remove the robotframework.jar file from my environmental variable CLASSPATH. It worked like a charm.
This jar is necessary if you are using robot keyword annotations in your project. Turns out it wasn't necessary at all in my project. If it is in your case, try to update the Jar file by using latest release.
I am new to unit testing and the Qt framework. I have been assigned to write a unit test to test the opening of text files.
I have looked the the tutorials for Qt test. But I have no idea how to proceed. (I have to use QTestLib). Please guide me what I should do.
Boost libraries are being used to open the csv and delimited text-files to import the data in the application.
By testing, I am assuming that you want to check if the files are being read properly.
1) To get a better understanding about the Qt Project structure, check out this link
2) Locate the class that is actually calling the boost libraries to read the data, you might want to test this class (It depends on you how you want to implement, without any details, I cannot give a better explanation)
3) Create the corresponding object and invoke the reading of the file. After the file has been read, you can QVERIFY or QCOMPARE the data read by the class and the actual values. To use custom datatypes in the previous functions, look at this link. It is explained in the website, how to create and use custom datatypes for the above functions.
4) To run multiple tests in a single Test project (Qt), look at this github repo (I'm unable to find the website where it was originally posted).
I hope this gives an idea of how to get started with writing the test. It really depends on what your requirements are, without knowing the details, I might not be able to help more
I am implementing a relatively complex object model service using WWSAPI (WCF hosted) and have successfully downloaded the wsdl and code gen'd the service implementation. My question is, has anyone else noticed all of the
#if defined(WS_CPLUSPLUS)
defines littered throughout the generated code? Inside them is a C++ object representation of my service payload that would be 100x easier to use, however when I define WS_CPLUSPLUS all sorts of bad breaks loose on the compiler.
My question is this:
Has anyone successfully gotten that define to work, and if so, what resource or example did you use to get it to work?
Ok, answered my own question after digging through the sdk samples.
Once you generate the schema and wsdl files and import them into your project do the following:
Select all of the generated .c files, and right click -> properties
In the [Precompiled Headers] section: Change [Precompiled Header] to "Not Using Precompiled Headers"
In the [Advanced] section: Change [Compile As] to "Compile as C++ Code (/TP)"
Once you do this, you should successfully be able to add the "WS_CPLUSPLUS" preprocessor definition. I hope this can help brighten someones day
I've generated stubs using following commands
Axis: java org.apache.axis.wsdl.WSDL2Java CrmDiscoveryServiceWsdl.xml : Generates all classes
Axis2 : wsdl2java.bat -u -uri CrmDiscoveryServiceWsdl.xml : Generates only a few classes.
Pattern I observed is, in the wsdl:types section, it has created classes for the <s:element> types but not <s:complexTypes>. I don't get why. I have to use those complexType elements to consume webservice.
I've also tried -pn, -ap options, thought they might work, but ports had nothing to with this. I understood after I did it.
Note: I could generate all with Axis2 when I use -ss -g options, which also generates server side. Obviously, it's a workaround and I don't need atleast some of them.
Please help.
Thanks.
I noticed this too with something a little different. Generating stubs with Axis2 1.6 against Great Plains 10, some types were missing. They were all xsd complex types which derived from other types in the schema definition. This only caused an error when parsing a response that included these missing types. The error was thrown from the ExtensionMapper.
After generating with the '-g' option, more types (including these missing derived types) are included in the ExtensionMapper and the problem is fixed.
I'm not sure what generating server side code has to do with properly parsing and generating the adb beans, but it works now.
There's also bug in the Apache Axis JIRA which mentions differing beans when using -g vs not using it:
http://issues.apache.org/jira/browse/AXIS2-3988