Re: WSDL2Java Exception with nested binding schema files

2007-06-20 Thread david2

I was finally able to get past the WSDL2Java exception and managed to get a
web service running that utilized nested objects, nested schema files and
nested binding files.  However, now I find that I can build a web service
request using a parent object/type or its children, but never a parent AND
one of its children.

Apparently the binding for a parameter must be set to abstract=true for
unwrapping to work properly.  However, if another message accepts a child of
that parameter, the child must also be declared abstract, which breaks the
build for the parent.

The following files (click to download) illustrate this issue:

1.   http://www.nabble.com/file/p11221735/jibx-nested-1-parentOnly.ZIP
jibx-nested-1-parentOnly.ZIP  - contains a full build of a web service that
assigns a Book to a Course.  Both of these parameters are parents, each
containing a object, namely a Subject (unzip 1, then ant to build and ant
run to execute the client).

2.   http://www.nabble.com/file/p11221735/jibx-nested-2-childOnly.ZIP
jibx-nested-2-childOnly.ZIP  - contains deltas to the ZIP file #1 to create
a web service that eliminate the message from #1 above, and provides a
different message that allows a new Subject to be added (unzip #1 AND #2,
then ant to build and ant run to execute the client).

3.  
http://www.nabble.com/file/p11221735/jibx-nested-3-parentAndChild-broken.ZIP
jibx-nested-3-parentAndChild-broken.ZIP  - contains deltas to the ZIP file
#1 to create a web service that provides both of these messages. 
Unfortunately, the web service will not build, since the parent bindings
(Book  Course) and the child binding (Subject) cannot both be declared
abstract (unzip #1 AND #3, then ant to generate the exception).

Is there any way to get messages with both parent and child object
parameters to build and work?  Also, there are some incompatible differences
between binding that work for Axis2/WSDL2Java and those that work directly
with JiBX examples.  Why is this so?

-David

=

Exception generated:

generate-client:
 [echo] Running WSDL2Java task
[mkdir] Created dir:
C:\backups\20070620-1426-jibx-nested-baseline\temp\client\gen
 [java] Retrieving schema at 'book.xsd', relative to
'file:/C:/backups/20070620-1426-jibx-nested-baseline/temp/./'.
 [java] Retrieving schema at 'subject.xsd', relative to
'file:/C:/backups/20070620-1426-jibx-nested-baseline/temp/book.xsd'.
 [java] Retrieving schema at 'course.xsd', relative to
'file:/C:/backups/20070620-1426-jibx-nested-baseline/temp/./'.
 [java] Retrieving schema at 'subject.xsd', relative to
'file:/C:/backups/20070620-1426-jibx-nested-baseline/temp/course.xsd'.
 [java] Retrieving schema at 'subject.xsd', relative to
'file:/C:/backups/20070620-1426-jibx-nested-baseline/temp/./'.
 [java] Exception in thread main
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: Cannot unwrap element
{http://ws.sosnoski.com/library/wsdl}addSubject: no abstract mapping
definition found for type
{http://ws.sosnoski.com/library/types}SubjectInformation (used by element
{http://ws.sosnoski.com/library/wsdl}subject)
 [java] at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:256)
 [java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
 [java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
 [java] Caused by: java.lang.RuntimeException: Cannot unwrap element
{http://ws.sosnoski.com/library/wsdl}addSubject: no abstract mapping
definition found for type
{http://ws.sosnoski.com/library/types}SubjectInformation (used by element
{http://ws.sosnoski.com/library/wsdl}subject)
 [java] at
org.apache.axis2.jibx.CodeGenerationUtility.unwrapMessage(CodeGenerationUtility.java:818)
 [java] at
org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtility.java:382)
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 [java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 [java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 [java] at java.lang.reflect.Method.invoke(Method.java:585)
 [java] at
org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExtension.java:74)
 [java] at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:209)
 [java] ... 2 more

BUILD FAILED


-- 
View this message in context: 
http://www.nabble.com/WSDL2Java-Exception-with-nested-binding---schema-files-tf3947855.html#a11221735
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



WSDL2Java Exception with nested binding schema files

2007-06-19 Thread david2

I was running into a different WSDL2Java CodeGenerationException while
working with nested binding files and a WSDL that uses nested schemas. 

Our WSDL is pretty simple and imports an external schema, but that schema is
fairly complex and includes of other schemas.  Also, our binding files are
pretty much tied to their respective schemas, so they are nested as well. 

To illustrate a simpler example of what we are trying to do, I modified
Dennis Sosnoski's jibx-library example
(http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/example), eliminating
most functionality, adding a Subject object as an attribute to the Book
object, and added nested schema  binding files for BookInformation 
SubjectInformation.  I successfully tested the binding files by generating a
binding jar with org.jibx.binding.ant.CompileTask and using it to
unmarshalling XML into a Book object (which contains a Subject object) 
remartialling it back into XML (ant build  ant run with code in
simpleLibrary-bindingOnly.zip).  However, when I run ant in the example
(ant with code in simpleLibrary.zip), WSDL2Java fails during the
generate-client target with the following exception (tested with both JiBX
1.1.3  1.1.5): 

generate-client: 
 [echo] Running WSDL2Java task 
 [mkdir] Created dir:
C:\development\examples\jibx-simpleLibrary\client\gen 
 [java] Retrieving schema at 'book.xsd', relative to
'file:/C:/development/examples/jibx-library/./'. 
 [java] Retrieving schema at 'subject.xsd', relative to
'file:/C:/development/examples/jibx-library/book.xsd'. 
 [java] Exception in thread main
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.NullPointerException 
 [java] at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
 
 [java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) 
 [java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) 
 [java] Caused by: java.lang.NullPointerException 
 [java] at
org.apache.axis2.jibx.CodeGenerationUtility.collectTopLevelComponents(CodeGenerationUtility.java:957)
 
 [java] at
org.apache.axis2.jibx.CodeGenerationUtility.collectTopLevelComponents(CodeGenerationUtility.java:966)
 
 [java] at
org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtility.java:301)
 
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) 
 [java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
 [java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 
 [java] at java.lang.reflect.Method.invoke(Method.java:585) 
 [java] at
org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExtension.java:74)
 
 [java] at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
 
 [java] ... 2 more 

The binding files, schemas, wsdl, and updated source are attached.  Please
let me know if you see anything that may be causing the WSDL2Java exception.
http://www.nabble.com/file/p11199623/simpleLibrary.ZIP simpleLibrary.ZIP 
http://www.nabble.com/file/p11199623/simpleLibrary-bindingOnly.ZIP
simpleLibrary-bindingOnly.ZIP 

-- 
View this message in context: 
http://www.nabble.com/WSDL2Java-Exception-with-nested-binding---schema-files-tf3947855.html#a11199623
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] Axis2 1.2 JiBX update

2007-06-18 Thread david2

Dennis,

I downloaded your updated axis2-jibx-1.2b.jar replacement for
axis2-jibx-1.2.jar and was unable to run your jibx-library example with it. 
It generated the following exception (and, strangely enough, a BUILD
SUCCESSFUL Ant message):

ant run
Buildfile: build.xml

run:
 [java] Exception in thread main org.apache.axis2.AxisFault:
java.lang.NoSuchMethodError:
org.apache.axis2.jibx.JiBXDataSource.init(Ljava/lang/Object;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[I[Ljava/lang/String;Lorg/jibx/runtime/IBindingFactory;)V
 [java] at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
 [java] at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373)
 [java] at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
 [java] at
org.apache.axis2.jibx.library.JibxLibraryStub.getBook(JibxLibraryStub.java:474)
 [java] at
org.apache.axis2.jibx.library.WebServiceClient.main(WebServiceClient.java:42)
 [java] Java Result: 1

BUILD SUCCESSFUL
Total time: 2 seconds

After replacing the updated axis2-jibx-1.2b.jar with the original
axis2-jibx-1.2.jar, the example built and ran fine.

Any idea what the cause might be?

-David


DSosnoski wrote:
 
 Hi Pavel,
 
 If you can email me (directly) the trace from the exception I'll try to 
 see what's going wrong and get it corrected. If you can also send me 
 your WSDL and binding, along with the generated stub and message 
 receiver, these would probably help.
 
   - Dennis
 
 Pavel Sharov wrote:
 Dennis and others,

 I am using Axis2 1.1.1. I've updated my old Axis2 JiBX distribution
 'axis2-jibx-1.1.1.jar' with the newest one 'axis2-jibx-1.1.1c.jar'
 probably you are talking about in your posting here (downloaded it from
 http://www.sosnoski.com/jibx-wiki/space/axis2-jibx). I will not go
 deeply into details now - will put my problem briefly, maybe that will
 suffice to get a hint on the reason of the problem.
 I'm using the WSDL2Java to generate both client and server Java code
 from my WSDL and some JiBX bindings. With the previous distribution it's
 all ok. However, with the recent update, I am getting a Namespace not
 found error (which namespace - not specified) in runtime when trying to
 marshall/unmarshall. The exception is caused by a call to the
 constructor of org.apache.axis2.jibx.JiBXDataSource class, either in my
 client stub or in my server message receiver.
 I wouldn't like to continue using the old distribution as I see some
 important bugs fixed in the new one. Could you please give me any hint
 on what is going on? 
 Thank you a lot in advance!

 Pavel

 -Original Message-
 From: Dennis Sosnoski [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 17, 2007 3:30 PM
 To: axis-user
 Subject: [Axis2] Axis2 1.2 JiBX update

 I've updated the axis2-jibx.jar module for the 1.2 release of Axis2 to 
 fix some problems with serialization (discovered while testing my 
 validation module :-[  - see the prior post). The update is available on

 the axis2-jibx wiki page:
 http://www.sosnoski.com/jibx-wiki/space/axis2-jibx

 The same issues are likely causing problems some users have experienced 
 using JiBX with Rampart on the 1.1.1 release. I'll try to backport the 
 fixes to the 1.1.1 code soon.

   - Dennis

   
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/RE%3A--Axis2--Axis2-1.2-JiBX-update-tf3833808.html#a11177870
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: unable to engage the addressing module

2007-05-16 Thread david2

Michele,

I was trying to run your StressTest.java related to JIRA issue [AXIS2-2593],
and I am having the same addressing AxisFault you were having here.  How
were you ever able to get past it?

I do not see an addressing.mar file anywhere in my snapshot or in the 1.1.1
or 1.2 formal releases.  Where is it found, or do you have to produce it
from ant?

Thanks,
-David Bueche

-- 
View this message in context: 
http://www.nabble.com/unable-to-engage-the-addressing-module-tf3254097.html#a10642801
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: unable to engage the addressing module

2007-05-16 Thread david2

Michele,

Found the issue:  Windows XP was interpreting my addressing.mar file as a
Microsoft Access shortcut file and not displaying the .MAR extension,
hence a file search didn't find it.  Once I removed the *.MAR file type in
Windows Explorer Folder Options and recreated it as a WinZip file type, the
.MAR extensions were displayed and I found them.  Also, I updated the
ConfigurationContext instantiation to use the paths to the repository
directory and axis2.xml file, respectively.  Example:

ConfigurationContext configurationContext =
   
ConfigurationContextFactory.createConfigurationContextFromFileSystem(
  C:\\axis2-SNAPSHOT\\repository,
C:\\axis2-SNAPSHOT\\conf\\axis2.xml);

-David
-- 
View this message in context: 
http://www.nabble.com/unable-to-engage-the-addressing-module-tf3254097.html#a10645367
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] Axis2 1.2 RC2 Released - SOAP problem

2007-05-09 Thread david2

Alistair,

I just encountered this, too.  My *.aar ran fine in Wondows XP, but gets the
same First Element must contain the local name, Envelope error when I
tried to run it under Linux.  However, I am only using a single WSDL with an
imported XSD file.  Is there any was around inserting the XSD into the WSDL?

-David

-- 
View this message in context: 
http://www.nabble.com/Re-%3A--Axis2--Axis2-1.2-RC2-Released-tf3531026.html#a10401246
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



WORKAROUND to BindException in axis client

2007-04-26 Thread david2

In the bug report (AXIS2-2593) Michele's comments point out a link to a link
to a link that identified a workaround.

To clarify, this is a workaround to the AxisFault caused by the
BindException Address already in use: connect generated when you very
rapidly send messages to a web service (usually the exception occurs at
about 4000 messages).

The problem is caused when the MaxUserPort is set too low (Windows XP
default is 5000) and TcpTimedWaitDelay is set too high (Windows XP default
is 120 seconds).  Note that similar errors occur on UNIX platforms for
similar reasons (running out of port numbers that are slow to be released by
the OS).

I summarized the workaround to in the JIRA bug report AXIS2-2593:

https://issues.apache.org/jira/browse/AXIS2-2593

The IBM site containing a detailed description of the workaround is located
at:

http://publib.boulder.ibm.com/infocenter/cmgmt/v8r3m0/index.jsp?topic=/com.ibm.eclient.doc/trs40019.htm
-- 
View this message in context: 
http://www.nabble.com/BindException-in-axis-client-tf3632035.html#a10206377
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: axis2 in tomcat, java.net.BindException: Address already in use:

2007-04-26 Thread david2

Here is a web site Michele pointed me to addressing this OS limitation and
workarounds for Windows, AIX,  Solaris:

http://publib.boulder.ibm.com/infocenter/cmgmt/v8r3m0/index.jsp?topic=/com.ibm.eclient.doc/trs40019.htm

On Windows XP, I used TcpTimedWaitDelay=30 and MaxUserPort=65535

-David
-- 
View this message in context: 
http://www.nabble.com/axis2-in-tomcat%2C-java.net.BindException%3A-Address-already-in-use%3A-tf3271278.html#a10206571
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: To many open connections

2007-04-26 Thread david2

Here is a web site Michele pointed me to addressing this OS limitation and
workarounds for Windows, AIX,  Solaris:

http://publib.boulder.ibm.com/infocenter/cmgmt/v8r3m0/index.jsp?topic=/com.ibm.eclient.doc/trs40019.htm

On Windows XP, I used TcpTimedWaitDelay=30 and MaxUserPort=65535

-David
-- 
View this message in context: 
http://www.nabble.com/To-many-open-connections-tf3258240.html#a10206583
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: BindException in axis client

2007-04-25 Thread david2

See comments below.

-David

 Can you please post the full stack trace?

Here it is:

Exception in thread main org.apache.axis2.AxisFault: Address already in
use: connect
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:377)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:179)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:73)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:310)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:202)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:446)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
at com.ws.service.MyServiceStub.performService(MyServiceStub.java:300)
at com.ws.client.MyClient.main(MyClient.java:88)
Caused by: java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:139)
at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:124)
at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:558)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:176)
... 8 more

  message, the problem does not appear to manifest itself for every  
  message
  sent.  Are these piling up resulting in the AxisFault?
 Yes, probably.

