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 tamahmed <ta...@gmail.com> on 2012/07/14 01:17:42 UTC

axistools-maven-plugin - getServiceClient()

I am using axistools version 1.4 maven plugin to generate stubs for my wsdl. 
I am not able set http headers to my soap request because there is no method
in the generated client stubs which gives me serviceClient.  Can anyone
please tell me how to get serviceClient and set Options using the generated
sources with this plugin.  

if(options == null){
			options = new Options();
client._getServiceClient().setOptions(options);  //This doesn't work with
axistools-maven-plugin 
		}		
options.setProperty(HTTPConstants.HTTP_HEADERS,myheaders);

This is the plugin I am using. 

<plugin>
		<groupId>org.codehaus.mojo</groupId>
		<artifactId>axistools-maven-plugin</artifactId>
		<version>1.4</version>
		<configuration>
			<!-- SourceDirectory should only refer to the directory where the wsdl 
						resides and not the actual wsdl file itself -->
					<sourceDirectory>src/main/resources/wsdl/</sourceDirectory>
				
<outputDirectory>${project.build.directory}/generated-sources/</outputDirectory>
					<packageSpace>com.myservice</packageSpace>
					<serverSide>false</serverSide>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>wsdl2java</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
-- 
View this message in context: http://old.nabble.com/axistools-maven-plugin---getServiceClient%28%29-tp34159284p34159284.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: axistools-maven-plugin - getServiceClient()

Posted by Andreas Veithen <an...@gmail.com>.
The axistools Maven plugin generates stubs for Axis 1.x, but
ServiceClient is an Axis2 API.

Andreas

On Sat, Jul 14, 2012 at 1:17 AM, tamahmed <ta...@gmail.com> wrote:
>
> I am using axistools version 1.4 maven plugin to generate stubs for my wsdl.
> I am not able set http headers to my soap request because there is no method
> in the generated client stubs which gives me serviceClient.  Can anyone
> please tell me how to get serviceClient and set Options using the generated
> sources with this plugin.
>
> if(options == null){
>                         options = new Options();
> client._getServiceClient().setOptions(options);  //This doesn't work with
> axistools-maven-plugin
>                 }
> options.setProperty(HTTPConstants.HTTP_HEADERS,myheaders);
>
> This is the plugin I am using.
>
> <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
>                 <artifactId>axistools-maven-plugin</artifactId>
>                 <version>1.4</version>
>                 <configuration>
>                         <!-- SourceDirectory should only refer to the directory where the wsdl
>                                                 resides and not the actual wsdl file itself -->
>                                         <sourceDirectory>src/main/resources/wsdl/</sourceDirectory>
>
> <outputDirectory>${project.build.directory}/generated-sources/</outputDirectory>
>                                         <packageSpace>com.myservice</packageSpace>
>                                         <serverSide>false</serverSide>
>                                 </configuration>
>                                 <executions>
>                                         <execution>
>                                                 <goals>
>                                                         <goal>wsdl2java</goal>
>                                                 </goals>
>                                         </execution>
>                                 </executions>
>                         </plugin>
> --
> View this message in context: http://old.nabble.com/axistools-maven-plugin---getServiceClient%28%29-tp34159284p34159284.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org