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 "Hehl, Thomas" <Th...@acs-inc.com> on 2010/05/05 16:26:46 UTC

I don't get it

OK, I've used Axis once before briefly and now I'm trying to use Axis2.
The problem I'm having is that the documents don't appear to be written
for me. I need some advice on how to proceed.

 

My situation is that after building a web application, it turns out that
we need to have heterogeneous clients accessing our application. No
problem, I thought, because I created a services layer behind the
controller. I can use axis2 to generate a WSDL for my services layer and
expose the API that way to the other clients that need to access it and
our controllers as well. 

 

My intent had been simply to run java2wsdl on the classes in my services
jar, then wsdl2java on the resulting wsdl to build the client. Then I'd
patch these pieces together and let the web services do the
communication.

 

As I'm reading through the documentation, though, it talks a lot about
ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any
of them. Evidently, I'm supposed to know which of these I'm using before
selecting Axis2 as a tool.

 

So now I'm sort of stuck. Will someone kindly take a moment and shine a
little light, please?

 

Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300

 


RE: I don't get it

Posted by "Hehl, Thomas" <Th...@acs-inc.com>.
Sorry, my mistake. I was expecting it to be called WSDL2JavaTask or something.

 

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 9:37 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

> Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

 

Well, it's documented, but it's not in the jar file.

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

 

Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.

 

I'm not sure why you want to have your server-side controller call your web-service.  We have the following layers:

 

Service ->  Business -> Persistence

 

Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Sorry, had to pull aside to take care of critical issues.

 

OK, it sounds like JiBX will work for us too. So let's talk this through.

 

We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.

 

We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.

 

I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I'm having a hard time getting my head around.

 

It looks like:

 

1)       WSDL2Java no longer has an ant task

2)       You're not using WSDL2Java below to build your client.

 

Are these true?

 

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

 

Here is how we do it:

 

1.	We started with WSDL. 
2.	We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes. 
3.	We set up our Eclipse development environment to run the binding compiler automatically, using Maven: 

 

                  <plugin>

                        <groupId>org.jibx</groupId>

                        <artifactId>maven-jibx-plugin</artifactId>

                        <version>1.2.1</version>

                        <configuration>

                              <directory>src/main/config</directory>

                              <includes>

                                    <includes>*binding.xml</includes>

                              </includes>

                              <verbose>false</verbose>

                        </configuration>

                        <executions>

                              <execution>

                                    <phase>process-classes</phase>

                                    <goals>

                                          <goal>bind</goal>

                                    </goals>

                              </execution>

                        </executions>

                  </plugin>

 

 

4.	We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation. 

 

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Thanks for your help, Joe.

 

I have run the following command against my WSDL:

 

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl

Using AXIS2_HOME:   D:\javatools\axis2-1.5.1

Using JAVA_HOME:    d:\java\jdk

Retrieving document at '.\ValidationCodeService.wsdl'.

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException

: java.lang.RuntimeException: JiBX wrapped support requires a binding definition

 to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.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: JiBX wrapped support requires a binding d

efinition to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil

ity.java:233)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte

nsion.java:77)

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.java:224)

        ... 2 more

 

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

 

Thanks!

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

 

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

 

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

 

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well. 

 

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

 

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

 

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?

 

Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300

 

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.


RE: I don't get it

Posted by "Hehl, Thomas" <Th...@acs-inc.com>.
> Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

 

Well, it's documented, but it's not in the jar file.

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

 

Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.

 

I'm not sure why you want to have your server-side controller call your web-service.  We have the following layers:

 

Service ->  Business -> Persistence

 

Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Sorry, had to pull aside to take care of critical issues.

 

OK, it sounds like JiBX will work for us too. So let's talk this through.

 

We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.

 

We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.

 

I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I'm having a hard time getting my head around.

 

It looks like:

 

1)       WSDL2Java no longer has an ant task

2)       You're not using WSDL2Java below to build your client.

 

Are these true?

 

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

 

Here is how we do it:

 

1.	We started with WSDL. 
2.	We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes. 
3.	We set up our Eclipse development environment to run the binding compiler automatically, using Maven: 

 

                  <plugin>

                        <groupId>org.jibx</groupId>

                        <artifactId>maven-jibx-plugin</artifactId>

                        <version>1.2.1</version>

                        <configuration>

                              <directory>src/main/config</directory>

                              <includes>

                                    <includes>*binding.xml</includes>

                              </includes>

                              <verbose>false</verbose>

                        </configuration>

                        <executions>

                              <execution>

                                    <phase>process-classes</phase>

                                    <goals>

                                          <goal>bind</goal>

                                    </goals>

                              </execution>

                        </executions>

                  </plugin>

 

 

4.	We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation. 

 

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Thanks for your help, Joe.

 

I have run the following command against my WSDL:

 

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl

Using AXIS2_HOME:   D:\javatools\axis2-1.5.1

Using JAVA_HOME:    d:\java\jdk

Retrieving document at '.\ValidationCodeService.wsdl'.

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException

: java.lang.RuntimeException: JiBX wrapped support requires a binding definition

 to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.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: JiBX wrapped support requires a binding d

efinition to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil

ity.java:233)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte

nsion.java:77)

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.java:224)

        ... 2 more

 

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

 

Thanks!

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

 

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

 

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

 

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well. 

 

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

 

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

 

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?

 

Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300

 

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.


RE: I don't get it

Posted by "Hehl, Thomas" <Th...@acs-inc.com>.
Our Frontend is http1.1. Voice is unknown, as they will go to their voice vendor once I define the connection. For the moment, I'm figuring http1.1 as well.

 

________________________________

From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Thursday, May 13, 2010 12:29 PM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

before we get too far ahead of ourselves..you will want to understand the supported protocols for each

web --http1.1
Voice?
Our-Frontend?

?
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.





  

________________________________

Subject: RE: I don't get it
Date: Thu, 13 May 2010 11:03:59 -0500
From: Thomas.Hehl@acs-inc.com
To: java-user@axis.apache.org

Something like:

 

 

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 10:23 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

The web service is usually the entry point which is called directly by the client.  You may want to draw a picture of what you are planning and post it for architecture suggestions.  

 

