Axis2 ADB mapping of Java keywords - axis2

I am trying to generate Axis2 client stubs and bean mappings using ADB for the following WSDL: https://secure.dnb.com.au/CCBB2BService/CreditCheck.asmx?wsdl.
Unfortunately one of the elements in the WSDL is called Class and that will result in JAva compiler errors. Is there a way to overcome this problem (using the ADB binding)?
<s:complexType name="ArrayOfClassComponent">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Class" type="tns:ClassComponent"/>
</s:sequence>
</s:complexType>
This is the command-line I have used:
$AXIS2_HOME/bin/wsdl2java.sh -uri https://secure.dnb.com.au/CCBB2BService/CreditCheck.asmx?wsdl --noBuildXML -d adb -s -u -uw -o .

Related

install MySql connector on Ubuntu Server, Mono

Connector is installed in gac:
nn#sv3:~/mysqlconnector.net/v4.5$ gacutil -l |grep MySql
MySql.Data, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
I have added MySql.Data to machine config:
nn#sv3:/$ cat /etc/mono/4.5/machine.config |grep MySql
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
When I try to comile with ref to MySql.Data I get:
nn#sv3:/$ sudo ./build.sh
error CS0006: Metadata file `MySql.Data.dll' could not be found
I have tried to changed ref with full path and both MySql.Data and MySql.Data.dll
Here is the compile command:
dmcs -target:library -out:SQLtest.dll -pkg:dotnet -lib:/usr/lib/mono/2.0 -lib:/usr/lib/mono/4.5 -r:MySql.Data -r:*.cs
Have also tried to use v4.0 with same result.
What am I missing to get this working?

Apache Axis2 User's Guide - Creating Clients

I am following along in the "Apache Axis2 User's Guide - Creating Clients"
http://axis.apache.org/axis2/java/core/docs/userguide-creatingclients.html#choosingclient
My problem is when I execute the command line argument from the guide:
%AXIS2_HOME%\bin\WSDL2Java -uri Axis2UserGuide.wsdl -p org.apache.axis2.axis2userguide -d adb -s
I get the following response, I am also unsure where axis2userguide.wsdl resides in the axis2 distribution.
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at 'Axis2UserGuide.wsdl'.: java.io.FileNotFoundException: This file was not found: file:/C:/Desktop/axis2-1.6.2/bin/Axis2UserGuide.wsdl
Is axis2userguide.wsdl a file included in the distro, or is it an arbitrary file name?
Thanks
I was able to the complete the step of creating the stub in the tutorial by doing the following:
C:\axis2-1.6.2\samples\quickstart>set CLASSPATH=%CLASSPATH%;C:\axis2-1.6.2\samples\quickstart\build\classes;
C:\axis2-1.6.2\samples\quickstart>%AXIS2_HOME%\bin\java2wsdl -cp . -cn samples.quickstart.service.pojo.StockQuoteService -of StockQuoteService.wsdl
C:\axis2-1.6.2\samples\quickstart>%AXIS2_HOME%\bin\WSDL2Java -uri StockQuoteService.wsdl -p org.apache.axis2.StockQuoteService.wsdl -d adb -s
The root cause was the file didn't exist, and my CLASSPATH wasn't set.
Hope this helps someone else.

Weblogic deployment J2EE Deployment SPI:260101]Parameter 'moduleArchive' may not be null

I am trying to re-deploy an application to Weblogic 10.3.6 using command line deployment using the following,
java weblogic.Deployer -adminurl myserver:7001 -user deploymyuser
-password welcome1 -targets mytarget -name appname -redeploy
D:/app/deploy/app.ear -upload -remote
I am getting the following errors
<Error> <J2EE Deployment SPI> <BEA-260101> <Parameter 'moduleArchive'
may not be null.>
[J2EE Deployment SPI:260101]Parameter 'moduleArchive' may not be null.
How can I resolve this issue?
Use the switch "-source" with the redeploy command:
java weblogic.Deployer -adminurl myserver:7001 -user deploymyuser -
password welcome1 -targets mytarget -name appname -redeploy
-source D:/app/deploy/app.ear -upload -remote

Exec Task in MSBuild for execution of command on remote machine

I am using following command to install a service via MSBuild file. This works great
<Exec Command= 'c:\test\myService.Appservices.exe install' ContinueOnError='false' />
But the above command install the service on local machine. I want to install the service on a remote machine. How can I specify the machine name using this command?
As per Mike Vine's comment, MSBuild doesn't include tools for remote execution. You could however use something like psexec. e.g.
<Exec Command='psexec -accepteula -s \\RemoteServer "C:\Path To EXE on Remote Machine\my.EXE"' IgnoreExitCode="false" ContinueOnError="false" Timeout="600000" >
<Output TaskParameter="ExitCode" PropertyName="exitCode1"/>
</Exec>

Axis2 generates Skeleton only for one port, but I have 2 ports

I have 2 ports in my WSDL:
<wsdl:portType name="Interface1">
<wsdl:portType name="Interface2">
I call
wsdl2java -g -o result -p "com.foo" -ss -ssi -ap -g -uri MyService.wsdl
After it I can find only "Interface1SkeletonInterface.java" in my "com/foo" folder.
Why?
wsdl2java has a command-line option -pn or --port-name to specify which port to generate code for. If not specified, the default is to generate code for the first listed port.
The ant task has an equivalent option portName.