Incidentally, I saw another issue posted suggesting that Axis isn't sending
finalize to the Stub until the system performs a garbage collection. 
However, this is not the case, as I just tried adding a public method to the
Stub which sends itself the finalize() method, but this did not resolve the
TIME_WAIT connection issue.

 It looks like providing a custom configuration context is a bit messy ;)
 Can you log a JIRA (with as many info as you can) please?
 See also https://issues.apache.org/jira/browse/AXIS2-2581. It looks a  
 bit different (see the cause) but has the same effect.

Done (AXIS2-2593).

 It depends on several things such as service type (long or short?, i/ 
 o or cpu bound?, etc), the server you're using, wether the client and  
 the server are on the same sub-net or they are spread across the  
 Internet, etc.

For now, let's assume a very short I/O bound web service spread across the
Internet.  What is the best performance you have ever seen (even if client
and server were running on a single box)?
-- 
View this message in context: 
http://www.nabble.com/BindException-in-axis-client-tf3632035.html#a10188378
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot Find Symbol receiveResultpublishElint()

2007-04-23 Thread david2

Here is the form/function of my WSDL:

?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=http://company.com/project/services;
xmlns:svc=http://company.com/project/services;
xmlns:persist=http://company.com/project/data;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
  wsdl:types
  
schema elementFormDefault=qualified
targetNamespace=http://company.com/project/services;
xmlns=http://www.w3.org/2001/XMLSchema;
  
  import namespace=http://company.com/project/data;