The standard Java EE way of sharing resources is via JNDI.  Here is a link to the Apache Tomcat JNDI documentation: http://www.wj.dl.gov.cn/docs/jndi-datasource-examples-howto.html

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 9:34 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

I want all application to share the same resources, especially the database connection pool. That's why we're having our server side controller go through the web service.

 

Please advise if you can recommend a better way. This is a relatively new experience for me.

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

 

Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.

 

I'm not sure why you want to have your server-side controller call your web-service.  We have the following layers:

 

Service ->  Business -> Persistence

 

Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Sorry, had to pull aside to take care of critical issues.

 

OK, it sounds like JiBX will work for us too. So let's talk this through.

 

We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.

 

We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.

 

I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I'm having a hard time getting my head around.

 

It looks like:

 

1)       WSDL2Java no longer has an ant task

2)       You're not using WSDL2Java below to build your client.

 

Are these true?

 

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

 

Here is how we do it:

 

1.	We started with WSDL. 
2.	We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes. 
3.	We set up our Eclipse development environment to run the binding compiler automatically, using Maven: 

 

                  <plugin>

                        <groupId>org.jibx</groupId>

                        <artifactId>maven-jibx-plugin</artifactId>

                        <version>1.2.1</version>

                        <configuration>

                              <directory>src/main/config</directory>

                              <includes>

                                    <includes>*binding.xml</includes>

                              </includes>

                              <verbose>false</verbose>

                        </configuration>

                        <executions>

                              <execution>

                                    <phase>process-classes</phase>

                                    <goals>

                                          <goal>bind</goal>

                                    </goals>

                              </execution>

                        </executions>

                  </plugin>

 

 

4.	We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation. 

 

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Thanks for your help, Joe.

 

I have run the following command against my WSDL:

 

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl

Using AXIS2_HOME:   D:\javatools\axis2-1.5.1

Using JAVA_HOME:    d:\java\jdk

Retrieving document at '.\ValidationCodeService.wsdl'.

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException

: java.lang.RuntimeException: JiBX wrapped support requires a binding definition

 to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.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: JiBX wrapped support requires a binding d

efinition to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil

ity.java:233)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte

nsion.java:77)

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.java:224)

        ... 2 more

 

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

 

Thanks!

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

 

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

 

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

 

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well. 

 

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

 

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

 

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?

 

Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300

 

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. Learn more. <http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1> 


RE: I don't get it

Posted by Martin Gainty <mg...@hotmail.com>.
before we get too far ahead of ourselves..you will want to understand the supported protocols for each


web --http1.1

Voice?
Our-Frontend?


?
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.



 



Subject: RE: I don't get it
Date: Thu, 13 May 2010 11:03:59 -0500
From: Thomas.Hehl@acs-inc.com
To: java-user@axis.apache.org









Something like:
 

 




From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 10:23 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
The web service is usually the entry point which is called directly by the client.  You may want to draw a picture of what you are planning and post it for architecture suggestions.  
 
The standard Java EE way of sharing resources is via JNDI.  Here is a link to the Apache Tomcat JNDI documentation: http://www.wj.dl.gov.cn/docs/jndi-datasource-examples-howto.html




From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 9:34 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
I want all application to share the same resources, especially the database connection pool. That’s why we’re having our server side controller go through the web service.
 
Please advise if you can recommend a better way. This is a relatively new experience for me.
 




From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
Wsdl2Java does seem to still have an ANT task (we’re not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant
 
Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.
 
I’m not sure why you want to have your server-side controller call your web-service.  We have the following layers:
 
Service ->  Business -> Persistence
 
Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.




From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
Sorry, had to pull aside to take care of critical issues.
 
OK, it sounds like JiBX will work for us too. So let’s talk this through.
 
We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.
 
We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.
 
I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I’m having a hard time getting my head around.
 
It looks like:
 
1)       WSDL2Java no longer has an ant task
2)       You’re not using WSDL2Java below to build your client.
 
Are these true?
 
 




From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
With JiBX, Axis2 can’t do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here’s the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here’s a link:  http://jibx.sourceforge.net/bindcomp.html
 
Here is how we do it:
 

We started with WSDL. 
We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes. 
We set up our Eclipse development environment to run the binding compiler automatically, using Maven: 
 
                  <plugin>
                        <groupId>org.jibx</groupId>
                        <artifactId>maven-jibx-plugin</artifactId>
                        <version>1.2.1</version>
                        <configuration>
                              <directory>src/main/config</directory>
                              <includes>
                                    <includes>*binding.xml</includes>
                              </includes>
                              <verbose>false</verbose>
                        </configuration>
                        <executions>
                              <execution>
                                    <phase>process-classes</phase>
                                    <goals>
                                          <goal>bind</goal>
                                    </goals>
                              </execution>
                        </executions>
                  </plugin>
 
 

We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation. 
 
Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2




From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
Thanks for your help, Joe.
 
I have run the following command against my WSDL:
 
D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s –uri .\ValidationCodeService.wsdl
Using AXIS2_HOME:   D:\javatools\axis2-1.5.1
Using JAVA_HOME:    d:\java\jdk
Retrieving document at '.\ValidationCodeService.wsdl'.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.RuntimeException: JiBX wrapped support requires a binding definition
 to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.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: JiBX wrapped support requires a binding d
efinition to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:233)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte
nsion.java:77)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java:224)
        ... 2 more
 
It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?
 
Thanks!
 




From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.
 
Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.




From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it
 
OK, I’ve used Axis once before briefly and now I’m trying to use Axis2. The problem I’m having is that the documents don’t appear to be written for me. I need some advice on how to proceed.
 
My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well. 
 
My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I’d patch these pieces together and let the web services do the communication.
 
As I’m reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn’t appear to explain any of them. Evidently, I’m supposed to know which of these I’m using before selecting Axis2 as a tool.
 
So now I’m sort of stuck. Will someone kindly take a moment and shine a little light, please?
 
Thom Hehl
Senior Development Specialist
Public Safety & Justice
Affiliated Computer Services, Inc.
A Xerox Company
1733 Harrodsburg Road
Lexington, KY 40504-3617
Tel 859.277.8800 x 144
Fax 859.277.2300
 
 



STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.
 



STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.
 



STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.
 



STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments. 		 	   		  
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1

