Java Mailing List Archive

http://www.java2.5341.com/

Home » axis-user.ws »

axis2-wsdl2code-maven-plugin generated code GET/POST

Perry-Pelletier, Adam

2008-10-02


Author LoginPost Reply

I have used the Eclipse WebServices Client wizard to generate axis WS.  The tool properly creates bindings that allow me to connect to the web service.

 

But I want my project to be maven based, so I used the axis2-wsdl2code-maven-plugin to generate bindings.  The pom entry is as follows:

 

<plugin>

<groupId>org.apache.axis2</groupId>

<artifactId>axis2-wsdl2code-maven-plugin</artifactId>

<version>1.4.1</version>

<configuration>

<packageName>com.myorg.teamtrack.stubs</packageName>

<generateAllClasses>true</generateAllClasses>

<wsdlFile>src/main/resources/ttwebservices.wsdl</wsdlFile>

<databindingName>adb</databindingName>

</configuration>

<executions>

<execution>

<goals>

<goal>wsdl2code</goal>

</goals>

</execution>

</executions>

</plugin>

 

When I run a test client that uses the bindings I get the following Exception:

 

INFO: Unable to sendViaPost to url[http://teamtrack.hostname.com/gsoap/ttwebservices.wsdl?wsdl]

org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed

      at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:296)

      at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190)

      at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)

      at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:364)

      at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:208)

      at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)

      at …

 

Notice the exception that says it is trying to connect via POST method:  I believe that the Eclipse generated code is generating GET method calls. 

 

So the question is, how can I either configure the maven plugin to generated GET-based calls or how can I programmatically tell Axis to set WS calls via GET?

 

Thanks in advance for any help.

 

Adam

©2008 java2.5341.com - Jax Systems, LLC, U.S.A.