schemaLocation=MyDataRecord.xsd/

  element name=publishMyData
complexType
  sequence
element name=reports minOccurs=0 maxOccurs=unbounded
type=persist:MyDataRecordType/
  /sequence
/complexType
  /element

/schema

  /wsdl:types

  wsdl:message name=publishMyDataRequest
wsdl:part element=svc:publishMyData name=parameters/
  /wsdl:message
  
  wsdl:portType name=MyDataConsumer

wsdl:operation name=publishMyData
  wsdl:input message=svc:publishMyDataRequest
name=publishMyDataRequest/
/wsdl:operation

  /wsdl:portType

  wsdl:binding name=MyDataConsumerSOAPBinding type=svc:MyDataConsumer

wsdlsoap:binding style=document
transport=http://schemas.xmlsoap.org/soap/http/

wsdl:operation name=publishMyData

  wsdlsoap:operation soapAction=urn:publishMyData/

  wsdl:input name=publishMyDataRequest
wsdlsoap:body use=literal/
  /wsdl:input

/wsdl:operation

  /wsdl:binding

  wsdl:service name=MyDataConsumer

wsdl:port name=MyDataConsumer
binding=svc:MyDataConsumerSOAPBinding
  wsdlsoap:address
location=http://localhost:8080/axis2/services/MyDataConsumer/
/wsdl:port

  /wsdl:service