RE: I don't get it

Posted by "Hehl, Thomas" <Th...@acs-inc.com>.
Something like:

 

 

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 10:23 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

The web service is usually the entry point which is called directly by the client.  You may want to draw a picture of what you are planning and post it for architecture suggestions.  

 

The standard Java EE way of sharing resources is via JNDI.  Here is a link to the Apache Tomcat JNDI documentation: http://www.wj.dl.gov.cn/docs/jndi-datasource-examples-howto.html

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 9:34 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

I want all application to share the same resources, especially the database connection pool. That's why we're having our server side controller go through the web service.

 

Please advise if you can recommend a better way. This is a relatively new experience for me.

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

 

Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.

 

I'm not sure why you want to have your server-side controller call your web-service.  We have the following layers:

 

Service ->  Business -> Persistence

 

Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Sorry, had to pull aside to take care of critical issues.

 

OK, it sounds like JiBX will work for us too. So let's talk this through.

 

We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.

 

We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.

 

I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I'm having a hard time getting my head around.

 

It looks like:

 

1)       WSDL2Java no longer has an ant task

2)       You're not using WSDL2Java below to build your client.

 

Are these true?

 

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

 

Here is how we do it:

 

1.	We started with WSDL. 
2.	We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes. 
3.	We set up our Eclipse development environment to run the binding compiler automatically, using Maven: 

 

                  <plugin>

                        <groupId>org.jibx</groupId>

                        <artifactId>maven-jibx-plugin</artifactId>

                        <version>1.2.1</version>

                        <configuration>

                              <directory>src/main/config</directory>

                              <includes>

                                    <includes>*binding.xml</includes>

                              </includes>

                              <verbose>false</verbose>

                        </configuration>

                        <executions>

                              <execution>

                                    <phase>process-classes</phase>

                                    <goals>

                                          <goal>bind</goal>

                                    </goals>

                              </execution>

                        </executions>

                  </plugin>

 

 

4.	We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation. 

 

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Thanks for your help, Joe.

 

I have run the following command against my WSDL:

 

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl

Using AXIS2_HOME:   D:\javatools\axis2-1.5.1

Using JAVA_HOME:    d:\java\jdk

Retrieving document at '.\ValidationCodeService.wsdl'.

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException

: java.lang.RuntimeException: JiBX wrapped support requires a binding definition

 to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.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: JiBX wrapped support requires a binding d

efinition to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil

ity.java:233)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte

nsion.java:77)

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.java:224)

        ... 2 more

 

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

 

Thanks!

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

 

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

 

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

 

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well. 

 

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

 

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

 

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?

 

Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300

 

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.


RE: I don't get it

Posted by "Caristi, Joe" <jc...@whisolutions.com>.
The web service is usually the entry point which is called directly by the client.  You may want to draw a picture of what you are planning and post it for architecture suggestions.

The standard Java EE way of sharing resources is via JNDI.  Here is a link to the Apache Tomcat JNDI documentation: http://www.wj.dl.gov.cn/docs/jndi-datasource-examples-howto.html
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 13, 2010 9:34 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

I want all application to share the same resources, especially the database connection pool. That's why we're having our server side controller go through the web service.

Please advise if you can recommend a better way. This is a relatively new experience for me.

________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.

I'm not sure why you want to have your server-side controller call your web-service.  We have the following layers:

Service ->  Business -> Persistence

Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Sorry, had to pull aside to take care of critical issues.

OK, it sounds like JiBX will work for us too. So let's talk this through.

We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.

We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.

I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I'm having a hard time getting my head around.

It looks like:

1)       WSDL2Java no longer has an ant task
2)       You're not using WSDL2Java below to build your client.

Are these true?


________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

Here is how we do it:


 1.  We started with WSDL.
 2.  We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes.
 3.  We set up our Eclipse development environment to run the binding compiler automatically, using Maven:

                  <plugin>
                        <groupId>org.jibx</groupId>
                        <artifactId>maven-jibx-plugin</artifactId>
                        <version>1.2.1</version>
                        <configuration>
                              <directory>src/main/config</directory>
                              <includes>
                                    <includes>*binding.xml</includes>
                              </includes>
                              <verbose>false</verbose>
                        </configuration>
                        <executions>
                              <execution>
                                    <phase>process-classes</phase>
                                    <goals>
                                          <goal>bind</goal>
                                    </goals>
                              </execution>
                        </executions>
                  </plugin>



 1.  We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation.

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Thanks for your help, Joe.

I have run the following command against my WSDL:

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl
Using AXIS2_HOME:   D:\javatools\axis2-1.5.1
Using JAVA_HOME:    d:\java\jdk
Retrieving document at '.\ValidationCodeService.wsdl'.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.RuntimeException: JiBX wrapped support requires a binding definition
 to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.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: JiBX wrapped support requires a binding d
efinition to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:233)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte
nsion.java:77)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java:224)
        ... 2 more

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

Thanks!

________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well.

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?


Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300


________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

RE: I don't get it

Posted by "Hehl, Thomas" <Th...@acs-inc.com>.
I want all application to share the same resources, especially the database connection pool. That's why we're having our server side controller go through the web service.

 

Please advise if you can recommend a better way. This is a relatively new experience for me.

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

 

Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.

 

I'm not sure why you want to have your server-side controller call your web-service.  We have the following layers:

 

Service ->  Business -> Persistence

 

Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Sorry, had to pull aside to take care of critical issues.

 

OK, it sounds like JiBX will work for us too. So let's talk this through.

 

We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.

 

We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.

 

I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I'm having a hard time getting my head around.

 

It looks like:

 

1)       WSDL2Java no longer has an ant task

2)       You're not using WSDL2Java below to build your client.

 

Are these true?

 

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

 

Here is how we do it:

 

1.	We started with WSDL. 
2.	We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes. 
3.	We set up our Eclipse development environment to run the binding compiler automatically, using Maven: 

 

                  <plugin>

                        <groupId>org.jibx</groupId>

                        <artifactId>maven-jibx-plugin</artifactId>

                        <version>1.2.1</version>

                        <configuration>

                              <directory>src/main/config</directory>

                              <includes>

                                    <includes>*binding.xml</includes>

                              </includes>

                              <verbose>false</verbose>

                        </configuration>

                        <executions>

                              <execution>

                                    <phase>process-classes</phase>

                                    <goals>

                                          <goal>bind</goal>

                                    </goals>

                              </execution>

                        </executions>

                  </plugin>

 

 

