You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jacques Poulin <ja...@gmail.com> on 2008/04/07 04:15:40 UTC
Just a small client sample would really be great !
Hi,
I'm trying to figure out how to write a client application to connect to the
Betdaq API (http://api.betdaq.com).
The WSDL for the web services is here : http://api.betdaq.com/v2.0/API.wsdl
I downloaded Axis (2.1.3), and launched the wsdl2java.bat script. I've
tried different combinations of options to that command, but basically, I
always wind up with 4 files :
ReadOnlyServiceCallbackHandler.java
ReadOnlyServiceStub.java
SecureServiceCallbackHandler.java
SecureServiceStub.java
I'm sure that someone with a lot of experience with Axis could write a
simple method that would use either of those stubs to make a call to the
API.
Any of Betdaq's methods would be fine... The ListTopLevelEvents seems
simple enough...
Once I've seen a sample, I'm sure I'll be fine... I just need some help to
start.
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: Just a small client sample would really be great !
Posted by Jacques Poulin <ja...@gmail.com>.
Thank you Alberto, that is exactly what I was looking for.
However, I have three questions:
1- I'm trying to recreate the Java files from the WSDL today. I delete
everything that was created beforehand (directories and all), and re-issue
the wsdl2java command from DOS:
Wsdl2java -uri http://api.betdaq.com/v2.0/API.wsdl
I get an out of memory error with something about "pretty printing". I do,
however, get the following files, and they seem to contain errors if I
import them in my Eclipse project:
ReadOnlyServiceCallbackHandler.java
ReadOnlyServiceStub.java
SecureServiceCallbackHandler.java
SecureServiceStub.java
If I add this JAVA_OPTS environment variable:
-Xms512m -Xmx1024m
I get this error:
Using AXIS2_HOME: O:\Download\axis2-1.3
Using JAVA_HOME: C:\Program Files\Java\jdk1.5.0_10
[ERROR] PARSER_ERROR
O:\Download\axis2-1.3\bin\.\src\com\globalbettingexchange\www\externalapi\Re
adOnlyServiceStub.java:38572:16: unexpected token: staticabstract
at
de.hunsicker.jalopy.language.antlr.InternalJavaParser.classField(InternalJav
aParser.java:3119)
at
de.hunsicker.jalopy.language.antlr.InternalJavaParser.classBlock(InternalJav
aParser.java:2457)
at
de.hunsicker.jalopy.language.antlr.InternalJavaParser.classDefinition(Intern
alJavaParser.java:710)
at
de.hunsicker.jalopy.language.antlr.InternalJavaParser.typeDefinitionInternal
(InternalJavaParser.java:632)
at
de.hunsicker.jalopy.language.antlr.InternalJavaParser.typeDefinition(Interna
lJavaParser.java:465)
at
de.hunsicker.jalopy.language.antlr.InternalJavaParser.parse(InternalJavaPars
er.java:296)
at
de.hunsicker.jalopy.language.JavaRecognizer.parse(JavaRecognizer.java:588)
at de.hunsicker.jalopy.Jalopy.parse(Jalopy.java:1212)
at de.hunsicker.jalopy.Jalopy.format(Jalopy.java:1044)
at de.hunsicker.jalopy.Jalopy.format(Jalopy.java:1017)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.axis2.util.PrettyPrinter.prettify(PrettyPrinter.java:89)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettifyF
ile(JavaPrettyPrinterExtension.java:66)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:46)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.AbstractPrettyPrinterExtension.engag
e(AbstractPrettyPrinterExtension.java:36)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEn
gine.java:259)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
[ERROR] PARSER_ERROR
O:\Download\axis2-1.3\bin\.\src\com\globalbettingexchange\www\externalapi\Re
adOnlyServiceStub.java:101342:22: unexpected token: org
at
de.hunsicker.jalopy.language.antlr.InternalJavaParser.typeDefinitionInternal
(InternalJavaParser.java:660)
at
de.hunsicker.jalopy.language.antlr.InternalJavaParser.typeDefinition(Interna
lJavaParser.java:465)
at
de.hunsicker.jalopy.language.antlr.InternalJavaParser.parse(InternalJavaPars
er.java:296)
at
de.hunsicker.jalopy.language.JavaRecognizer.parse(JavaRecognizer.java:588)
at de.hunsicker.jalopy.Jalopy.parse(Jalopy.java:1212)
at de.hunsicker.jalopy.Jalopy.format(Jalopy.java:1044)
at de.hunsicker.jalopy.Jalopy.format(Jalopy.java:1017)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.axis2.util.PrettyPrinter.prettify(PrettyPrinter.java:89)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettifyF
ile(JavaPrettyPrinterExtension.java:66)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:46)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.JavaPrettyPrinterExtension.prettify(
JavaPrettyPrinterExtension.java:50)
at
org.apache.axis2.wsdl.codegen.extension.AbstractPrettyPrinterExtension.engag
e(AbstractPrettyPrinterExtension.java:36)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEn
gine.java:259)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
2- When I try to instead use the Eclipse plug-in to generate the Java files,
I only get the SecureServiceStub.java and SecureServiceCallbackHandler.java
files, and not the ReadOnlyService*.java files ?!?
-----Original Message-----
From: Alberto Patino [mailto:pato.lukaz@gmail.com]
Sent: 7 avril 2008 00:34
To: axis-user@ws.apache.org
Subject: Re: Just a small client sample would really be great !
/**
*
*/
package com.sample.betdaq;
import java.math.BigDecimal;
import java.rmi.RemoteException;
import org.apache.axis2.AxisFault;
import com.globalbettingexchange.www.externalapi.BaseResponseSequence3;
import com.globalbettingexchange.www.externalapi.EventClassifierType;
import com.globalbettingexchange.www.externalapi.ExternalApiHeader;
import com.globalbettingexchange.www.externalapi.ExternalApiHeaderE;
import com.globalbettingexchange.www.externalapi.ListTopLevelEvents;
import com.globalbettingexchange.www.externalapi.ListTopLevelEventsRequest;
import com.globalbettingexchange.www.externalapi.ListTopLevelEventsResponse;
import
com.globalbettingexchange.www.externalapi.ListTopLevelEventsResponseE;
/**
* @author albertop
*
*/
public class BetdaqClient {
public final static String epr =
"http://api.betdaq.com/v2.0/API.wsdl";
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
ReadOnlyServiceStub clientStub = new
ReadOnlyServiceStub(epr);
ListTopLevelEvents list = new ListTopLevelEvents();
ListTopLevelEventsRequest eventsRequest = null;
list.setListTopLevelEventsRequest(eventsRequest);
ExternalApiHeaderE header = new
ExternalApiHeaderE();
ExternalApiHeader apiHeader = new
ExternalApiHeader();
String langCode="us-en";
apiHeader.setLanguageCode(langCode);
int theVersion = 1;
BigDecimal version = new BigDecimal(theVersion);
apiHeader.setVersion(version);
String username="test";
apiHeader.setUsername(username);
String password="test";
apiHeader.setPassword(password);
header.setExternalApiHeader(apiHeader);
ListTopLevelEventsResponseE response;
response = clientStub.ListTopLevelEvents(list,
header);
ListTopLevelEventsResponse listTopLevelEventsResult
= response.getListTopLevelEventsResult();
BaseResponseSequence3[] baseResponseSequence =
listTopLevelEventsResult.getBaseResponseSequence();
int size = baseResponseSequence.length;
for (int i = 0; i<size; i++){
EventClassifierType classifier =
baseResponseSequence[i].getEventClassifiers();
System.out.println("Name is
"+classifier.getName()+" Id is "+ classifier.getId());
}
} catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
On Sun, Apr 6, 2008 at 9:15 PM, Jacques Poulin <ja...@gmail.com>
wrote:
> Hi,
>
> I'm trying to figure out how to write a client application to connect
> to the Betdaq API (http://api.betdaq.com).
>
> The WSDL for the web services is here :
> http://api.betdaq.com/v2.0/API.wsdl
>
> I downloaded Axis (2.1.3), and launched the wsdl2java.bat script.
> I've tried different combinations of options to that command, but
> basically, I always wind up with 4 files :
>
> ReadOnlyServiceCallbackHandler.java
> ReadOnlyServiceStub.java
> SecureServiceCallbackHandler.java
> SecureServiceStub.java
>
> I'm sure that someone with a lot of experience with Axis could write
> a simple method that would use either of those stubs to make a call
> to the API.
>
> Any of Betdaq's methods would be fine... The ListTopLevelEvents
> seems simple enough...
>
> Once I've seen a sample, I'm sure I'll be fine... I just need some
> help to start.
>
> Thanks.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Don't be evil!!!
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Jacques46 <ja...@gmail.com>.
By the way, if you have the time Alberto, maybe you could subscribe to
nabble.com, I find the mailing list to be slow, whereas posts to the list
through Nabble can be seen instantaneously on the web site...
Here's this thread's url:
http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tt16532618.html#a16532618
http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tt16532618.html#a16532618
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16609469.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: axis2 with spring, ibatis
Posted by Henry Lu <zh...@umich.edu>.
Where did you configure the loading files in an aar file for the axis2
service? There is no web.xml file, do we?
-Henry
robert lazarski wrote:
> I've never used ibatis, but presumably you'd load its config files via
> the classpath like you do with hibernate. Hint: load the resources in
> an exploded AAR as its easier. There's some tips on loading hibernate
> files in the spring tutorial and a good place to start would be trying
> the same thing with ibatis.
>
> HTH,
> Robert
>
> On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu <zh...@umich.edu> wrote:
>
>> Are there anyones who are using axis2 with spring and ibatis to access a
>> database? Could some one show me how to do this in the service (not client)
>> with an aar file? I don't know how to initialize/load the ibatis map file.
>>
>> -Henry
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: axis2 with spring, ibatis
Posted by Henry Lu <zh...@umich.edu>.
Thank you Mr. Bull. Could you send me your sql-map-config.xml? My
sql-map-config.xml is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig
PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<sqlMap resource="misc.xml"/>
</sqlMapConfig>
And I got the errors:
[java] [ERROR] The ChkUniqnameService.aar service, which is not
valid, caus
ed Error creating bean with name 'sqlMapClient' defined in class path
resource [
applicationContext.xml]: Invocation of init method failed; nested
exception is j
ava.lang.RuntimeException: Error occurred. Cause:
com.ibatis.common.xml.Nodelet
Exception: Error parsing XML. Cause: java.lang.RuntimeException: Error
parsing
XPath '/sqlMapConfig/sqlMap'. Cause: java.io.IOException: Could not
find resour
ce misc.xml
-Henry
Anthony Bull wrote:
> I'm doing iBatis, Spring in an AAR in production released Axis 2 web
> services. In our case it is even harder than the equivalent hibernate
> setup, especially if you have multiple web services doing it and don't
> want them treading on each other's SQL maps.
>
> If the Spring with Hibernate tutorial doesn't work in your case, I've
> done a tutorial on how I got my iBatis/Spring/Axis2 setup working that
> you can try out:
>
> http://thejavamonkey.blogspot.com/2008/04/axis-2-web-services-with-spring-and.html
>
> cheers,
> Ants.
>
> robert lazarski wrote:
>> I've never used ibatis, but presumably you'd load its config files via
>> the classpath like you do with hibernate. Hint: load the resources in
>> an exploded AAR as its easier. There's some tips on loading hibernate
>> files in the spring tutorial and a good place to start would be trying
>> the same thing with ibatis.
>>
>> HTH,
>> Robert
>>
>> On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu <zh...@umich.edu> wrote:
>>
>>> Are there anyones who are using axis2 with spring and ibatis to access a
>>> database? Could some one show me how to do this in the service (not client)
>>> with an aar file? I don't know how to initialize/load the ibatis map file.
>>>
>>> -Henry
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>>
>
>
> --
>
> Anthony
> -------------------------------------
> Anthony Bull
> Senior Developer
> Black Coffee Software Ltd
> PO Box 10-192 The Terrace
> Wellington, New Zealand
>
> anthony.bull@bcsoft.co.nz
> Ph +64 4 472 8818
> Fax +64 4 472 8811
> -------------------------------------
> www.bcsoft.co.nz
> ---------------------------------------------------------------
> This email may contain confidential or privileged information,
> and is intended for use only by the addressee, or addressees.
> If you are not the intended recipient please advise the sender
> immediately and do not copy, use or disclose the contents to
> any other person or organisation.
> Black Coffee Software Ltd accepts no responsibility for viruses
> received with this email, or to any changes made to the original
> content. Any views or opinions expressed in this email may be
> personal to the sender and are not necessarily those of Black
> Coffee Software Ltd.
> ---------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: axis2 with spring, ibatis
Posted by Anthony Bull <an...@bcsoft.co.nz>.
I'm doing iBatis, Spring in an AAR in production released Axis 2 web
services. In our case it is even harder than the equivalent hibernate
setup, especially if you have multiple web services doing it and don't
want them treading on each other's SQL maps.
If the Spring with Hibernate tutorial doesn't work in your case, I've
done a tutorial on how I got my iBatis/Spring/Axis2 setup working that
you can try out:
http://thejavamonkey.blogspot.com/2008/04/axis-2-web-services-with-spring-and.html
cheers,
Ants.
robert lazarski wrote:
> I've never used ibatis, but presumably you'd load its config files via
> the classpath like you do with hibernate. Hint: load the resources in
> an exploded AAR as its easier. There's some tips on loading hibernate
> files in the spring tutorial and a good place to start would be trying
> the same thing with ibatis.
>
> HTH,
> Robert
>
> On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu <zh...@umich.edu> wrote:
>
>> Are there anyones who are using axis2 with spring and ibatis to access a
>> database? Could some one show me how to do this in the service (not client)
>> with an aar file? I don't know how to initialize/load the ibatis map file.
>>
>> -Henry
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
--
Anthony
-------------------------------------
Anthony Bull
Senior Developer
Black Coffee Software Ltd
PO Box 10-192 The Terrace
Wellington, New Zealand
anthony.bull@bcsoft.co.nz
Ph +64 4 472 8818
Fax +64 4 472 8811
-------------------------------------
www.bcsoft.co.nz
---------------------------------------------------------------
This email may contain confidential or privileged information,
and is intended for use only by the addressee, or addressees.
If you are not the intended recipient please advise the sender
immediately and do not copy, use or disclose the contents to
any other person or organisation.
Black Coffee Software Ltd accepts no responsibility for viruses
received with this email, or to any changes made to the original
content. Any views or opinions expressed in this email may be
personal to the sender and are not necessarily those of Black
Coffee Software Ltd.
---------------------------------------------------------------
Re: axis2 with spring, ibatis
Posted by robert lazarski <ro...@gmail.com>.
I've never used ibatis, but presumably you'd load its config files via
the classpath like you do with hibernate. Hint: load the resources in
an exploded AAR as its easier. There's some tips on loading hibernate
files in the spring tutorial and a good place to start would be trying
the same thing with ibatis.
HTH,
Robert
On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu <zh...@umich.edu> wrote:
> Are there anyones who are using axis2 with spring and ibatis to access a
> database? Could some one show me how to do this in the service (not client)
> with an aar file? I don't know how to initialize/load the ibatis map file.
>
> -Henry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
axis2 with spring, ibatis
Posted by Henry Lu <zh...@umich.edu>.
Are there anyones who are using axis2 with spring and ibatis to access a
database? Could some one show me how to do this in the service (not
client) with an aar file? I don't know how to initialize/load the ibatis
map file.
-Henry
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: [Axis2] WSDL2Java generate code for only one method in the service
Posted by "Karr, David" <da...@wamu.net>.
Note that you might be able to use WSDL4J to automatically construct a
WSDL with only the pieces you need. You could do this in your build
script.
> -----Original Message-----
> From: Qureshi, Affan [mailto:AQureshi@epsilon.com]
> Sent: Monday, April 14, 2008 11:57 AM
> To: 'axis-user@ws.apache.org'
> Subject: RE: [Axis2] WSDL2Java generate code for only one
> method in the service
>
> Thanks for the quick response. The problem is that I don't
> have control over the WSDL file since it belongs to a partner company.
>
> I will try to generate individual small files and delete
> unwanted ones.
>
> Thanks,
>
> Affan
>
> -----Original Message-----
> From: Jacques46 [mailto:jacques.poulin@gmail.com]
> Sent: Monday, April 14, 2008 1:32 PM
> To: axis-user@ws.apache.org
> Subject: Re: [Axis2] WSDL2Java generate code for only one
> method in the service
>
>
> This is only a guess, but I'm pretty sure that you could
> delete all the methods you don't want from the WSDL file
> itself, and then use WSDL2Java on the resulting file... Of
> course, I'm again guessing that you couldn't remove methods
> or types that are referred by other parts of the WSDL file...
>
> My understanding is that the WSDL file is simply a descriptor
> of the methods (and objects used by those methods) of an
> application. Remove method descriptors from the file, and
> WSDL2Java should generate an application without those methods.
>
> But I'm new to this whole WSDL thing, so don't take my answer
> too seriously...
>
> Oh, also note that there are 2 ways to generate the result :
> very few BIG files, of a lot of small files... I think the
> param to use is '-u' to get the smaller files...
>
>
> AQureshi wrote:
> >
> > Hi All,
> >
> > I have a WSDL file with around 15 different methods but I
> want to use
> > only one of those in my application. I tried the WSDL2Java
> tool which
> > worked great except that the generated code is thousands of
> lines. Is
> > there a way I can limit the tool to generate only a subset or do I
> > just have to open the generated file and delete the
> unwanted code? It
> > is fairly easy to do that but it is just not automate-able.
> >
> > Thanks a lot.
> >
> > Affan
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Just-a-small-client-sample-would-really-
> be-great-%21-tp16532618p16685278.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: [Axis2] WSDL2Java generate code for only one method in the
service
Posted by "Qureshi, Affan" <AQ...@epsilon.com>.
Thanks for the quick response. The problem is that I don't have control over the WSDL file since it belongs to a partner company.
I will try to generate individual small files and delete unwanted ones.
Thanks,
Affan
-----Original Message-----
From: Jacques46 [mailto:jacques.poulin@gmail.com]
Sent: Monday, April 14, 2008 1:32 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2] WSDL2Java generate code for only one method in the service
This is only a guess, but I'm pretty sure that you could delete all the
methods you don't want from the WSDL file itself, and then use WSDL2Java on
the resulting file... Of course, I'm again guessing that you couldn't
remove methods or types that are referred by other parts of the WSDL file...
My understanding is that the WSDL file is simply a descriptor of the methods
(and objects used by those methods) of an application. Remove method
descriptors from the file, and WSDL2Java should generate an application
without those methods.
But I'm new to this whole WSDL thing, so don't take my answer too
seriously...
Oh, also note that there are 2 ways to generate the result : very few BIG
files, of a lot of small files... I think the param to use is '-u' to get
the smaller files...
AQureshi wrote:
>
> Hi All,
>
> I have a WSDL file with around 15 different methods but I want to use only
> one of those in my application. I tried the WSDL2Java tool which worked
> great except that the generated code is thousands of lines. Is there a way
> I can limit the tool to generate only a subset or do I just have to open
> the generated file and delete the unwanted code? It is fairly easy to do
> that but it is just not automate-able.
>
> Thanks a lot.
>
> Affan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16685278.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] WSDL2Java generate code for only one method in the
service
Posted by Jacques46 <ja...@gmail.com>.
This is only a guess, but I'm pretty sure that you could delete all the
methods you don't want from the WSDL file itself, and then use WSDL2Java on
the resulting file... Of course, I'm again guessing that you couldn't
remove methods or types that are referred by other parts of the WSDL file...
My understanding is that the WSDL file is simply a descriptor of the methods
(and objects used by those methods) of an application. Remove method
descriptors from the file, and WSDL2Java should generate an application
without those methods.
But I'm new to this whole WSDL thing, so don't take my answer too
seriously...
Oh, also note that there are 2 ways to generate the result : very few BIG
files, of a lot of small files... I think the param to use is '-u' to get
the smaller files...
AQureshi wrote:
>
> Hi All,
>
> I have a WSDL file with around 15 different methods but I want to use only
> one of those in my application. I tried the WSDL2Java tool which worked
> great except that the generated code is thousands of lines. Is there a way
> I can limit the tool to generate only a subset or do I just have to open
> the generated file and delete the unwanted code? It is fairly easy to do
> that but it is just not automate-able.
>
> Thanks a lot.
>
> Affan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16685278.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
[Axis2] WSDL2Java generate code for only one method in the service
Posted by "Qureshi, Affan" <AQ...@epsilon.com>.
Hi All,
I have a WSDL file with around 15 different methods but I want to use only one of those in my application. I tried the WSDL2Java tool which worked great except that the generated code is thousands of lines. Is there a way I can limit the tool to generate only a subset or do I just have to open the generated file and delete the unwanted code? It is fairly easy to do that but it is just not automate-able.
Thanks a lot.
Affan
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Jacques46 <ja...@gmail.com>.
At last, success !
I tweeked your build.properties file, build.xml file, installed junit,
launched ant, and it came back with exceptions.
I decided to install the 1.5 jdk from Sun instead (I don't know what Fedora
was using), and the exceptions went away. So I think my last problems from
the last 2 days had to do with the wrong JDK. Just thought I'd post that
fact, maybe it'll help someone along the way.
Thanks Alberto. You were very helpful.
Jacques
alpatino2 wrote:
>
> On Fri, Apr 11, 2008 at 10:39 AM, Jacques46 <ja...@gmail.com>
> wrote:
>>
>> By the way, I was wondering on which platform you generated the Java
>> files ?
>>
> Linux, is there another operating system? ;-)
>
>
>
>> I'm asking because I was using Windows, but decided to try Linux
>> (Fedora),
>> with the same Snapshot distribution, and I got a bunch of warnings and
>> exceptions...
>
> Nice decision, I uploaded my project here:
>
> http://www.4shared.com/file/43790367/3e3548a7/betdaqtar.html
>
> It would be fine if you can understand the structure of the project
> and use the build.xml for future projects. Also you can import the
> same project to eclipse:
>
> Please read the README file inside the sample, the build.xml is not
> tested but you can give you an idea to customize it to your needs.
>
>
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16648697.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Alberto Patino <pa...@gmail.com>.
On Fri, Apr 11, 2008 at 10:39 AM, Jacques46 <ja...@gmail.com> wrote:
>
> By the way, I was wondering on which platform you generated the Java files ?
>
Linux, is there another operating system? ;-)
> I'm asking because I was using Windows, but decided to try Linux (Fedora),
> with the same Snapshot distribution, and I got a bunch of warnings and
> exceptions...
Nice decision, I uploaded my project here:
http://www.4shared.com/file/43790367/3e3548a7/betdaqtar.html
It would be fine if you can understand the structure of the project
and use the build.xml for future projects. Also you can import the
same project to eclipse:
Please read the README file inside the sample, the build.xml is not
tested but you can give you an idea to customize it to your needs.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Jacques46 <ja...@gmail.com>.
By the way, I was wondering on which platform you generated the Java files ?
I'm asking because I was using Windows, but decided to try Linux (Fedora),
with the same Snapshot distribution, and I got a bunch of warnings and
exceptions...
Here's the log with the -u option :
./wsdl2java.sh -or -u -uri http://api.betdaq.com/v2.0/API.wsdl
Using AXIS2_HOME: /home/jacques/axis2-SNAPSHOT
Using JAVA_HOME: /usr/lib/jvm/java-1.5.0-gcj-1.5.0.0
Retrieving document at 'http://api.betdaq.com/v2.0/API.wsdl'.
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ChangeHeartbeatRegistrationRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListBootstrapOrdersResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListAccountPostingsResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}GetPricesResponse
missing!
[WARN] Type {http://www.GlobalBettingExchange.com/ExternalAPI/}PulseResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListMarketWithdrawalHistoryResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListMarketWithdrawalHistoryResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}UpdateOrdersNoReceiptResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}PlaceOrdersNoReceiptResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListSelectionsChangedSinceResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListTopLevelEventsRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}CancelAllOrdersOnMarketRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}RegisterHeartbeatRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}CancelOrdersResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}GetMarketInformationRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}PlaceOrdersWithReceiptRequestItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}PlaceOrdersWithReceiptRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListOrdersChangedSinceResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}CancelAllOrdersResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}SuspendOrdersRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}UnsuspendFromTradingResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}GetCurrentSelectionSequenceNumberRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}SuspendAllOrdersOnMarketResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}GetEventSubTreeWithSelectionsResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}SuspendAllOrdersOnMarketRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListTopLevelEventsResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListSelectionsChangedSinceRequest
missing!
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
...2 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(libgcj.so.8rh)
at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
...3 more
Caused by: org.apache.axis2.schema.SchemaCompilationException:
java.lang.NullPointerException
at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:289)
at
org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:103)
at java.lang.reflect.Method.invoke(libgcj.so.8rh)
...4 more
Caused by: java.lang.NullPointerException
at
org.apache.axis2.schema.SchemaCompiler.writeElement(SchemaCompiler.java:522)
at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:381)
at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:280)
...6 more
And here's the log without the -u option:
Using AXIS2_HOME: /home/jacques/axis2-SNAPSHOT
Using JAVA_HOME: /usr/lib/jvm/java-1.5.0-gcj-1.5.0.0
Retrieving document at 'http://api.betdaq.com/v2.0/API.wsdl'.
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}SuspendFromTradingRequest
missing!
[WARN] Type {http://www.GlobalBettingExchange.com/ExternalAPI/}MarketType
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}SuspendAllOrdersRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListBootstrapOrdersResponse
missing!
[WARN] Type {http://www.GlobalBettingExchange.com/ExternalAPI/}MarketType
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListAccountPostingsResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}SelectionTypeWithPrices
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}GetPricesResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}SuspendOrdersResponseItem
missing!
[WARN] Type {http://www.GlobalBettingExchange.com/ExternalAPI/}PulseResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}UpdateOrdersNoReceiptRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListMarketWithdrawalHistoryResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListMarketWithdrawalHistoryResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}UpdateOrdersNoReceiptResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}PlaceOrdersNoReceiptResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}PlaceOrdersNoReceiptResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}SuspendOrdersResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}SuspendOrdersResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListSelectionsChangedSinceResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListSelectionsChangedSinceResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListTopLevelEventsRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}CancelAllOrdersOnMarketRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}RegisterHeartbeatRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}CancelOrdersResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}GetMarketInformationRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}PlaceOrdersWithReceiptRequestItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}ListOrdersChangedSinceResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}CancelAllOrdersResponseItem
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}CancelAllOrdersResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}RegisterHeartbeatResponse
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}SuspendOrdersRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}GetCurrentSelectionSequenceNumberRequest
missing!
[WARN] Type
{http://www.GlobalBettingExchange.com/ExternalAPI/}SuspendOrdersResponseItem
missing!
./axis2.sh: line 56: 3260 Segmentation fault "$JAVA_HOME"/bin/java
-classpath "$AXIS2_CLASSPATH" -Daxis2.xml="$AXIS2_HOME/conf/axis2.xml"
-Daxis2.repo="$AXIS2_HOME/repository" $USER_COMMANDS
I tried generating the code again with the wsdl2java utility.
With the -u option, the receiveResultGetPrices (and, I'm sure other methods
as well) is missing from the ReadOnlyServiceCallbackHandler.java file.
If I remove the -u option, then the method is there, but of course, instead
of getting hundreds of java files, I only get 4, 2 of them being huge...
small annoyance, the important thing is I can now talk to Betdaq.
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16627888.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Jacques46 <ja...@gmail.com>.
I tried generating the code again with the wsdl2java utility.
With the -u option, the receiveResultGetPrices (and, I'm sure other methods
as well) is missing from the ReadOnlyServiceCallbackHandler.java file.
If I remove the -u option, then the method is there, but of course, instead
of getting hundreds of java files, I only get 4, 2 of them being huge...
small annoyance, the important thing is I can now talk to Betdaq.
Thank you very much for your help Alberto. Hoping it helps someone else
along the way.
alpatino2 wrote:
>
> I downloaded the yesterday snapshot as you and I only had to update
> the client code modifying the BaseResponseSequence3 class to
> BaseResponseSequence6 and its working...
>
> Clean all your project and start from the beginning
>
>
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16623910.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Alberto Patino <pa...@gmail.com>.
I downloaded the yesterday snapshot as you and I only had to update
the client code modifying the BaseResponseSequence3 class to
BaseResponseSequence6 and its working...
Clean all your project and start from the beginning
On Thu, Apr 10, 2008 at 8:23 AM, Jacques46 <ja...@gmail.com> wrote:
>
> This is getting really frustrating... >-(
>
> I downloaded the snapshot distribution from here (by the way it was the
> april 10 version):
>
> http://people.apache.org/dist/axis2/nightly/distribution-SNAPSHOT-bin.zip
> http://people.apache.org/dist/axis2/nightly/distribution-SNAPSHOT-bin.zip
>
> I dropped it to a folder on my drive.
>
> I updated my AXIS2_HOME environment variable to point to that folder.
>
> Opened a DOS prompt, went to the folder's bin sub-folder, and typed :
>
> wsdl2java -u -uri http://api.betdaq.com/v2.0/API.wsdl
>
> This created a "src" sub-tree. In
> \src\com\globalbettingexchange\www\externalapi, I found all the generated
> classes. I copied the \com folder to my Eclipse project.
>
> I then copied all the jars from the \lib sub-folder of the distribution to
> my project's lib directory, and updated the build path in the project
> properties to include those jars.
>
> Tried compiling : came up with a bunch of errors.
>
> The first one says :
>
> [javac]
> ...\com\globalbettingexchange\www\externalapi\ReadOnlyServiceStub.java:413:
> cannot find symbol
> [javac] symbol : method
> receiveResultGetPrices(com.globalbettingexchange.www.externalapi.GetPricesResponseE)
> [javac] location: class
> com.globalbettingexchange.www.externalapi.ReadOnlyServiceCallbackHandler
> [javac] callback.receiveResultGetPrices(
>
> Sure enough, this receiveResultGetPrices method is nowhere to be found in
> any of the source files generated by wsdl2java.
>
> Could it be that the snapshot of April 10th has a bug ?
>
>
>
>
>
> alpatino2 wrote:
> >
> > I noticed a different behavior using axis2-SNAPSHOT, let me show you a
> > wireshark tcpdump, you can download it here:
> > http://www.4shared.com/file/43614007/1e675e4b/soaprequest.html
> >
> > As you can see the soap body is empty but the info is inside de SOAP
> > Header, could you try to run the program with the SANPSHOT version?
> >
> > Also please update your source code with the right class names,
> > because you know the newest axis2 version uses a new naming schema.
> >
> > Here is the sample code I tried:
> > http://www.4shared.com/file/43614271/bbc1b9d7/BetdaqClient.html
> >
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16608590.html
>
>
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Don't be evil!!!
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Jacques46 <ja...@gmail.com>.
This is getting really frustrating... >-(
I downloaded the snapshot distribution from here (by the way it was the
april 10 version):
http://people.apache.org/dist/axis2/nightly/distribution-SNAPSHOT-bin.zip
http://people.apache.org/dist/axis2/nightly/distribution-SNAPSHOT-bin.zip
I dropped it to a folder on my drive.
I updated my AXIS2_HOME environment variable to point to that folder.
Opened a DOS prompt, went to the folder's bin sub-folder, and typed :
wsdl2java -u -uri http://api.betdaq.com/v2.0/API.wsdl
This created a "src" sub-tree. In
\src\com\globalbettingexchange\www\externalapi, I found all the generated
classes. I copied the \com folder to my Eclipse project.
I then copied all the jars from the \lib sub-folder of the distribution to
my project's lib directory, and updated the build path in the project
properties to include those jars.
Tried compiling : came up with a bunch of errors.
The first one says :
[javac]
...\com\globalbettingexchange\www\externalapi\ReadOnlyServiceStub.java:413:
cannot find symbol
[javac] symbol : method
receiveResultGetPrices(com.globalbettingexchange.www.externalapi.GetPricesResponseE)
[javac] location: class
com.globalbettingexchange.www.externalapi.ReadOnlyServiceCallbackHandler
[javac] callback.receiveResultGetPrices(
Sure enough, this receiveResultGetPrices method is nowhere to be found in
any of the source files generated by wsdl2java.
Could it be that the snapshot of April 10th has a bug ?
alpatino2 wrote:
>
> I noticed a different behavior using axis2-SNAPSHOT, let me show you a
> wireshark tcpdump, you can download it here:
> http://www.4shared.com/file/43614007/1e675e4b/soaprequest.html
>
> As you can see the soap body is empty but the info is inside de SOAP
> Header, could you try to run the program with the SANPSHOT version?
>
> Also please update your source code with the right class names,
> because you know the newest axis2 version uses a new naming schema.
>
> Here is the sample code I tried:
> http://www.4shared.com/file/43614271/bbc1b9d7/BetdaqClient.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16608590.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Alberto Patino <pa...@gmail.com>.
I noticed a different behavior using axis2-SNAPSHOT, let me show you a
wireshark tcpdump, you can download it here:
http://www.4shared.com/file/43614007/1e675e4b/soaprequest.html
As you can see the soap body is empty but the info is inside de SOAP
Header, could you try to run the program with the SANPSHOT version?
Also please update your source code with the right class names,
because you know the newest axis2 version uses a new naming schema.
Here is the sample code I tried:
http://www.4shared.com/file/43614271/bbc1b9d7/BetdaqClient.html
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Alberto Patino <pa...@gmail.com>.
On Tue, Apr 8, 2008 at 2:03 PM, Jacques46 <ja...@gmail.com> wrote:
>
> Thanks for still being here Alberto :-)
>
> Even though you provided fictitious data for the sample code, that
> fictitious data should be included in the resulting SOAP request, but it is
> not, and I can't figure out why (and am hoping you can point me in the right
> direction). Here's the SOAP request I end up with :
>
>
> <?xml version='1.0' encoding='UTF-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header>
> <ns1:ExternalApiHeader
> xmlns:ns1="http://www.GlobalBettingExchange.com/ExternalAPI/"
> soapenv:mustUnderstand="0" />
> </soapenv:Header>
> <soapenv:Body>
> <ns1:ListTopLevelEvents
> xmlns:ns1="http://www.GlobalBettingExchange.com/ExternalAPI/">
> <ns1:listTopLevelEventsRequest />
> </ns1:ListTopLevelEvents>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The specs say that all requests should be accompanied by the header, which
> includes the version number (which is 2 by the way), and that explains why I
> get the IncorrectVersionNumber error, which triggers my exception...
>
>
>
> alpatino2 wrote:
> >
> > It's good you could fix your problem
> >
> > Now, garbage in garbage out... the values I set in the source code
> > were ficticius, I don't know what values should be send to the web
> > service
> >
> > On Tue, Apr 8, 2008 at 10:03 AM, Jacques46 <ja...@gmail.com>
> > wrote:
> > ...
> >
>
> --
> View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16570577.html
>
>
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
I got you, I've reproduced the problem let me try to figure out whats wrong.
--
Don't be evil!!!
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Jacques46 <ja...@gmail.com>.
Thanks for still being here Alberto :-)
Even though you provided fictitious data for the sample code, that
fictitious data should be included in the resulting SOAP request, but it is
not, and I can't figure out why (and am hoping you can point me in the right
direction). Here's the SOAP request I end up with :
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<ns1:ExternalApiHeader
xmlns:ns1="http://www.GlobalBettingExchange.com/ExternalAPI/"
soapenv:mustUnderstand="0" />
</soapenv:Header>
<soapenv:Body>
<ns1:ListTopLevelEvents
xmlns:ns1="http://www.GlobalBettingExchange.com/ExternalAPI/">
<ns1:listTopLevelEventsRequest />
</ns1:ListTopLevelEvents>
</soapenv:Body>
</soapenv:Envelope>
The specs say that all requests should be accompanied by the header, which
includes the version number (which is 2 by the way), and that explains why I
get the IncorrectVersionNumber error, which triggers my exception...
alpatino2 wrote:
>
> It's good you could fix your problem
>
> Now, garbage in garbage out... the values I set in the source code
> were ficticius, I don't know what values should be send to the web
> service
>
> On Tue, Apr 8, 2008 at 10:03 AM, Jacques46 <ja...@gmail.com>
> wrote:
> ...
>
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16570577.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Alberto Patino <pa...@gmail.com>.
It's good you could fix your problem
Now, garbage in garbage out... the values I set in the source code
were ficticius, I don't know what values should be send to the web
service
On Tue, Apr 8, 2008 at 10:03 AM, Jacques46 <ja...@gmail.com> wrote:
>
> Turns out I was missing a couple of jars in the classpath.
>
> I'm now at the point where I know that I'm actually sending requests to the
> Betdaq server and receiving responses...
>
> The exception I'm getting now is:
>
> org.apache.axis2.databinding.ADBException: Unexpected subelement
> ListTopLevelEventsResult
>
> If I turn on HTTP traffic logging, I can now see that I'm getting an
> "IncorrectVersionNumber" error back from Betdaq.
>
> Looking at the original code that you gave me, I saw that you were setting
> "theVersion" to 1. I tried setting it to 2, but it didn't help.
>
> Looking at the logs, it seems that all the header attributes that the code
> is supposedly setting is not used at all in the SOAP message. Here's my log
> :
>
> 2008/04/08 10:57:29:499 EDT [DEBUG] HttpConnection - Open connection to
> api.betdaq.com:80
> 2008/04/08 10:57:29:639 EDT [DEBUG] header - >> "POST
> /v2.0/ReadOnlyService.asmx HTTP/1.1[\r][\n]"
> 2008/04/08 10:57:29:655 EDT [DEBUG] HttpMethodBase - Adding Host request
> header
> 2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "Content-Type: text/xml;
> charset=UTF-8[\r][\n]"
> 2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "SOAPAction:
> "http://www.GlobalBettingExchange.com/ExternalAPI/ListTopLevelEvents"[\r][\n]"
> 2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "User-Agent: Axis2[\r][\n]"
> 2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "Host:
> api.betdaq.com[\r][\n]"
> 2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "Transfer-Encoding:
> chunked[\r][\n]"
> 2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "[\r][\n]"
> 2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "18d[\r][\n]"
> 2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "<?xml version='1.0'
> encoding='UTF-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><ns1:ExternalApiHeader
> xmlns:ns1="http://www.GlobalBettingExchange.com/ExternalAPI/"
> soapenv:mustUnderstand="0"
> /></soapenv:Header><soapenv:Body><ns1:ListTopLevelEvents
> xmlns:ns1="http://www.GlobalBettingExchange.com/ExternalAPI/"
> /></soapenv:Body></soapenv:Envelope>"
> 2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "[\r][\n]"
> 2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "0"
> 2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "[\r][\n]"
> 2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "[\r][\n]"
> 2008/04/08 10:57:29:702 EDT [DEBUG] EntityEnclosingMethod - Request body
> sent
> 2008/04/08 10:57:29:827 EDT [DEBUG] header - << "HTTP/1.1 100
> Continue[\r][\n]"
> 2008/04/08 10:57:29:827 EDT [INFO] HttpMethodBase - Discarding unexpected
> response: HTTP/1.1 100 Continue
> 2008/04/08 10:57:29:827 EDT [DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
> 2008/04/08 10:57:29:827 EDT [DEBUG] header - << "Date: Tue, 08 Apr 2008
> 14:57:29 GMT[\r][\n]"
> 2008/04/08 10:57:29:827 EDT [DEBUG] header - << "Server:
> Microsoft-IIS/6.0[\r][\n]"
> 2008/04/08 10:57:29:842 EDT [DEBUG] header - << "X-Powered-By:
> ASP.NET[\r][\n]"
> 2008/04/08 10:57:29:842 EDT [DEBUG] header - << "X-AspNet-Version:
> 2.0.50727[\r][\n]"
> 2008/04/08 10:57:29:842 EDT [DEBUG] header - << "Cache-Control: private,
> max-age=0[\r][\n]"
> 2008/04/08 10:57:29:842 EDT [DEBUG] header - << "Content-Type: text/xml;
> charset=utf-8[\r][\n]"
> 2008/04/08 10:57:29:842 EDT [DEBUG] header - << "Content-Length:
> 1394[\r][\n]"
> 2008/04/08 10:57:29:842 EDT [DEBUG] content - << "<?xm"
> 2008/04/08 10:57:29:858 EDT [DEBUG] content - << "l version="1.0"
> encoding="utf-8"?><soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><soap:Header><wsa:Action>http://www.GlobalBettingExchange.com/ExternalAPI/ListTopLevelEventsResponse</wsa:Action><wsa:MessageID>uuid:0daeb813-d09f-4e2b-a8ae-83f37b971bfb</wsa:MessageID><wsa:RelatesTo>uuid:813f4579-17fe-460b-a47e-1c18dca0e5b6</wsa:RelatesTo><wsa:To>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To><wsse:Security><wsu:Timestamp
> wsu:Id="Timestamp-ea4eed52-4bef-411d-9971-559f3e572e19"><wsu:Created>2008-04-08T14:57:29Z</wsu:Created><wsu:Expires>2008-04-08T15:02:29Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><ListTopLevelEventsResponse
> xmlns="http://www.GlobalBettingExchange.com/ExternalAPI/"><ListTopLevelEventsResult><ReturnStatus
> Code="308" Description="IncorrectVersionNumber"
> CallId="c9fe82ee-1cb4-4f68-a52c-0b9863758e29"
> /><Timestamp>2008-04-08T15:57:29.6608494+01:00</Timestamp></ListTopLevelEventsResult></ListTopLevelEventsResponse></soap:Body></soap:Envelope>"
>
>
> --
> View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16559668.html
>
>
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Don't be evil!!!
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Jacques46 <ja...@gmail.com>.
Turns out I was missing a couple of jars in the classpath.
I'm now at the point where I know that I'm actually sending requests to the
Betdaq server and receiving responses...
The exception I'm getting now is:
org.apache.axis2.databinding.ADBException: Unexpected subelement
ListTopLevelEventsResult
If I turn on HTTP traffic logging, I can now see that I'm getting an
"IncorrectVersionNumber" error back from Betdaq.
Looking at the original code that you gave me, I saw that you were setting
"theVersion" to 1. I tried setting it to 2, but it didn't help.
Looking at the logs, it seems that all the header attributes that the code
is supposedly setting is not used at all in the SOAP message. Here's my log
:
2008/04/08 10:57:29:499 EDT [DEBUG] HttpConnection - Open connection to
api.betdaq.com:80
2008/04/08 10:57:29:639 EDT [DEBUG] header - >> "POST
/v2.0/ReadOnlyService.asmx HTTP/1.1[\r][\n]"
2008/04/08 10:57:29:655 EDT [DEBUG] HttpMethodBase - Adding Host request
header
2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "Content-Type: text/xml;
charset=UTF-8[\r][\n]"
2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "SOAPAction:
"http://www.GlobalBettingExchange.com/ExternalAPI/ListTopLevelEvents"[\r][\n]"
2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "User-Agent: Axis2[\r][\n]"
2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "Host:
api.betdaq.com[\r][\n]"
2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "Transfer-Encoding:
chunked[\r][\n]"
2008/04/08 10:57:29:671 EDT [DEBUG] header - >> "[\r][\n]"
2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "18d[\r][\n]"
2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "<?xml version='1.0'
encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><ns1:ExternalApiHeader
xmlns:ns1="http://www.GlobalBettingExchange.com/ExternalAPI/"
soapenv:mustUnderstand="0"
/></soapenv:Header><soapenv:Body><ns1:ListTopLevelEvents
xmlns:ns1="http://www.GlobalBettingExchange.com/ExternalAPI/"
/></soapenv:Body></soapenv:Envelope>"
2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "[\r][\n]"
2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "0"
2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "[\r][\n]"
2008/04/08 10:57:29:702 EDT [DEBUG] content - >> "[\r][\n]"
2008/04/08 10:57:29:702 EDT [DEBUG] EntityEnclosingMethod - Request body
sent
2008/04/08 10:57:29:827 EDT [DEBUG] header - << "HTTP/1.1 100
Continue[\r][\n]"
2008/04/08 10:57:29:827 EDT [INFO] HttpMethodBase - Discarding unexpected
response: HTTP/1.1 100 Continue
2008/04/08 10:57:29:827 EDT [DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
2008/04/08 10:57:29:827 EDT [DEBUG] header - << "Date: Tue, 08 Apr 2008
14:57:29 GMT[\r][\n]"
2008/04/08 10:57:29:827 EDT [DEBUG] header - << "Server:
Microsoft-IIS/6.0[\r][\n]"
2008/04/08 10:57:29:842 EDT [DEBUG] header - << "X-Powered-By:
ASP.NET[\r][\n]"
2008/04/08 10:57:29:842 EDT [DEBUG] header - << "X-AspNet-Version:
2.0.50727[\r][\n]"
2008/04/08 10:57:29:842 EDT [DEBUG] header - << "Cache-Control: private,
max-age=0[\r][\n]"
2008/04/08 10:57:29:842 EDT [DEBUG] header - << "Content-Type: text/xml;
charset=utf-8[\r][\n]"
2008/04/08 10:57:29:842 EDT [DEBUG] header - << "Content-Length:
1394[\r][\n]"
2008/04/08 10:57:29:842 EDT [DEBUG] content - << "<?xm"
2008/04/08 10:57:29:858 EDT [DEBUG] content - << "l version="1.0"
encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><soap:Header><wsa:Action>http://www.GlobalBettingExchange.com/ExternalAPI/ListTopLevelEventsResponse</wsa:Action><wsa:MessageID>uuid:0daeb813-d09f-4e2b-a8ae-83f37b971bfb</wsa:MessageID><wsa:RelatesTo>uuid:813f4579-17fe-460b-a47e-1c18dca0e5b6</wsa:RelatesTo><wsa:To>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To><wsse:Security><wsu:Timestamp
wsu:Id="Timestamp-ea4eed52-4bef-411d-9971-559f3e572e19"><wsu:Created>2008-04-08T14:57:29Z</wsu:Created><wsu:Expires>2008-04-08T15:02:29Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><ListTopLevelEventsResponse
xmlns="http://www.GlobalBettingExchange.com/ExternalAPI/"><ListTopLevelEventsResult><ReturnStatus
Code="308" Description="IncorrectVersionNumber"
CallId="c9fe82ee-1cb4-4f68-a52c-0b9863758e29"
/><Timestamp>2008-04-08T15:57:29.6608494+01:00</Timestamp></ListTopLevelEventsResult></ListTopLevelEventsResponse></soap:Body></soap:Envelope>"
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16559668.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Jacques46 <ja...@gmail.com>.
I set the epr to "http://api.betdaq.com/v2.0/ReadOnlyService.asmx".
I also changed all of the xxxE classes to the "numbered" class that had been
created by wsdl2java.
I get a full compile now, but an exception at runtime.
So, my next 2 questions are :
1- can you point me to a page on the web that will explain what those
"numbered" classes are for ? This is very confusing to a newbie like me...
2- do you understand why I get this exception :
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:564)
at
org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:96)
at
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:79)
at
org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:615)
at
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:115)
at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:180)
at
org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:146)
at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:139)
at
com.globalbettingexchange.www.externalapi.ReadOnlyServiceStub.<init>(ReadOnlyServiceStub.java:44)
at
com.globalbettingexchange.www.externalapi.ReadOnlyServiceStub.<init>(ReadOnlyServiceStub.java:29)
at
com.globalbettingexchange.www.externalapi.ReadOnlyServiceStub.<init>(ReadOnlyServiceStub.java:77)
at ca.jpti.scraper.book.Betdaq.main(Betdaq.java:207)
Caused by: java.lang.IllegalStateException: No valid ObjectCreator found.
at org.apache.axiom.om.util.StAXUtils$Pool.<init>(StAXUtils.java:64)
at org.apache.axiom.om.util.StAXUtils.<clinit>(StAXUtils.java:88)
... 13 more
alpatino2 wrote:
>
> I used Axis2-Snapshot newer release instead of axis2 1-3
>
> I noticed this new axis2 release changed the naming convention of the
> generated code. If you look in the classes generated you will see the
> name of the class with a numeric suffix, for example you need lok for
> something like ExternalApiHeade99 instead of ExternalApiHeaderE .
>
> Also fix in the sample the path to the endpoint reference (epr)
>
>
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16545847.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Alberto Patino <pa...@gmail.com>.
I used Axis2-Snapshot newer release instead of axis2 1-3
I noticed this new axis2 release changed the naming convention of the
generated code. If you look in the classes generated you will see the
name of the class with a numeric suffix, for example you need lok for
something like ExternalApiHeade99 instead of ExternalApiHeaderE .
Also fix in the sample the path to the endpoint reference (epr)
On Mon, Apr 7, 2008 at 10:37 AM, Jacques46 <ja...@gmail.com> wrote:
>
>
> alpatino2 wrote:
> >
> > /**
> > *
> > */
> > package com.sample.betdaq;
> >
> > import java.math.BigDecimal;
> > import java.rmi.RemoteException;
> >
> > import org.apache.axis2.AxisFault;
> >
> > import com.globalbettingexchange.www.externalapi.BaseResponseSequence3;
> > import com.globalbettingexchange.www.externalapi.EventClassifierType;
> > import com.globalbettingexchange.www.externalapi.ExternalApiHeader;
> > import com.globalbettingexchange.www.externalapi.ExternalApiHeaderE;
> > import com.globalbettingexchange.www.externalapi.ListTopLevelEvents;
> > import
> > com.globalbettingexchange.www.externalapi.ListTopLevelEventsRequest;
> > import
> > com.globalbettingexchange.www.externalapi.ListTopLevelEventsResponse;
> > import
> > com.globalbettingexchange.www.externalapi.ListTopLevelEventsResponseE;
> >
> > ...
> >
>
> Forget my last comment about pretty printing errors, I've solved it with the
> "-u" option to wsdl2java...
>
> The output of wsdl2java was 197 classes. Good stuff.
>
> The only thing that doesn't work now is the fact that these two classes were
> NOT generated by wsdl2java, and thus cannot be imported in the test file :
>
>
> import com.globalbettingexchange.www.externalapi.ExternalApiHeaderE;
> import
> com.globalbettingexchange.www.externalapi.ListTopLevelEventsResponseE;
>
> I'm sure this is an easy problem to fix ?
> --
> View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16537516.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Don't be evil!!!
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Jacques46 <ja...@gmail.com>.
alpatino2 wrote:
>
> /**
> *
> */
> package com.sample.betdaq;
>
> import java.math.BigDecimal;
> import java.rmi.RemoteException;
>
> import org.apache.axis2.AxisFault;
>
> import com.globalbettingexchange.www.externalapi.BaseResponseSequence3;
> import com.globalbettingexchange.www.externalapi.EventClassifierType;
> import com.globalbettingexchange.www.externalapi.ExternalApiHeader;
> import com.globalbettingexchange.www.externalapi.ExternalApiHeaderE;
> import com.globalbettingexchange.www.externalapi.ListTopLevelEvents;
> import
> com.globalbettingexchange.www.externalapi.ListTopLevelEventsRequest;
> import
> com.globalbettingexchange.www.externalapi.ListTopLevelEventsResponse;
> import
> com.globalbettingexchange.www.externalapi.ListTopLevelEventsResponseE;
>
> ...
>
Forget my last comment about pretty printing errors, I've solved it with the
"-u" option to wsdl2java...
The output of wsdl2java was 197 classes. Good stuff.
The only thing that doesn't work now is the fact that these two classes were
NOT generated by wsdl2java, and thus cannot be imported in the test file :
import com.globalbettingexchange.www.externalapi.ExternalApiHeaderE;
import
com.globalbettingexchange.www.externalapi.ListTopLevelEventsResponseE;
I'm sure this is an easy problem to fix ?
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16537516.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Just a small client sample would really be great !
Posted by Alberto Patino <pa...@gmail.com>.
/**
*
*/
package com.sample.betdaq;
import java.math.BigDecimal;
import java.rmi.RemoteException;
import org.apache.axis2.AxisFault;
import com.globalbettingexchange.www.externalapi.BaseResponseSequence3;
import com.globalbettingexchange.www.externalapi.EventClassifierType;
import com.globalbettingexchange.www.externalapi.ExternalApiHeader;
import com.globalbettingexchange.www.externalapi.ExternalApiHeaderE;
import com.globalbettingexchange.www.externalapi.ListTopLevelEvents;
import com.globalbettingexchange.www.externalapi.ListTopLevelEventsRequest;
import com.globalbettingexchange.www.externalapi.ListTopLevelEventsResponse;
import com.globalbettingexchange.www.externalapi.ListTopLevelEventsResponseE;
/**
* @author albertop
*
*/
public class BetdaqClient {
public final static String epr = "http://api.betdaq.com/v2.0/API.wsdl";
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
ReadOnlyServiceStub clientStub = new ReadOnlyServiceStub(epr);
ListTopLevelEvents list = new ListTopLevelEvents();
ListTopLevelEventsRequest eventsRequest = null;
list.setListTopLevelEventsRequest(eventsRequest);
ExternalApiHeaderE header = new ExternalApiHeaderE();
ExternalApiHeader apiHeader = new ExternalApiHeader();
String langCode="us-en";
apiHeader.setLanguageCode(langCode);
int theVersion = 1;
BigDecimal version = new BigDecimal(theVersion);
apiHeader.setVersion(version);
String username="test";
apiHeader.setUsername(username);
String password="test";
apiHeader.setPassword(password);
header.setExternalApiHeader(apiHeader);
ListTopLevelEventsResponseE response;
response = clientStub.ListTopLevelEvents(list, header);
ListTopLevelEventsResponse listTopLevelEventsResult =
response.getListTopLevelEventsResult();
BaseResponseSequence3[] baseResponseSequence =
listTopLevelEventsResult.getBaseResponseSequence();
int size = baseResponseSequence.length;
for (int i = 0; i<size; i++){
EventClassifierType classifier =
baseResponseSequence[i].getEventClassifiers();
System.out.println("Name is "+classifier.getName()+" Id is "+
classifier.getId());
}
} catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
On Sun, Apr 6, 2008 at 9:15 PM, Jacques Poulin <ja...@gmail.com> wrote:
> Hi,
>
> I'm trying to figure out how to write a client application to connect to the
> Betdaq API (http://api.betdaq.com).
>
> The WSDL for the web services is here : http://api.betdaq.com/v2.0/API.wsdl
>
> I downloaded Axis (2.1.3), and launched the wsdl2java.bat script. I've
> tried different combinations of options to that command, but basically, I
> always wind up with 4 files :
>
> ReadOnlyServiceCallbackHandler.java
> ReadOnlyServiceStub.java
> SecureServiceCallbackHandler.java
> SecureServiceStub.java
>
> I'm sure that someone with a lot of experience with Axis could write a
> simple method that would use either of those stubs to make a call to the
> API.
>
> Any of Betdaq's methods would be fine... The ListTopLevelEvents seems
> simple enough...
>
> Once I've seen a sample, I'm sure I'll be fine... I just need some help to
> start.
>
> Thanks.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Don't be evil!!!
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org