/wsdl:definitions

-- 
View this message in context: 
http://www.nabble.com/Cannot-Find-Symbol-receiveResultpublishMyData%28%29-tf3603009.html#a10140870
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Cannot Find Symbol receiveResultpublishElint()

2007-04-18 Thread david2

I am building an Axis2 web service whose WSDL defines a single message with
only a single input.  When I run the WSDL2Java ant task, I get the following
error message: 


cannot find symbol 
[javac] symbol  : method receiveResultpublishElint() 


The java code generated by WSDL2Java generates this call in the Stub code to
the WSDL2Java generated Callback Handler code: 

[javac]  _callback.receiveResultpublishElint(); 


However, this method isn't implemented in the Callback Handler code. 

Any idea why WSDL2Java would be generating this code in the Stub code
without generating the corresponding method in the Callback Handler code? 
Is it expected that the user add this method himself as a no-op for in-only
messages? 

-David
-- 
View this message in context: 
http://www.nabble.com/Cannot-Find-Symbol-receiveResultpublishElint%28%29-tf3603009.html#a10065649
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot Find Symbol receiveResultpublishElint()

2007-04-18 Thread david2

Strangely enough, it looks like the difference between the Axis2 examples
that successfully implement out-only messages and mine is that the Axis2
examples use the generate synchronous methods only option turned on.  In
the ant wsdl2java java command line task, this is done as follows:

java classname=org.apache.axis2.wsdl.WSDL2Java fork=true
failonerror=true
 ...
  arg value=-s/

the ant wsdl2java task, this is done as follows:

taskdef name=wsdl2java
 classname=org.apache.axis2.tool.ant.AntCodegenTask
 classpathref=axis2.classpath/
wsdl2java
wsdlFilename=${basedir}/resources/META-INF/StockQuoteService.wsdl
   ...
   synconly=true/

My question now is, why must the WSDL2Java synchronous methods option be
turned on in order to successfully generate asynchronous messages?

-David
-- 
View this message in context: 
http://www.nabble.com/Cannot-Find-Symbol-receiveResultpublishElint%28%29-tf3603009.html#a10066459
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validation Error with library.wsdl in Example

2007-04-11 Thread david2

Dennis,

Bless you my son for the incredible insight you have provided in this
example.  I had wrestled with the issue of JiBX mapping for non-trivial
types for many hours before I stumbled on your example.  I am well on my way
now.

One thing:  Although I can get your example to work, and I have been able to
duplicate the approach in my own application, I was not able to get either
your WSDL or my similarly constructed WSDL to validate in NetBeans.

The error generated is:


 XML validation started.

 C:/netBeansWorkspace/Sandbox/library.wsdl:26,12
 src-resolve: Cannot resolve the name 'tns:BookInformation' to a(n)
'type definition' component.

 1 Error(s),  0 Warning(s).
 XML validation finished.

Any idea what might be going wrong, or is it possibly just a NetBeans issue?

-David
-- 
View this message in context: 
http://www.nabble.com/-Axis2--JiBX-unwrapped-with-Fault-example-tf3017807.html#a9938387
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] JiBX unwrapped with Fault example

2007-04-11 Thread david2

Dennis,