4.	We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation. 

 

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Thanks for your help, Joe.

 

I have run the following command against my WSDL:

 

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl

Using AXIS2_HOME:   D:\javatools\axis2-1.5.1

Using JAVA_HOME:    d:\java\jdk

Retrieving document at '.\ValidationCodeService.wsdl'.

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException

: java.lang.RuntimeException: JiBX wrapped support requires a binding definition

 to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.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: JiBX wrapped support requires a binding d

efinition to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil

ity.java:233)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte

nsion.java:77)

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.java:224)

        ... 2 more

 

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

 

Thanks!

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

 

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

 

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

 

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well. 

 

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

 

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

 

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?

 

Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300

 

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.


RE: I don't get it

Posted by Martin Gainty <mg...@hotmail.com>.
you have to create it

 

looks something like

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema 
 elementFormDefault="qualified" 
    targetNamespace="http://dowecheatemandhowe.gov/WRIBOSService/"
 xmlns="http://www.w3.org/2001/XMLSchema"
 xmlns:tns="http://dowecheatemandhowe.gov/WRIBOSService/" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
.................


Martin Gainty 
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité


 
Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.



 



Subject: RE: I don't get it
Date: Thu, 13 May 2010 11:06:20 -0500
From: Thomas.Hehl@acs-inc.com
To: java-user@axis.apache.org









Trying to run through some of the JiBX examples you provided me from IBM and it looks like it starts with an XSD file. Where do I get this XSD file from if I start with java code?
 




From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 10:03 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
If you use your model objects, you still need the JiBX binding file (which you will have to hand code) and the binding compiler.  This is the linkage from Axis2 to your model objects.  You have to specify the JiBX binding file when you run Wsdl2Java.




From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 9:44 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
OK, starting to run through the samples and, iiuc, I don’t need JIBX at all because I can simply use my model objects since I own both the client and the server. All I need to do is to build my java code from the WSDL and run it. Yes?
 




From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
Wsdl2Java does seem to still have an ANT task (we’re not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant
 
Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.
 
I’m not sure why you want to have your server-side controller call your web-service.  We have the following layers:
 
Service ->  Business -> Persistence
 
Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.




From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
Sorry, had to pull aside to take care of critical issues.
 
OK, it sounds like JiBX will work for us too. So let’s talk this through.
 
We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.
 
We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.
 
I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I’m having a hard time getting my head around.
 
It looks like:
 
1)      WSDL2Java no longer has an ant task
2)      You’re not using WSDL2Java below to build your client.
 
Are these true?
 
 




From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
With JiBX, Axis2 can’t do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here’s the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here’s a link:  http://jibx.sourceforge.net/bindcomp.html
 
Here is how we do it:
 

We started with WSDL. 
We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes. 
We set up our Eclipse development environment to run the binding compiler automatically, using Maven: 
 
                  <plugin>
                        <groupId>org.jibx</groupId>
                        <artifactId>maven-jibx-plugin</artifactId>
                        <version>1.2.1</version>
                        <configuration>
                              <directory>src/main/config</directory>
                              <includes>
                                    <includes>*binding.xml</includes>
                              </includes>
                              <verbose>false</verbose>
                        </configuration>
                        <executions>
                              <execution>
                                    <phase>process-classes</phase>
                                    <goals>
                                          <goal>bind</goal>
                                    </goals>
                              </execution>
                        </executions>
                  </plugin>
 
 

We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation. 
 
Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2




From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
Thanks for your help, Joe.
 
I have run the following command against my WSDL:
 
D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s –uri .\ValidationCodeService.wsdl
Using AXIS2_HOME:   D:\javatools\axis2-1.5.1
Using JAVA_HOME:    d:\java\jdk
Retrieving document at '.\ValidationCodeService.wsdl'.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.RuntimeException: JiBX wrapped support requires a binding definition
 to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.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: JiBX wrapped support requires a binding d
efinition to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:233)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte
nsion.java:77)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java:224)
        ... 2 more
 
It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?
 
Thanks!
 




From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it
 
The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.
 
Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.




From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it
 
OK, I’ve used Axis once before briefly and now I’m trying to use Axis2. The problem I’m having is that the documents don’t appear to be written for me. I need some advice on how to proceed.
 
My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well. 
 
My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I’d patch these pieces together and let the web services do the communication.
 
As I’m reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn’t appear to explain any of them. Evidently, I’m supposed to know which of these I’m using before selecting Axis2 as a tool.
 
So now I’m sort of stuck. Will someone kindly take a moment and shine a little light, please?
 
Thom Hehl
Senior Development Specialist
Public Safety & Justice
Affiliated Computer Services, Inc.
A Xerox Company
1733 Harrodsburg Road
Lexington, KY 40504-3617
Tel 859.277.8800 x 144
Fax 859.277.2300
 
 



STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.
 



STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.
 



STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.
 



STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments. 		 	   		  
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

RE: I don't get it

Posted by "Caristi, Joe" <jc...@whisolutions.com>.
Look here for an overview of the process (including Axis2):  http://ws.apache.org/axis2/1_1_1/jibx/jibx-codegen-integration.html

This JiBX tutorial starts with Java: http://www.ibm.com/developerworks/java/tutorials/j-jibx1/index.html
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 13, 2010 12:06 PM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Trying to run through some of the JiBX examples you provided me from IBM and it looks like it starts with an XSD file. Where do I get this XSD file from if I start with java code?

________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Thursday, May 13, 2010 10:03 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

If you use your model objects, you still need the JiBX binding file (which you will have to hand code) and the binding compiler.  This is the linkage from Axis2 to your model objects.  You have to specify the JiBX binding file when you run Wsdl2Java.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 13, 2010 9:44 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

OK, starting to run through the samples and, iiuc, I don't need JIBX at all because I can simply use my model objects since I own both the client and the server. All I need to do is to build my java code from the WSDL and run it. Yes?

________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.

I'm not sure why you want to have your server-side controller call your web-service.  We have the following layers:

Service ->  Business -> Persistence

Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Sorry, had to pull aside to take care of critical issues.

OK, it sounds like JiBX will work for us too. So let's talk this through.

We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.

We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.

I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I'm having a hard time getting my head around.

It looks like:

1)      WSDL2Java no longer has an ant task
2)      You're not using WSDL2Java below to build your client.

Are these true?


________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

Here is how we do it:


 1.  We started with WSDL.
 2.  We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes.
 3.  We set up our Eclipse development environment to run the binding compiler automatically, using Maven:

                  <plugin>
                        <groupId>org.jibx</groupId>
                        <artifactId>maven-jibx-plugin</artifactId>
                        <version>1.2.1</version>
                        <configuration>
                              <directory>src/main/config</directory>
                              <includes>
                                    <includes>*binding.xml</includes>
                              </includes>
                              <verbose>false</verbose>
                        </configuration>
                        <executions>
                              <execution>
                                    <phase>process-classes</phase>
                                    <goals>
                                          <goal>bind</goal>
                                    </goals>
                              </execution>
                        </executions>
                  </plugin>



 1.  We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation.

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Thanks for your help, Joe.

I have run the following command against my WSDL:

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl
Using AXIS2_HOME:   D:\javatools\axis2-1.5.1
Using JAVA_HOME:    d:\java\jdk
Retrieving document at '.\ValidationCodeService.wsdl'.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.RuntimeException: JiBX wrapped support requires a binding definition
 to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.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: JiBX wrapped support requires a binding d
efinition to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:233)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte
nsion.java:77)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java:224)
        ... 2 more

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

Thanks!

________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well.

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?


Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300


________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

RE: I don't get it

Posted by "Hehl, Thomas" <Th...@acs-inc.com>.
Trying to run through some of the JiBX examples you provided me from IBM and it looks like it starts with an XSD file. Where do I get this XSD file from if I start with java code?

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 10:03 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

If you use your model objects, you still need the JiBX binding file (which you will have to hand code) and the binding compiler.  This is the linkage from Axis2 to your model objects.  You have to specify the JiBX binding file when you run Wsdl2Java.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 9:44 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

OK, starting to run through the samples and, iiuc, I don't need JIBX at all because I can simply use my model objects since I own both the client and the server. All I need to do is to build my java code from the WSDL and run it. Yes?

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

 

Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.

 

I'm not sure why you want to have your server-side controller call your web-service.  We have the following layers:

 

Service ->  Business -> Persistence

 

Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Sorry, had to pull aside to take care of critical issues.

 

OK, it sounds like JiBX will work for us too. So let's talk this through.

 

We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.

 

We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.

 

I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I'm having a hard time getting my head around.

 

It looks like:

 

1)      WSDL2Java no longer has an ant task

2)      You're not using WSDL2Java below to build your client.

 

Are these true?

 

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

 

Here is how we do it:

 

1.	We started with WSDL. 
2.	We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes. 
3.	We set up our Eclipse development environment to run the binding compiler automatically, using Maven: 

 

                  <plugin>

                        <groupId>org.jibx</groupId>

                        <artifactId>maven-jibx-plugin</artifactId>

                        <version>1.2.1</version>

                        <configuration>

                              <directory>src/main/config</directory>

                              <includes>

                                    <includes>*binding.xml</includes>

                              </includes>

                              <verbose>false</verbose>

                        </configuration>

                        <executions>

                              <execution>

                                    <phase>process-classes</phase>

                                    <goals>

                                          <goal>bind</goal>

                                    </goals>

                              </execution>

                        </executions>

                  </plugin>

 

 

4.	We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation. 

 

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Thanks for your help, Joe.

 

I have run the following command against my WSDL:

 

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl

Using AXIS2_HOME:   D:\javatools\axis2-1.5.1

Using JAVA_HOME:    d:\java\jdk

Retrieving document at '.\ValidationCodeService.wsdl'.

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException

: java.lang.RuntimeException: JiBX wrapped support requires a binding definition

 to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.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: JiBX wrapped support requires a binding d

efinition to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil

ity.java:233)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte

nsion.java:77)

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.java:224)

        ... 2 more

 

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

 

Thanks!

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

 

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

 

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

 

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well. 

 

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

 

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

 

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?

 

Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300

 

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.


RE: I don't get it

Posted by "Caristi, Joe" <jc...@whisolutions.com>.
If you use your model objects, you still need the JiBX binding file (which you will have to hand code) and the binding compiler.  This is the linkage from Axis2 to your model objects.  You have to specify the JiBX binding file when you run Wsdl2Java.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 13, 2010 9:44 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

OK, starting to run through the samples and, iiuc, I don't need JIBX at all because I can simply use my model objects since I own both the client and the server. All I need to do is to build my java code from the WSDL and run it. Yes?

________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.

I'm not sure why you want to have your server-side controller call your web-service.  We have the following layers:

Service ->  Business -> Persistence

Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Sorry, had to pull aside to take care of critical issues.

OK, it sounds like JiBX will work for us too. So let's talk this through.

We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.

We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.

I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I'm having a hard time getting my head around.

It looks like:

1)       WSDL2Java no longer has an ant task
2)       You're not using WSDL2Java below to build your client.

Are these true?


________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

Here is how we do it:


 1.  We started with WSDL.
 2.  We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes.
 3.  We set up our Eclipse development environment to run the binding compiler automatically, using Maven:

                  <plugin>
                        <groupId>org.jibx</groupId>
                        <artifactId>maven-jibx-plugin</artifactId>
                        <version>1.2.1</version>
                        <configuration>
                              <directory>src/main/config</directory>
                              <includes>
                                    <includes>*binding.xml</includes>
                              </includes>
                              <verbose>false</verbose>
                        </configuration>
                        <executions>
                              <execution>
                                    <phase>process-classes</phase>
                                    <goals>
                                          <goal>bind</goal>
                                    </goals>
                              </execution>
                        </executions>
                  </plugin>



 1.  We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation.

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Thanks for your help, Joe.

I have run the following command against my WSDL:

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl
Using AXIS2_HOME:   D:\javatools\axis2-1.5.1
Using JAVA_HOME:    d:\java\jdk
Retrieving document at '.\ValidationCodeService.wsdl'.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.RuntimeException: JiBX wrapped support requires a binding definition
 to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.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: JiBX wrapped support requires a binding d