One other thing:  after I successfully ran the web service generated by the
library example, I added a simple unmarshall/marshall target to the
build.xml.  However, I can't get an XML file containing a Type element to
successfully marshall or unmarshall.

This is the ant target I am using to marshall/unmarshall (based upon your
run target, and added to your existing build.xml):

  target name=run-jibx  
java classname=test.JiBXTest
fork=true
  classpath path=${build-client}/bin/
  classpath refid=axis-classpath/
  classpath refid=jibx-classpath/
  classpath path=${build-client}/lib/shared.jar/
  arg value=${build-client}\data.xml/
  arg value=${build-client}\out.xml/
/java
  /target


Here is the XML file to be unmarshalled (data.xml):

 ?xml version=1.0 encoding=UTF-8?
 Type name=java count=5About Java/Type


The test client I am using (based upon an existing JiBX example) is as
follows:

package test;

import java.io.FileInputStream;
import java.io.FileOutputStream;

import org.jibx.runtime.BindingDirectory;
import org.jibx.runtime.IBindingFactory;
import org.jibx.runtime.IMarshallingContext;
import org.jibx.runtime.IUnmarshallingContext;

import com.sosnoski.ws.library.jibx.Type;

public class JiBXTest {

public static void main(String[] args) throws Exception {

IBindingFactory bfact = BindingDirectory.getFactory(Type.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();

FileInputStream in = new FileInputStream(args[0]);
Type object = (Type) uctx.unmarshalDocument(in, null);

IMarshallingContext mctx = bfact.createMarshallingContext();
mctx.setIndent(2);
FileOutputStream out = new FileOutputStream(args[1]);
mctx.marshalDocument(object, UTF-8, null, out);
}
}


and the error generated is:

 C:\development\Axis2\jibx-libraryant run-jibx
 Buildfile: build.xml

 run-jibx:
  [java] unmarshalling file:
C:\development\Axis2\jibx-library\client\data.xml
  [java] Exception in thread main org.jibx.runtime.JiBXException:
No unmarshaller for element Type (line 2, col 29)
  [java] at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2535)
  [java] at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2681)
  [java] at test.JiBXTest.main(JiBXTest.java:24)
  [java] Java Result: 1


I have successfully run similar tests on some of my other bindings.  Any
idea why it may be failing on Type?

-David
-- 
View this message in context: 
http://www.nabble.com/-Axis2--JiBX-unwrapped-with-Fault-example-tf3017807.html#a9939598
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validation Error with library.wsdl in Example

2007-04-11 Thread david2

Anil,

What exactly is being overwritten?

I'm new at this, but I believe that the Skeleton is the only thing you
should be providing if you are using WSDL2Java.  All of the other classes
that are generated by WSDL2Java should be used as-is.

-David
-- 
View this message in context: 
http://www.nabble.com/-Axis2--JiBX-unwrapped-with-Fault-example-tf3017807.html#a9949177
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ant wsdl2java command line WSDL2Java generate different code

2007-03-28 Thread david2

I have been working with the Axis2UserGuide.wsdl example to find a suitable
way to automate our Axis2 web service builds from ant.

I successfully generated the client using the batch file
(%AXIS2_HOME%\bin\wsdl2java...).  I have also successfully generated the
service from the java class (java org.apache.axis2.wsdl.WSDL2Java...).

When I tried to perform the same exercise using Ant wsdl2java tasks (as per
sample quickstartadb), code was generated, however, when I deployed the aar
file, it did not respond to the Client.  The DoInOnly message was not
received by the service (I added print statements to the appropriate
Axis2UserGuideServiceSkeleton methods to verify this).  Furthermore, the
other messages all generated AxisFaults when the execute(true) method is
sent to the _operationClient (OutInAxisOperation).  I redeployed the
original aar file generated by Java command line, restarted Tomcat, and the
Client worked fine.

I also noticed that the ant wsdl2java task generated an
Axis2UserGuideServiceSkeletonInterface class which was never generated by
the invocation of WSDL2Java as a Java class.  Also, when I compared the
generated message receiver service code side by side, I noticed that the
versions of Axis2UserGuideServiceMessageReceiverInOnly.java 
Axis2UserGuideServiceMessageReceiverInOut.java generated by the Ant
wsdl2java task reference the skeleton Interface:

Axis2UserGuideServiceSkeletonInterface skel =
(Axis2UserGuideServiceSkeletonInterface)obj;