efinition to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:233)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte
nsion.java:77)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java:224)
        ... 2 more

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

Thanks!

________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well.

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?


Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300


________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

RE: I don't get it

Posted by "Hehl, Thomas" <Th...@acs-inc.com>.
OK, starting to run through the samples and, iiuc, I don't need JIBX at all because I can simply use my model objects since I own both the client and the server. All I need to do is to build my java code from the WSDL and run it. Yes?

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 13, 2010 9:21 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

 

Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.

 

I'm not sure why you want to have your server-side controller call your web-service.  We have the following layers:

 

Service ->  Business -> Persistence

 

Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Sorry, had to pull aside to take care of critical issues.

 

OK, it sounds like JiBX will work for us too. So let's talk this through.

 

We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.

 

We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.

 

I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I'm having a hard time getting my head around.

 

It looks like:

 

1)       WSDL2Java no longer has an ant task

2)       You're not using WSDL2Java below to build your client.

 

Are these true?

 

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

 

Here is how we do it:

 

1.	We started with WSDL. 
2.	We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes. 
3.	We set up our Eclipse development environment to run the binding compiler automatically, using Maven: 

 

                  <plugin>

                        <groupId>org.jibx</groupId>

                        <artifactId>maven-jibx-plugin</artifactId>

                        <version>1.2.1</version>

                        <configuration>

                              <directory>src/main/config</directory>

                              <includes>

                                    <includes>*binding.xml</includes>

                              </includes>

                              <verbose>false</verbose>

                        </configuration>

                        <executions>

                              <execution>

                                    <phase>process-classes</phase>

                                    <goals>

                                          <goal>bind</goal>

                                    </goals>

                              </execution>

                        </executions>

                  </plugin>

 

 

4.	We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation. 

 

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Thanks for your help, Joe.

 

I have run the following command against my WSDL:

 

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl

Using AXIS2_HOME:   D:\javatools\axis2-1.5.1

Using JAVA_HOME:    d:\java\jdk

Retrieving document at '.\ValidationCodeService.wsdl'.

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException

: java.lang.RuntimeException: JiBX wrapped support requires a binding definition

 to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.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: JiBX wrapped support requires a binding d

efinition to be provided using the -Ebindingfile {file-path} parameter

        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil

ity.java:233)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte

nsion.java:77)

        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.java:224)

        ... 2 more

 

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

 

Thanks!

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

 

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

 

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

 

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well. 

 

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

 

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

 

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?

 

Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300

 

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.


RE: I don't get it

Posted by "Caristi, Joe" <jc...@whisolutions.com>.
Wsdl2Java does seem to still have an ANT task (we're not using it yet):  http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#ant

Wsdl2Java can generate both server and client side code.  We use both.  Here is a good explanation of the options:  http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1.  Note that in both cases for us it is a combination of JiBX generated classes (since we started with WSDL) and Wsdl2Java generated classes (callback handler, message receiver, endpoint stubs, service class shell).  In order to understand this, you should run through a couple of simple tutorials.

I'm not sure why you want to have your server-side controller call your web-service.  We have the following layers:

Service ->  Business -> Persistence

Our service class receives the request, delegates to a Business Façade and creates the response.  The Business Façade contains all the business logic and does all the work by orchestrating persistence classes, etc.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 13, 2010 8:41 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Sorry, had to pull aside to take care of critical issues.

OK, it sounds like JiBX will work for us too. So let's talk this through.

We have a web 2.0 application that we now need to provide functionality to voice response, kiosks, other applications, etc. Heterogeneous clients needing access to my webapp led me to select SOAP as a candidate.

We have a standalone webapp backed by a database over JDBC/Hibernate. We have separate jars for model, data access and services to provide separation between services and controller, so I thought I could use Axis2 to generate WSDLs from my existing services API that each of the client apps could use, then want to build client java code from the WSDLs so that my controllers can use them too.

I have modified my ant build to create the WSDL files using the Java2WSDL task and that appears to be working fine. Now I need to turn the WSDLs into client code so my servlet/controller can access it. This is the part I'm having a hard time getting my head around.

It looks like:

1)       WSDL2Java no longer has an ant task
2)       You're not using WSDL2Java below to build your client.

Are these true?


________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

Here is how we do it:


 1.  We started with WSDL.
 2.  We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes.
 3.  We set up our Eclipse development environment to run the binding compiler automatically, using Maven:

                  <plugin>
                        <groupId>org.jibx</groupId>
                        <artifactId>maven-jibx-plugin</artifactId>
                        <version>1.2.1</version>
                        <configuration>
                              <directory>src/main/config</directory>
                              <includes>
                                    <includes>*binding.xml</includes>
                              </includes>
                              <verbose>false</verbose>
                        </configuration>
                        <executions>
                              <execution>
                                    <phase>process-classes</phase>
                                    <goals>
                                          <goal>bind</goal>
                                    </goals>
                              </execution>
                        </executions>
                  </plugin>



 1.  We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation.

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Thanks for your help, Joe.

I have run the following command against my WSDL:

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl
Using AXIS2_HOME:   D:\javatools\axis2-1.5.1
Using JAVA_HOME:    d:\java\jdk
Retrieving document at '.\ValidationCodeService.wsdl'.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.RuntimeException: JiBX wrapped support requires a binding definition
 to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.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: JiBX wrapped support requires a binding d
efinition to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:233)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte
nsion.java:77)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java:224)
        ... 2 more

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

Thanks!

________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well.

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?


Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300


________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

RE: I don't get it

Posted by "Hehl, Thomas" <Th...@acs-inc.com>.
Sorry, had to pull aside to take care of critical issues.

 

OK, it sounds like JiBX will work for us too. So let's talk this
through.

 

We have a web 2.0 application that we now need to provide functionality
to voice response, kiosks, other applications, etc. Heterogeneous
clients needing access to my webapp led me to select SOAP as a
candidate.

 

We have a standalone webapp backed by a database over JDBC/Hibernate. We
have separate jars for model, data access and services to provide
separation between services and controller, so I thought I could use
Axis2 to generate WSDLs from my existing services API that each of the
client apps could use, then want to build client java code from the
WSDLs so that my controllers can use them too.

 

I have modified my ant build to create the WSDL files using the
Java2WSDL task and that appears to be working fine. Now I need to turn
the WSDLs into client code so my servlet/controller can access it. This
is the part I'm having a hard time getting my head around.

 

It looks like:

 

1)       WSDL2Java no longer has an ant task

2)       You're not using WSDL2Java below to build your client.

 

Are these true?

 

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Thursday, May 06, 2010 9:28 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

With JiBX, Axis2 can't do everything that needs to be done.  You either
have to create a binding file yourself, or you can use JiBX CodeGen to
do it for you.  Here's the link to the CodeGen page:
http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one
more step, which is the binding compiler.  This adds the marshalling
code to the Java classes (using the binding file).  Here's a link:
http://jibx.sourceforge.net/bindcomp.html

 

Here is how we do it:

 

1.	We started with WSDL. 
2.	We use JiBX CodeGen to generate the binding and Java files (if
you want to keep your original Java files, you would write the binding
manually).  We do this every time our WSDL changes. 
3.	We set up our Eclipse development environment to run the binding
compiler automatically, using Maven: 

 

                  <plugin>

                        <groupId>org.jibx</groupId>

                        <artifactId>maven-jibx-plugin</artifactId>

                        <version>1.2.1</version>

                        <configuration>

                              <directory>src/main/config</directory>

                              <includes>

                                    <includes>*binding.xml</includes>

                              </includes>

                              <verbose>false</verbose>

                        </configuration>

                        <executions>

                              <execution>

                                    <phase>process-classes</phase>

                                    <goals>

                                          <goal>bind</goal>

                                    </goals>

                              </execution>

                        </executions>

                  </plugin>

 

 

4.	We run wsdl2java, pointing to the binding file that was produced
by CodeGen.  We only do this when a WSDL change would affect Axis2, such
as a new operation. 

 

Here is a link to two tutorials that provide a good overview of the
process:
http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=j
ibx+1.2

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

Thanks for your help, Joe.

 

I have run the following command against my WSDL:

 

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx
-s -uri .\ValidationCodeService.wsdl

Using AXIS2_HOME:   D:\javatools\axis2-1.5.1

Using JAVA_HOME:    d:\java\jdk

Retrieving document at '.\ValidationCodeService.wsdl'.

Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException

: java.lang.RuntimeException: JiBX wrapped support requires a binding
definition

 to be provided using the -Ebindingfile {file-path} parameter

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.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: JiBX wrapped support requires a
binding d

efinition to be provided using the -Ebindingfile {file-path} parameter

        at
org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil

ity.java:233)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at
org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte

nsion.java:77)

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.java:224)

        ... 2 more

 

It appears to want a binding document. I read the article that you sent
me and the section of the Axis manual and found references to binding
document, but no examples of how one looks. Can you help?

 

Thanks!

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

The missing piece is that somehow Axis2 needs to be able to translate
between XML (the Soap or Rest message on the wire) and Java classes (in
your application).   This is known as data binding, and consists of code
to marshall and unmarshall the XML data.  This code usually gets
generated (in one way or another) and needs to be incorporated into your
application.

 

Look at this article, which explains the three available choices in
detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.
The summary at the end of the article is a good starting point for
making a choice between the frameworks.  We have had great success with
JiBX.  We originally used ADB, but switched to JiBX for performance and
flexibility.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

 

OK, I've used Axis once before briefly and now I'm trying to use Axis2.
The problem I'm having is that the documents don't appear to be written
for me. I need some advice on how to proceed.

 

My situation is that after building a web application, it turns out that
we need to have heterogeneous clients accessing our application. No
problem, I thought, because I created a services layer behind the
controller. I can use axis2 to generate a WSDL for my services layer and
expose the API that way to the other clients that need to access it and
our controllers as well. 

 

My intent had been simply to run java2wsdl on the classes in my services
jar, then wsdl2java on the resulting wsdl to build the client. Then I'd
patch these pieces together and let the web services do the
communication.

 

As I'm reading through the documentation, though, it talks a lot about
ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any
of them. Evidently, I'm supposed to know which of these I'm using before
selecting Axis2 as a tool.

 

So now I'm sort of stuck. Will someone kindly take a moment and shine a
little light, please?

 

Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300

 

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments
to
this message are intended for the exclusive use of the addressee(s) and
may
contain confidential or privileged information. If you are not the
intended
recipient, please notify WHI Solutions immediately at
gc@whisolutions.com,
and destroy all copies of this message and any attachments.

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments
to
this message are intended for the exclusive use of the addressee(s) and
may
contain confidential or privileged information. If you are not the
intended
recipient, please notify WHI Solutions immediately at
gc@whisolutions.com,
and destroy all copies of this message and any attachments.


RE: I don't get it

Posted by "Caristi, Joe" <jc...@whisolutions.com>.
With JiBX, Axis2 can't do everything that needs to be done.  You either have to create a binding file yourself, or you can use JiBX CodeGen to do it for you.  Here's the link to the CodeGen page: http://jibx.sourceforge.net/fromschema/codegen.html.  There is also one more step, which is the binding compiler.  This adds the marshalling code to the Java classes (using the binding file).  Here's a link:  http://jibx.sourceforge.net/bindcomp.html

Here is how we do it:


 1.  We started with WSDL.
 2.  We use JiBX CodeGen to generate the binding and Java files (if you want to keep your original Java files, you would write the binding manually).  We do this every time our WSDL changes.
 3.  We set up our Eclipse development environment to run the binding compiler automatically, using Maven:

                  <plugin>
                        <groupId>org.jibx</groupId>
                        <artifactId>maven-jibx-plugin</artifactId>
                        <version>1.2.1</version>
                        <configuration>
                              <directory>src/main/config</directory>
                              <includes>
                                    <includes>*binding.xml</includes>
                              </includes>
                              <verbose>false</verbose>
                        </configuration>
                        <executions>
                              <execution>
                                    <phase>process-classes</phase>
                                    <goals>
                                          <goal>bind</goal>
                                    </goals>
                              </execution>
                        </executions>
                  </plugin>



 1.  We run wsdl2java, pointing to the binding file that was produced by CodeGen.  We only do this when a WSDL change would affect Axis2, such as a new operation.