whereas the those generated via the Java command line reference the Skeleton
class itself:

Axis2UserGuideServiceSkeleton skel =
(Axis2UserGuideServiceSkeleton)obj;

My questions are:


1)  Why would the ant task generate different code than the Java command
line approach?

2)  What are the impacts of using the command line generated classes that
reference the Skeleton, rather than the Interface?

3)  Is there a better way to automate the Ant build?


I am using the Axis2UserGuide.wsdl defined in the user's guide, and separate
directories for client and source code.  Here is how I am generating the
code:

Command line client code generation (all on one line):
==

%AXIS2_HOME%\bin\wsdl2java 
-uri Axis2UserGuide.wsdl 
-p org.apache.axis2.axis2userguide 
-o client 
-d adb 
-s

Ant task client code generation (all on one line):
==

taskdef name=wsdl2java
 classname=org.apache.axis2.tool.ant.AntCodegenTask
 classpathref=axis2.classpath/
wsdl2java wsdlFilename=${wsdl.file}
   output=${client.dir}
   packageName=org.apache.axis2.axis2userguide
   language=java
   databindingName=adb
   synconly=true
  
namespaceToPackages=http://apache.org/axis2/Axis2UserGuide=org.apache.axis2.axis2userguide;
/

Command line service code generation (all on one line):
===

java org.apache.axis2.wsdl.WSDL2Java 
-uri Axis2UserGuide.wsdl 
-p org.apache.axis2.axis2userguide 
-o service 
-d adb 
-s 
-wv 1.1 
-ss 
-sd

Ant task service code generation (all on one line):
===

taskdef name=wsdl2java
 classname=org.apache.axis2.tool.ant.AntCodegenTask
 classpathref=axis2.classpath/
wsdl2java wsdlFilename=${wsdl.file}
   output=${service.dir}
   packageName=org.apache.axis2.axis2userguide
   language=java
   databindingName=adb
   synconly=true
   serverside=true
   serverSideInterface=true
  
namespaceToPackages=http://apache.org/axis2/Axis2UserGuide=org.apache.axis2.axis2userguide;
   generateservicexml=true
/

Client output, including AxisFault stack traces:

doInOnly done

org.apache.axis2.AxisFault:
org.apache.axis2.axis2userguide.Axis2UserGuideServiceSkeleton
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
at
org.apache.axis2.axis2userguide.Axis2UserGuideServiceStub.TwoWayOneParameterEcho(Axis2UserGuideServiceStub.java:277)
at
org.apache.axis2.axis2userguide.Client.twoWayOneParameterEcho(Client.java:54)
at org.apache.axis2.axis2userguide.Client.main(Client.java:19)

org.apache.axis2.AxisFault:
org.apache.axis2.axis2userguide.Axis2UserGuideServiceSkeleton
at

Re: Ant wsdl2java command line WSDL2Java generate different code

2007-03-28 Thread david2

Answer to my question #3:  Use the Ant java task.  This behaves the same way
as the User Guide example (no Skeleton Interface, nor references to it) and,
best of all, the Client successfully executes against the resulting aar.

Here are the tasks for generating the service aar file.  Note the copied
Skeleton containing method logic.  The ant task kicks off the build script
created by wsdl2java:

java classname=org.apache.axis2.wsdl.WSDL2Java
arg line=-uri ${wsdl.file} -p ${package.name} -o ${service.dir} -d
${binding} -s -wv 1.1 -ss -sd /
classpath refid=axis2.classpath /
/java
copy file=${basedir}/Axis2UserGuideServiceSkeleton.java 
toDir=${service.dir}/src/org/apache/axis2/axis2userguide/
overwrite=yes
/copy
ant dir=${service.dir} /

Here are the tasks for generating the client jar file.  The ant task kicks
off the build script created by wsdl2java:

java classname=org.apache.axis2.wsdl.WSDL2Java
arg line=-uri ${wsdl.file} -p ${package.name} -o ${client.dir} -d
${binding} -s /
classpath refid=axis2.classpath /
/java
ant dir=${client.dir} /
-- 
View this message in context: 
http://www.nabble.com/Ant-wsdl2java---command-line-WSDL2Java-generate-different-code-tf3481674.html#a9718427
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]