Here is a link to two tutorials that provide a good overview of the process:  http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=jibx+1.2
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Thursday, May 06, 2010 8:20 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

Thanks for your help, Joe.

I have run the following command against my WSDL:

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx -s -uri .\ValidationCodeService.wsdl
Using AXIS2_HOME:   D:\javatools\axis2-1.5.1
Using JAVA_HOME:    d:\java\jdk
Retrieving document at '.\ValidationCodeService.wsdl'.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.RuntimeException: JiBX wrapped support requires a binding definition
 to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.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: JiBX wrapped support requires a binding d
efinition to be provided using the -Ebindingfile {file-path} parameter
        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:233)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte
nsion.java:77)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java:224)
        ... 2 more

It appears to want a binding document. I read the article that you sent me and the section of the Axis manual and found references to binding document, but no examples of how one looks. Can you help?

Thanks!

________________________________
From: Caristi, Joe [mailto:jcaristi@whisolutions.com]
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well.

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?


Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300


________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.

RE: I don't get it

Posted by "Hehl, Thomas" <Th...@acs-inc.com>.
Thanks for your help, Joe.

 

I have run the following command against my WSDL:

 

D:\agile\repository\wsdl>d:\javatools\axis2-1.5.1\bin\wsdl2java -d jibx
-s -uri .\ValidationCodeService.wsdl

Using AXIS2_HOME:   D:\javatools\axis2-1.5.1

Using JAVA_HOME:    d:\java\jdk

Retrieving document at '.\ValidationCodeService.wsdl'.

Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException

: java.lang.RuntimeException: JiBX wrapped support requires a binding
definition

 to be provided using the -Ebindingfile {file-path} parameter

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.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: JiBX wrapped support requires a
binding d

efinition to be provided using the -Ebindingfile {file-path} parameter

        at
org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil

ity.java:233)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at
org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExte

nsion.java:77)

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener

ationEngine.java:224)

        ... 2 more

 

It appears to want a binding document. I read the article that you sent
me and the section of the Axis manual and found references to binding
document, but no examples of how one looks. Can you help?

 

Thanks!

 

________________________________

From: Caristi, Joe [mailto:jcaristi@whisolutions.com] 
Sent: Wednesday, May 05, 2010 11:05 AM
To: java-user@axis.apache.org
Subject: RE: I don't get it

 

The missing piece is that somehow Axis2 needs to be able to translate
between XML (the Soap or Rest message on the wire) and Java classes (in
your application).   This is known as data binding, and consists of code
to marshall and unmarshall the XML data.  This code usually gets
generated (in one way or another) and needs to be incorporated into your
application.

 

Look at this article, which explains the three available choices in
detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.
The summary at the end of the article is a good starting point for
making a choice between the frameworks.  We have had great success with
JiBX.  We originally used ADB, but switched to JiBX for performance and
flexibility.

________________________________

From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com] 
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

 

OK, I've used Axis once before briefly and now I'm trying to use Axis2.
The problem I'm having is that the documents don't appear to be written
for me. I need some advice on how to proceed.

 

My situation is that after building a web application, it turns out that
we need to have heterogeneous clients accessing our application. No
problem, I thought, because I created a services layer behind the
controller. I can use axis2 to generate a WSDL for my services layer and
expose the API that way to the other clients that need to access it and
our controllers as well. 

 

My intent had been simply to run java2wsdl on the classes in my services
jar, then wsdl2java on the resulting wsdl to build the client. Then I'd
patch these pieces together and let the web services do the
communication.

 

As I'm reading through the documentation, though, it talks a lot about
ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any
of them. Evidently, I'm supposed to know which of these I'm using before
selecting Axis2 as a tool.

 

So now I'm sort of stuck. Will someone kindly take a moment and shine a
little light, please?

 

Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300

 

 

________________________________

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments
to
this message are intended for the exclusive use of the addressee(s) and
may
contain confidential or privileged information. If you are not the
intended
recipient, please notify WHI Solutions immediately at
gc@whisolutions.com,
and destroy all copies of this message and any attachments.


RE: I don't get it

Posted by "Caristi, Joe" <jc...@whisolutions.com>.
The missing piece is that somehow Axis2 needs to be able to translate between XML (the Soap or Rest message on the wire) and Java classes (in your application).   This is known as data binding, and consists of code to marshall and unmarshall the XML data.  This code usually gets generated (in one way or another) and needs to be incorporated into your application.

Look at this article, which explains the three available choices in detail: http://www.ibm.com/developerworks/webservices/library/ws-java3/.  The summary at the end of the article is a good starting point for making a choice between the frameworks.  We have had great success with JiBX.  We originally used ADB, but switched to JiBX for performance and flexibility.
________________________________
From: Hehl, Thomas [mailto:Thomas.Hehl@acs-inc.com]
Sent: Wednesday, May 05, 2010 10:27 AM
To: java-user@axis.apache.org
Subject: I don't get it

OK, I've used Axis once before briefly and now I'm trying to use Axis2. The problem I'm having is that the documents don't appear to be written for me. I need some advice on how to proceed.

My situation is that after building a web application, it turns out that we need to have heterogeneous clients accessing our application. No problem, I thought, because I created a services layer behind the controller. I can use axis2 to generate a WSDL for my services layer and expose the API that way to the other clients that need to access it and our controllers as well.

My intent had been simply to run java2wsdl on the classes in my services jar, then wsdl2java on the resulting wsdl to build the client. Then I'd patch these pieces together and let the web services do the communication.

As I'm reading through the documentation, though, it talks a lot about ADB and JiBX and AXIOM and XML beans, but doesn't appear to explain any of them. Evidently, I'm supposed to know which of these I'm using before selecting Axis2 as a tool.

So now I'm sort of stuck. Will someone kindly take a moment and shine a little light, please?


Thom Hehl

Senior Development Specialist

Public Safety & Justice

Affiliated Computer Services, Inc.

A Xerox Company

1733 Harrodsburg Road

Lexington, KY 40504-3617

Tel 859.277.8800 x 144

Fax 859.277.2300


________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.